diff --git a/bluepyemodel/access_point/local.py b/bluepyemodel/access_point/local.py index 74267b6f..992d7fd5 100644 --- a/bluepyemodel/access_point/local.py +++ b/bluepyemodel/access_point/local.py @@ -34,8 +34,8 @@ from bluepyemodel.evaluation.evaluator import LEGACY_PRE_PROTOCOLS from bluepyemodel.evaluation.evaluator import PRE_PROTOCOLS from bluepyemodel.evaluation.fitness_calculator_configuration import FitnessCalculatorConfiguration -from bluepyemodel.export_emodel.utils import get_output_path_from_metadata from bluepyemodel.export_emodel.utils import get_hoc_file_path +from bluepyemodel.export_emodel.utils import get_output_path_from_metadata from bluepyemodel.model.mechanism_configuration import MechanismConfiguration from bluepyemodel.model.neuron_model_configuration import NeuronModelConfiguration from bluepyemodel.tools.mechanisms import get_mechanism_currents diff --git a/bluepyemodel/tasks/emodel_creation/optimisation.py b/bluepyemodel/tasks/emodel_creation/optimisation.py index 112178d7..ba4a3eed 100644 --- a/bluepyemodel/tasks/emodel_creation/optimisation.py +++ b/bluepyemodel/tasks/emodel_creation/optimisation.py @@ -703,6 +703,13 @@ class ExportHoc(WorkflowTaskRequiringMechanisms, IPyParallelTask): seed = luigi.IntParameter(default=1) graceful_killer = multiprocessing.Event() + def __init__(self, *args, **kwargs): + """ """ + super().__init__(*args, **kwargs) + + # set self.batch_size here to easily handle it in the argparse argument passing + self.batch_size = self.access_point.pipeline_settings.optimisation_batch_size + def requires(self): """ """ @@ -738,8 +745,6 @@ def requires(self): @WorkflowTask.check_mettypes def run(self): """Prepare self.args, then call bbp-workflow's IPyParallelTask's run().""" - # set self.batch_size here to easily handle it in the argparse argument passing - self.batch_size = self.access_point.pipeline_settings.optimisation_batch_size attrs = [ "backend", "emodel", @@ -764,8 +769,8 @@ def remote_script(self): import json from bluepyemodel import access_point - from bluepyemodel.tools.multiprocessing import get_mapper from bluepyemodel.export_emodel.export_emodel import export_emodels_sonata + from bluepyemodel.tools.multiprocessing import get_mapper # -- parsing -- # parser = argparse.ArgumentParser() @@ -898,6 +903,8 @@ class EModelCreation(WorkflowTask): when there is more than 1 luigi worker. Exit loop if set. """ + # pylint: disable=no-self-argument, not-callable + seed = luigi.IntParameter(default=1) graceful_killer = multiprocessing.Event() diff --git a/bluepyemodel/tools/mechanisms.py b/bluepyemodel/tools/mechanisms.py index 7360d339..82a7fee2 100644 --- a/bluepyemodel/tools/mechanisms.py +++ b/bluepyemodel/tools/mechanisms.py @@ -88,7 +88,7 @@ def compile_mechs_in_emodel_dir(mechanisms_directory): mechanisms_dir (Path): path to the directory containing the mod files to compile. """ - # pylint: disable=broad-exception-caught + # pylint: disable=broad-except cwd = os.getcwd() try: