Skip to content

Commit

Permalink
add support for custom exec_mode
Browse files Browse the repository at this point in the history
  • Loading branch information
danlessa committed Mar 9, 2023
1 parent 14fe8b1 commit d8d7e2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions cadCAD_tools/execution/easy_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def easy_run(state_variables,
N_samples,
use_label=False,
assign_params: Union[bool, set]=True,
drop_substeps=True) -> pd.DataFrame:
drop_substeps=True,
exec_mode='local') -> pd.DataFrame:
"""
Run cadCAD simulations without headaches.
"""
Expand All @@ -42,8 +43,11 @@ def easy_run(state_variables,
configs = exp.configs

# Set-up cadCAD executor
exec_mode = ExecutionMode()
exec_context = ExecutionContext(exec_mode.local_mode)
if exec_mode == 'local':
_exec_mode = ExecutionMode().local_mode
elif exec_mode == 'single':
_exec_mode = ExecutionMode().single_mode
exec_context = ExecutionContext(_exec_mode)
executor = Executor(exec_context=exec_context, configs=configs)

# Execute the cadCAD experiment
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

setup(name='cadCAD_tools',
version='0.0.1.6',
version='0.0.1.7',
description="tools",
long_description=long_description,
url='https://github.com/cadCAD-org/cadCAD-tools',
Expand Down

0 comments on commit d8d7e2c

Please sign in to comment.