pytorch-image-models
pytorch-image-models copied to clipboard
Moved all argparse configs to .yaml files, added set_deterministic function, added class for easy model evaluation on one image
- Moved all
argparseconfigs to.yamlfiles. All configs are parsed from the.yamlfile. If necessary, any parameter can be written to the terminal as before and these parameters will overwrite the .yaml file. All args are also stored in args_text variable as string. - Added
set_deterministicfunction. This function can be useful for checking the representativeness of experiment. - Added class for easy model evaluation on one image.
I think it would be great if the config system can be like that of detectron2 or mmdetection, as they allow overriding config values through command line args.
I think it would be great if the config system can be like that of detectron2 or mmdetection, as they allow overriding config values through command line args.
This config system can receive command-line arguments as before:
python train.py --batch_size=128 --weight_decay=0.001, etc
And then these config values will be override and used in pipeline.
Does it also allow inheritance from some basic configs?
Thanks for the contribution. I agree that config files can make more sense than the sprawl of args that the scrips here have developed. I had a different (eventual) plan in mind though. I intended to migrate to Hydra or ML Collections, a config scheme with hierarchical / typed struct support.
This approach sits in between those, it keeps the command line more aligned with what exists right now, but it lacks some of the features that'd motivate me to adopt this change. The existing code does support using yaml config files in a half-assed way. I use it all the time for resuming experiments or changing a few items in a sequence of experiments. If you start any train process, grab the args.yaml file in the output folder, you can tweak it to create new configs and just launch with --config my_config.yaml
Also, the defaults that were placed in the config files in this PR are different and break the standard ImageNet training hparam starting point. I'll keep this PR open as a reference for now and figure out when I'd like to tackle config...