Commit a377d58a authored by Samuel GAIST's avatar Samuel GAIST

[experiments] Only create the view if the index must be done

There's no reason to create the view early if it might not
be used.
parent 39e9ddf1
Pipeline #37867 passed with stage
in 3 minutes and 50 seconds
......@@ -152,7 +152,6 @@ def run_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, infos["protocol"], infos["set"]),
suffix=".db",
......@@ -163,6 +162,7 @@ def run_experiment(
"Index for database %s not found, building it",
infos["database"].name,
)
view = infos["database"].view(infos["protocol"], infos["set"])
view.index(database_index_path)
dataformat_cache = {}
......
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