Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Hydraを使った設定ファイル管理とoptunaプラグインでのパラメータ探索
Search
Ringa_hyj
December 31, 2024
Technology
240
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hydraを使った設定ファイル管理とoptunaプラグインでのパラメータ探索
Ringa_hyj
December 31, 2024
More Decks by Ringa_hyj
See All by Ringa_hyj
DVCによるデータバージョン管理
ringa_hyj
0
410
deeplakeによる大規模データのバージョン管理と深層学習フレームワークとの接続
ringa_hyj
0
120
ClearMLで行うAIプロジェクトの管理(レポート,最適化,再現,デプロイ,オーケストレーション)
ringa_hyj
0
270
Catching up with the tidymodels.[Japan.R 2021 LT]
ringa_hyj
3
880
多次元尺度法MDS
ringa_hyj
0
420
因子分析(仮)
ringa_hyj
0
210
階層、非階層クラスタリング
ringa_hyj
0
160
tidymodels紹介「モデリング過程料理で表現できる説」
ringa_hyj
0
690
深層学習をつかった画像スタイル変換の話と今までの歴史
ringa_hyj
0
500
Other Decks in Technology
See All in Technology
インシデント事例と パッケージの全量解析に学ぶ ソフトウェアサプライチェーンの守り方 / supply-chain-attack-defense
flatt_security
0
1.1k
AIとハーネスで育てるトランスコンパイラ / 20260722 Yasushi Katayama
shift_evolve
PRO
3
960
AIツールを導入しても生産性はあがらない? カオナビが直面した 3つの壁と乗り越え方。/ Overcoming 3 Barriers to AI-Driven Productivity at kaonavi
kaonavi
0
300
AI Agent を本番環境へ―― Microsoft Foundry × Azure Serverless で作る Enterprise-Ready な基盤
shibayan
PRO
1
480
AI時代こそ、スケールしないことをしよう -「作る人」から「なぜ作るか」を考える人へ / Do Things That Don't Scale in the AI Era — From How to Why
kaminashi
1
150
StepFunctionsとGraphRAGを活用した暗黙知活用のためのRAG基盤
yakumo
0
170
AI驚き屋発見器
yama3133
1
290
大 AI 時代におけるC# の事情 ~ぶっちゃけトークを交えながら~
nenonaninu
1
200
Multicaで30個のミニプロジェクトをAIエージェント運用して見えてきたこと
eiei114
1
660
データ活用研修 問いの発見と仮説構築【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
260
Git 研修【MIXI 26新卒技術研修】
mixi_engineers
PRO
1
360
Claude Mythos、Fable...フロンティアAIの最新動向と企業のセキュリティ対策
flatt_security
0
150
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6k
Embracing the Ebb and Flow
colly
88
5.1k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
1
3.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
72
40k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
Typedesign – Prime Four
hannesfritz
42
3.1k
We Are The Robots
honzajavorek
0
280
Balancing Empowerment & Direction
lara
6
1.2k
WENDY [Excerpt]
tessaabrams
11
39k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
620
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
980
Transcript
紹介 1/3 HYDRAの目的は・・・ 複数ジョブの実行や複雑なアプリケーション開発の 設定管理の効率化のためのフレームワーク こんな経験はありませんか? • 複数の実験設定を試す際に、パラメータの管理が煩雑になってしまう • 設定ファイルの変更履歴が追えず、どの設定で良い結果が出たのか分からなくなる
• 本番環境と開発環境で異なる設定を使いたいが、切り替えが面倒 はじめに
紹介 2/3 from omegaconf import DictConfig, OmegaConf import hydra @hydra.main(version_base=None,
config_path=".",config_name="config") def my_app(cfg): print(OmegaConf.to_yaml(cfg)) if __name__ == "__main__": my_app() # config.yaml db: driver: mysql user: omry password: secret $ python my_app.py db: driver: mysql user: omry password: secret $ python my_app.py db.user=root db.password=1234 db: driver: mysql user: root password: 1234 • @hydra.main()のデコレータで関数を装飾 • パラメタはyamlファイルで指定 • コマンドライン上から上書きが可能 • 実行ログやパラメタが記録され参照が可能 実行結果 上書き実行の結果 パラメタの読込/追跡
紹介 3/3 • 定義した複数の値を切り替えながら実行することも可能(マルチラン) • hydra-optuna-sweeper等プラグインと組み合わせパラメタ探索も可能 # @package hydra.sweeper sampler:
_target_: optuna.samplers.TPESampler seed: 123 consider_prior: true prior_weight: 1.0 consider_magic_clip: true consider_endpoints: false n_startup_trials: 10 n_ei_candidates: 24 multivariate: false warn_independent_sampling: true _target_: hydra_plugins.hydra_optuna_sweeper.optuna_sweeper.OptunaSweeper direction: minimize storage: null study_name: sphere n_trials: 20 n_jobs: 1 max_failure_rate: 0.0 params: x: range(-5.5,5.5,step=0.5) y: choice(0,1,2,3) パラメタ探索/最適化 Hydraとoptunaによる最適パラメタの探索 x -5 5 y 0 1 2 3 0