Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
orbitfold committed Mar 11, 2021
1 parent 80b87a5 commit ca7f154
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 43 deletions.
2 changes: 1 addition & 1 deletion easyvvuq/actions/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from .base import BaseAction
from .execute_local import ExecuteLocal, ExecuteLocalV2, ExecutePython
from .execute_local import ExecuteLocal, ExecutePython
from .execute_kubernetes import ExecuteKubernetes
from .execute_slurm import ExecuteSLURM
from .action_statuses import ActionPool
Expand Down
2 changes: 1 addition & 1 deletion easyvvuq/actions/execute_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def succeeded(self):
return True


class ExecuteLocal(ExecuteLocal):
class ExecuteLocal():
"""An improvement over ExecuteLocal that uses Popen and provides the non-blocking
execution that allows you to track progress. In line with other Action classes in EasyVVUQ.
"""
Expand Down
4 changes: 2 additions & 2 deletions easyvvuq/campaign.py
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,9 @@ def apply_for_each_sample(self, action, max_workers=None):
# run the specified action on each run's dir
action.campaign = self
actions = []
for run_id, run_data in self.campaign_db.runs(status=Status.ENCODED, app_id=self._active_app['id']):
for run_id, run_data in self.campaign_db.runs(status=Status.NEW, app_id=self._active_app['id']):
action.run_id = run_id
action.params = json.loads(run_data['params'])
action.params = run_data['params']
actions.append(action)
return ActionPool(actions, max_workers=max_workers)

Expand Down
7 changes: 7 additions & 0 deletions easyvvuq/db/sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,13 @@ def runs_dir(self, campaign_name=None):

return self._get_campaign_info(campaign_name=campaign_name).runs_dir

def store_result(self, run_id, result):
import pdb; pdb.set_trace()
self.session.query(RunTable).\
filter(RunTable.run_name == run_id).\
update({'result': json.dumps(result), 'status': constants.Status.COLLATED})
self.session.commit()

def store_results(self, app_name, results):
"""Stores the results from a given run in the database.
Expand Down
53 changes: 14 additions & 39 deletions tutorials/mcmc_tutorial.ipynb

Large diffs are not rendered by default.

0 comments on commit ca7f154

Please sign in to comment.