Skip to content

Commit

Permalink
fix path check in evaluator creation
Browse files Browse the repository at this point in the history
Change-Id: Ib21c4994ab65adc615979f4d8d12237ddaad3bac
  • Loading branch information
Jaquier Aurélien Tristan committed Oct 10, 2023
1 parent f12e89b commit c37a06a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
5 changes: 4 additions & 1 deletion bluepyemodel/evaluation/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,10 @@ def get_evaluator_from_access_point(

mechanisms_directory = access_point.get_mechanisms_directory()
if isinstance(access_point, LocalAccessPoint):
if Path.cwd() != access_point.emodel_dir and access_point.emodel_metadata.iteration:
if (
Path.cwd() != access_point.emodel_dir.resolve()
and access_point.emodel_metadata.iteration
):
delete_compiled_mechanisms()
if not (access_point.emodel_dir / "x86_64" / "special").is_file():
compile_mechs_in_emodel_dir(mechanisms_directory)
Expand Down
2 changes: 1 addition & 1 deletion bluepyemodel/export_emodel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

def get_output_path_from_metadata(output_base_dir, emodel_metadata, seed):
"""Get the output path from the emodel_metadata.
Args:
output_base_dir (str): output base directory
emodel_metadata (EModelMetadata): emodel metadata
Expand Down
3 changes: 1 addition & 2 deletions bluepyemodel/tasks/emodel_creation/optimisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ def remote_script(self):
only_validated=False,
only_best=False,
seeds=list(range(args.seed, args.seed + args.batch_size)),
map_fucntion=mapper,
map_function=mapper,
)
if args.api_from_config == "nexus":
access_pt.store_emodels_sonata(
Expand All @@ -825,7 +825,6 @@ def remote_script(self):
map_function=mapper,
)


def output(self):
""" """
return StoreHocTarget(
Expand Down

0 comments on commit c37a06a

Please sign in to comment.