Make options and expt_dir args to main.main#31
Open
craffel wants to merge 1 commit intoHIPS:masterfrom
Open
Conversation
|
I like this a lot. But just encountered a problem which I could solve by renaming my script with the nice name "main.py" to something else. Could be that that problem existed before however. best, Jan |
Author
|
Hm, I would assume this was there before; apparently |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_optionsinmain.mainto retrieveoptionsandexpt_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.mainfrom 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.