Make options and expt_dir args to main.main #31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi, I'd like to propose that instead of calling
get_options
inmain.main
to retrieveoptions
andexpt_dir
, they are instead passed as arguments tomain.main
. As it currently is, the only way to run a Spearmint experiment is to runpython main.py
. With this change, that option is still available, but it will also be possible to runmain.main
from within a Python script - something like the following:Note that this consolidates the main.py file and the experiment file, makes the 'main-file' option resilient to filename changes, and also obviates the need for a config file - we can just turn the config into a dict in the experiment file. And, again, it doesn't change the existing behavior. If there's something fundamental I'm missing here which suggests this is a bad idea, please correct me, but otherwise I think this small change would substantially clean up many use-cases! Thanks.