Commit 34ae8bbe authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[experiments] Fixed database indexing when running an experiment

The wrong path was used to generate the index.

Logging has also been improved.
parent 4b7b5f68
Pipeline #17782 passed with stage
in 2 minutes and 18 seconds
......@@ -153,15 +153,17 @@ def run_experiment(configuration, name, force, use_docker, use_local):
return "%.2f gigabytes" % (s / gb)
return "%.2f terabytes" % (s / tb)
def index_experiment_databases(prefix, experiment):
def index_experiment_databases(cache_path, experiment):
for block_name, infos in experiment.datasets.items():
view = infos['database'].view(infos['protocol'], infos['set'])
filename = toPath(hashDataset(infos['database'].name,
if not os.path.exists(filename):
view.index(os.path.join(prefix, filename))
database_index_path = os.path.join(cache_path, filename)
if not os.path.exists(database_index_path):"Index for database %s not found, building it", infos['database'].name)
dataformat_cache = {}
database_cache = {}
......@@ -182,7 +184,7 @@ def run_experiment(configuration, name, force, use_docker, use_local):
os.makedirs(configuration.cache)"Created cache path `%s'", configuration.cache)
index_experiment_databases(configuration.path, experiment)
index_experiment_databases(configuration.cache, experiment)
scheduled = experiment.setup()
Supports Markdown
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