Skip to content

Commit

Permalink
remove duplicate optimisation plotting
Browse files Browse the repository at this point in the history
Change-Id: I834c016151448cb0c33dfd691a99414e50b855ab
  • Loading branch information
Jaquier Aurélien Tristan committed Nov 5, 2024
1 parent c05e965 commit 39c4237
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions bluepyemodel/tasks/emodel_creation/optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from bluepyemodel.tasks.luigi_tools import WorkflowTaskRequiringMechanisms
from bluepyemodel.tasks.luigi_tools import WorkflowWrapperTask
from bluepyemodel.tools.mechanisms import compile_mechs_in_emodel_dir
from bluepyemodel.tools.utils import existing_checkpoint_paths

# pylint: disable=W0235,W0621,W0404,W0611,W0703,E1128
logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -1251,7 +1250,6 @@ def run(self):
""" """

plot_optimisation = self.access_point.pipeline_settings.plot_optimisation
optimiser = self.access_point.pipeline_settings.optimiser
plot_currentscape = self.access_point.pipeline_settings.plot_currentscape
plot_bAP_EPSP = self.access_point.pipeline_settings.plot_bAP_EPSP
plot_IV_curves = self.access_point.pipeline_settings.plot_IV_curves
Expand All @@ -1271,8 +1269,8 @@ def run(self):
mapper=mapper,
seeds=range(self.seed, self.seed + batch_size),
figures_dir=Path("./figures") / self.emodel,
plot_optimisation_progress=plot_optimisation,
optimiser=optimiser,
# False because already done in PlotOptimisation task
plot_optimisation_progress=False,
plot_parameter_evolution=plot_optimisation,
plot_distributions=plot_optimisation,
plot_traces=plot_optimisation,
Expand Down Expand Up @@ -1305,14 +1303,6 @@ def output(self):

outputs = []
if plot_optimisation:
# optimisation progress
for checkpoint_path in existing_checkpoint_paths(self.access_point.emodel_metadata):
p = Path(checkpoint_path)
fname = p.stem
fname += "__optimisation.pdf"
fpath = Path("./figures") / self.emodel / "optimisation" / fname
outputs.append(luigi.LocalTarget(fpath))

# parameter evolution
for seed in range(self.seed, self.seed + batch_size):
fname = self.access_point.emodel_metadata.as_string(seed=seed)
Expand Down Expand Up @@ -1381,6 +1371,8 @@ def run(self):
access_point=self.access_point,
mapper=self.get_mapper(),
figures_dir=Path("./figures") / self.emodel,
plot_optimisation_progress=False,
plot_parameter_evolution=False,
plot_distributions=True,
plot_traces=False,
plot_scores=False,
Expand Down

0 comments on commit 39c4237

Please sign in to comment.