Commit dce310ab authored by Philip ABBET's avatar Philip ABBET

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

parent a9164acc
...@@ -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
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