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
250
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
450
deeplakeによる大規模データのバージョン管理と深層学習フレームワークとの接続
ringa_hyj
0
120
ClearMLで行うAIプロジェクトの管理(レポート,最適化,再現,デプロイ,オーケストレーション)
ringa_hyj
0
290
Catching up with the tidymodels.[Japan.R 2021 LT]
ringa_hyj
3
890
多次元尺度法MDS
ringa_hyj
0
470
因子分析(仮)
ringa_hyj
0
220
階層、非階層クラスタリング
ringa_hyj
0
170
tidymodels紹介「モデリング過程料理で表現できる説」
ringa_hyj
0
690
深層学習をつかった画像スタイル変換の話と今までの歴史
ringa_hyj
0
510
Other Decks in Technology
See All in Technology
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
450
作り直せるコードは迅速に 作り直せないDBは慎重に - AI時代のプロダクトエンジニアが「判断の不可逆性」で開発速度を変える話
kinosuke01
0
270
GuardDuty 検知対応を DevOps Agent で効率化しようとしている話 / GuardDuty Investigations with DevOps Agent
masahirokawahara
1
330
プロダクトエンジニアに必要な「いい感じ」に作る能力 〜たくさん作れる時代に、どこまで作るかの決め方〜
jnishime_dresscode
2
1.4k
ペアプロの価値はコードを書くことだけじゃない
codmoninc
PRO
0
130
Tab5をRubyで動くパソコンにする
kishima
2
250
Redmine 7.0で私が開発した新機能の狙いと背景
vividtone
1
110
20260906 「AWS運用入門」著者が教える、運用業務への生成AI活用入門
masaruogura
0
240
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
110
From Vanilla Kubernetes to a Batteries-Included Platform: Developer Experience at 1,300+ Clusters
yosshi_
0
610
PM領域でのAI Agentの活用
lycorptech_jp
PRO
0
280
Oracle Cloud Infrastructure IaaS 新機能アップデート 2026/6 - 2026/8
oracle4engineer
PRO
0
120
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
25k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
340
From π to Pie charts
rasagy
0
360
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
2
500
Code Reviewing Like a Champion
maltzj
528
40k
Done Done
chrislema
186
16k
Un-Boring Meetings
codingconduct
0
410
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
230
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
420
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.6k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
4
590
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
840
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