Skip to content

andreasgrv/mlconf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status mlconf

Because in machine learning, sensible defaults don't last long. Especially when choosing hyperparameters:

Image of scrat holding up finger to sense the direction of the wind

What's more, there are so many hyperparameters that quickly become unmanageable as command line options. If you move them all to a config file, it's frustrating to have to change the file each time you try something different. So why not enjoy the best of both worlds?

Dynamic argparse arguments with sensible defaults from a yaml file that can be modified on the fly from the command line.

mlconf in a nutshell

  • Dynamically set a lot of sane defaults from a YAML file.
  • Be able to override any number of the defaults from the command line.
  • Make the returned object easily accessible using . notation.
  • Allows for instantiation of classes with reflection using the $classname and $module parameters at a later time by using the blueprint's build() command.

Installation

pip install mlconf

Example

For example usage see my post.

Tests

Tests are run using tox. Versions of python tested are Python 3.6+ To run the tests, run the following:

git clone https://github.com/andreasgrv/mlconf
cd mlconf
pip install -r requirements.txt
pip install .
tox

License

3 clause BSD, see LICENSE.txt file

Credits

Image is a neural styled portrait of Ice Age celebrity sabre-tooth squirrel, scrat.