Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions spearmint/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ def get_options():
raise Exception("config.json did not load properly. Perhaps a spurious comma?")
options["config"] = commandline_kwargs.config_file

return options, expt_dir

def main(options, expt_dir):

# Set sensible defaults for options
options['chooser'] = options.get('chooser', 'default_chooser')
Expand All @@ -243,11 +246,6 @@ def get_options():
"Aborting.\n" % (expt_dir))
sys.exit(-1)

return options, expt_dir

def main():
options, expt_dir = get_options()

resources = parse_resources_from_config(options)

# Load up the chooser.
Expand Down Expand Up @@ -491,4 +489,4 @@ def print_diagnostics(chooser):
best_job_fh.close()

if __name__ == '__main__':
main()
main(*get_options())