How to save trainer arguments, e.g. optimizer.learning rate as hparams?

Hi,

when i call

python3 train_pl.py fit --optimizer=Adam --optimizer.lr=0.0001

i would like to save the optimizer arguments to the hparams file.

What is the recommended way to do so?

Thanks!

something like this?

# Dump default configuration to have as reference
python3 train_pl.py fit --optimizer=Adam --optimizer.lr=0.0001 --print_config > config.yaml

We have moved the discussions to GitHub Discussions. You might want to check that out instead to get a quick response. The forums will be marked read-only after some time.

Thank you

1 Like