mle-infrastructure / mle-toolbox

Lightweight Tool to Manage Distributed ML Experiments 🛠
https://mle-infrastructure.github.io/mle_toolbox/toolbox/
MIT License
3 stars 1 forks source link

Using `null` in train config leads to errors #99

Open keraJLi opened 1 year ago

keraJLi commented 1 year ago

null is standard yaml syntax, the equivalent of python's None. Therefore using it to specifiy missing values in a training config should work, but it leads to an error. I'm not sure why exactly, but its related to the way saving yamls is handled in mle-hyperopt, more specifically in save_yaml in mle_hyperopt/helpers/utils.py. At the point where the file is evaluated as

data = json.dumps(convert(obj), indent=1)
data_dump = ast.literal_eval(data)

the data variable contains null without quotes, which cannot be parsed (its also not a variable).