Skip to content

Commit

Permalink
hotfix for renaming results.json
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffkinnison committed Nov 5, 2018
1 parent 71a330f commit 10022a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shadho/shadho.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class Shadho(object):
"""

def __init__(self, cmd, spec, files=None, use_complexity=True,
def __init__(self, cmd, spec, backend=None, files=None, use_complexity=True,
use_priority=True, timeout=600, max_tasks=100,
await_pending=False, max_resubmissions=0):
self.config = ShadhoConfig()
Expand Down Expand Up @@ -116,6 +116,7 @@ def __init__(self, cmd, spec, files=None, use_complexity=True,

self.config.save_config(self.__tmpdir)
self.add_input_file(os.path.join(self.__tmpdir, '.shadhorc'))
self.backend = self.backend

def __del__(self):
if hasattr(self, '__tmpdir') and self.__tmpdir is not None:
Expand Down Expand Up @@ -208,6 +209,7 @@ def run(self):
# Set up the backend hyperparameter generation and database
if not hasattr(self, 'backend'):
self.backend = pyrameter.build(self.spec,
db=self.backend,
complexity_sort=self.use_complexity,
priority_sort=self.use_priority)

Expand Down

0 comments on commit 10022a6

Please sign in to comment.