Skip to content
Snippets Groups Projects
Commit dce310ab authored by Philip ABBET's avatar Philip ABBET
Browse files

Filter the data loaders given to the 'prepare()' method of autonomous algorithms

parent a9164acc
No related branches found
No related tags found
1 merge request!17Merge development branch 1.5.x
...@@ -186,7 +186,10 @@ class Runner(object): ...@@ -186,7 +186,10 @@ class Runner(object):
# The method is optional # The method is optional
if hasattr(self.obj, 'prepare'): if hasattr(self.obj, 'prepare'):
self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders) if self.algorithm.type == Algorithm.AUTONOMOUS:
self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders.secondaries())
else:
self.prepared = loader.run(self.obj, 'prepare', self.exc, data_loaders)
else: else:
self.prepared = True self.prepared = True
......
...@@ -353,4 +353,6 @@ class DataLoaderList(object): ...@@ -353,4 +353,6 @@ class DataLoaderList(object):
if data_loader is not self.main_loader: if data_loader is not self.main_loader:
secondaries_list.add(data_loader) secondaries_list.add(data_loader)
secondaries_list.main_loader = None
return secondaries_list return secondaries_list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment