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
AgitatedDove14 Hmm, every training is run by bash script calling train.py
which looks something like this:
` @hydra.main(config_path="solver/config", config_name="config")
def train(hparams: DictConfig):
"""
Run training pytorch-lightning model
"""
# Set process title
setproctitle.setproctitle(f"{hparams.tag}-{get_user_name()}")
try:
# Init ClearmlTask and connect configuration
task = Task.init(hparams.task_name, hparams.tag)
task.connect_configuration(
configuration=normalize_and_flat_config(hparams),
name="Hyperparameters",
)
task.connect(
normalize_and_flat_config(hparams), name="Hyperparameters_for_optimization"
)
hparams.clearml_task_id = task.id
<another preparation for training using hparams> `Interestingly, "Hyperparameters for optimization" are overwritten correctly, but "Hyperparameters" aren't even though I tried to set Hydra/_ allow_ omegaconf_edit_ to true. So probably I have wrong logic of the program incompatible with optimizer. I supposed the optimizer can do something similar like Hydra overrides ( https://hydra.cc/docs/advanced/override_grammar/basic/ ) internally, but for my case it would be probably easier to use this hydra overrides directly in the code. If you have some other notes and ideas, I would be glad to read them after Christmas, otherwise thank you very much for your participation 🙂
163 Views
0
Answers
3 years ago
one year ago