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
230
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
400
deeplakeによる大規模データのバージョン管理と深層学習フレームワークとの接続
ringa_hyj
0
110
ClearMLで行うAIプロジェクトの管理(レポート,最適化,再現,デプロイ,オーケストレーション)
ringa_hyj
0
250
Catching up with the tidymodels.[Japan.R 2021 LT]
ringa_hyj
3
880
多次元尺度法MDS
ringa_hyj
0
380
因子分析(仮)
ringa_hyj
0
210
階層、非階層クラスタリング
ringa_hyj
0
160
tidymodels紹介「モデリング過程料理で表現できる説」
ringa_hyj
0
680
深層学習をつかった画像スタイル変換の話と今までの歴史
ringa_hyj
0
500
Other Decks in Technology
See All in Technology
ザ・データベース、MySQL ~ OSC 2026 Sendai ~
sakaik
0
140
現地で盛り上がった WWDC26 Keynote
zozotech
PRO
1
270
小さく始める AI 活用推進 ― 日経電子版 Web チームの事例/nikkei-tech-talk47
nikkei_engineer_recruiting
0
300
エラーバジェットのアラートのタイミングを考える.pdf
kairim0
0
170
失敗を資産に変えるClaude Code
shinyasaita
0
720
SONiCで構築・運用する生成AI向けパブリッククラウドネットワーク ~実装編~
sonic
0
280
【Cyber-sec+】経営層を"動かす"ための考え方
hssh2_bin
0
200
Android の公式 Skill / Android skills
yanzm
0
160
200個のGitHubリポジトリを横断調査したかった
icck
0
140
データサイエンスを価値につなげるプロジェクト設計 〜 DS一年目が現場で得た気づき 〜
ysd113
1
280
マルチアカウント環境での コーディングエージェントを使った障害調査が大変なので AIエージェントにReadOnly権限を付与してみた / ReadOnly AI Agents for Multi-Account AWS Incident Response
yamaguchitk333
2
110
AIチャット検索改善の3週間
kworkdev
PRO
2
140
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Leo the Paperboy
mayatellez
7
1.8k
Utilizing Notion as your number one productivity tool
mfonobong
4
320
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Become a Pro
speakerdeck
PRO
31
6k
Crafting Experiences
bethany
1
180
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.9k
Balancing Empowerment & Direction
lara
6
1.2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
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