pesser / edflow

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

Wandb sweeps #254

Closed jhaux closed 4 years ago

jhaux commented 4 years ago

(Could you merge my #253 pull request first?)

The great functionality of wandb sweeps cannot be used out of the box with edflow. The new edprep command helps with this. Now you can

  1. Define a sweep from you wandb client
  2. edprep the sweep.yaml so that it is compatible with edflow
  3. run the wandb sweep For more details the the docstring in edprep

There are two changes that maybe need discussion:

  1. I changed the behavior of the Template Iterator from setting the wandb project id to setdefaulting it. -> I am not sure if this introduces problems, but I have not run into any. See line 75 in edflow/iterators/template_iterator.py
  2. I moved the argument parser out of the edflow script to make it reusable and changed the type of the action arguments (-t, -d) to a custom type, which should yield the same behavior as before but also allow for the explicit passing of the boolean arguments in various forms. This is necessary, as wandb needs to get all arguments passed to edflow in a specific form, after which it will pass them explicitly as --key=value pairs. I have not encountered problems with this new handling, but would like to make sure that a second brain wraps itself around this problem.