Unanswered
Hello, I Would Like To Optimize Hparams Saved In Configuration Objects. I Used Hydra And Omegaconf For Hparams Definition (See Img). How Should I Define The Name Of Hparam In
Hello again, AgitatedDove14 and others. I write you to let you know, what works for us in the case of optimizing hparams in DictConfig:
` hparams_dict = OmegaConf.to_object(hparams)
update hparams_dict using new hyperparameters set by the optimizer
hparams_dict = task.connect(hparams_dict, name="HPO")
ProxyDictPostWrite to dict
hparams_dict = hparams_dict._to_dict()
update hparams DictConfig which is used later in the training
hparams = OmegaConf.create(hparams_dict)
train(hparams) `Using this notation, you can set the hyperparameters in the optimization example like this:
hyper_parameters=[ DiscreteParameterRange("HPO/training/seed", values=[100, 900]), ],
You can compare the hyperparameters of the experiments in the Configuration tab -> Hyperparameters -> HPO.
I hope this dummy example will help somebody in the future. Thank you AgitatedDove14 for cooperation.
164 Views
0
Answers
2 years ago
one year ago