Commit bca02c60 authored by André Anjos's avatar André Anjos 💬

Merge branch 'fix_run_environment_option_handling' into 'master'

Fix environment parameter handling for experiment run

See merge request !78
parents 520e043c 1a3ed66e
Pipeline #35386 passed with stages
in 4 minutes and 56 seconds
......@@ -80,6 +80,8 @@ def run_experiment(
):
"""Run experiments locally"""
print(use_local, use_docker, run_environment_path)
def load_result(executor):
"""Loads the result of an experiment, in a single go"""
......@@ -215,9 +217,8 @@ def run_experiment(
)
return 1
if use_docker:
executor = DockerExecutor(
host=host,
if run_environment_path is not None:
executor = SubprocessExecutor(
prefix=configuration.path,
data=value["configuration"],
cache=configuration.cache,
......@@ -225,9 +226,12 @@ def run_experiment(
database_cache=database_cache,
algorithm_cache=algorithm_cache,
library_cache=library_cache,
custom_root_folders=configuration.database_paths,
python_path=run_environment_path,
)
elif use_local:
executor = LocalExecutor(
elif use_docker:
executor = DockerExecutor(
host=host,
prefix=configuration.path,
data=value["configuration"],
cache=configuration.cache,
......@@ -235,10 +239,9 @@ def run_experiment(
database_cache=database_cache,
algorithm_cache=algorithm_cache,
library_cache=library_cache,
custom_root_folders=configuration.database_paths,
)
else:
executor = SubprocessExecutor(
elif use_local:
executor = LocalExecutor(
prefix=configuration.path,
data=value["configuration"],
cache=configuration.cache,
......@@ -247,8 +250,9 @@ def run_experiment(
algorithm_cache=algorithm_cache,
library_cache=library_cache,
custom_root_folders=configuration.database_paths,
python_path=run_environment_path,
)
else:
raise RuntimeError("Invalid parameters")
if not executor.valid:
logger.error("Failed to load the execution information for `%s':", key)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment