pesser / edflow

Reduce boilerplate code for your ML projects. TensorFlow and PyTorch.
https://edflow.readthedocs.io/
MIT License
24 stars 13 forks source link

Unified commandline behavior for all entry points #255

Open jhaux opened 4 years ago

jhaux commented 4 years ago

Is your feature request related to a problem? Please describe. As described in #231 it would be nice to be able to have a unified way of dealing with input parameters and how we put them in a config file.

Describe the solution you'd like I propose to simply take the code we are already using in edflow and create a function that processes all command line parameters and creates a config dict out of it, which is then passed on. One could also consider putting all config related operations in the above described function, like stacking of all base configs.

The ideal solution would be that for every new and existing entry point like edflow or edexplore we simply need the following lines of code:

if __name__ == '__main__':
    config = process_inputs()
    main(config)

This would make the config the only central object that is passed around (not the argparse args as second object) and make things better documented as all relevant parameters including -t etc would be logged in the config, making it possible to exactly rerun the command.

Describe alternatives you've considered The status quo is working but has loads of duplicate lines and inconsistencies.