Open CourchesneA opened 3 months ago
@CourchesneA How is the parameter initially set with a NULL value (before you try to modify it)?
Using a YAML config file, initially generated with the --print_config
flag (i.e. python trainer.py fit --print_config
), most parameters are set to null
:
min_steps: null
Describe the bug
Using the clearml dashboard, I can clone and enqueue experiments with different parameters. When a parameters is null for the base experiments, it does not get assigned a type. If I try to clone and change that parameters, it will default to a string and might not be able to be parsed if another type is expected by argparse / jsonargparse.
I tested with a list type, and got the following error from jsonargparse:
In this scenario, I would have liked that config field to be parsed as a list of int, but it was passed as a string and resulted in an error. If I clone an experiment for which this parameter is non-null, it already has the type "list/int" and works fine
To reproduce
From a Pytorch Lightning or jsonargparse experiment, create an experiment with a list parameter and run it. Then, clone the experiment, and assign this parameter a non-empty value from the dashboard, and enqueue this experiment.
Expected behaviour
The config file should be parsed in the proper type. For example, if jsonargparse is expecting a list for the param and a value of "[1,2] is supplied, it should not be passed as a string and crash the program
Environment