Skip to content

Commit

Permalink
Fix: Fix NO_PROGRESS (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaudon authored Mar 13, 2024
1 parent dbcd073 commit d2dafbf
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
3 changes: 3 additions & 0 deletions emodel_generalisation/bluecellulab_evaluator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
"""Compute the threshold and holding current using bluecellulab, adapted from BluePyThresh."""

import logging
import os
from copy import copy
from multiprocessing.context import TimeoutError # pylint: disable=redefined-builtin
from pathlib import Path
Expand Down Expand Up @@ -325,4 +327,5 @@ def evaluate_currents(
"timeout": timeout,
"only_rin": only_rin,
},
progress_bar=os.environ.get("NO_PROGRESS", False),
)
3 changes: 2 additions & 1 deletion emodel_generalisation/model/bpopt.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ def calculate_bpo_score(self, responses):

if feature_value is None:
return self.max_score

if self.efel_feature_name == "peak_voltage":
print(feature_value, self.exp_mean, self.exp_std)
return abs(feature_value - self.exp_mean) / self.exp_std

def _construct_efel_trace(self, responses):
Expand Down
5 changes: 5 additions & 0 deletions emodel_generalisation/model/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1922,6 +1922,7 @@ def feature_evaluation(
resume=resume,
parallel_factory=parallel_factory,
db_url=db_url,
progress_bar=os.environ.get("NO_PROGRESS", False),
)
.sort_values(by="index")
.set_index("index")
Expand Down Expand Up @@ -2033,6 +2034,7 @@ def evaluate_rin_no_soma(
resume=resume,
parallel_factory=parallel_factory,
db_url=db_url,
progress_bar=os.environ.get("NO_PROGRESS", False),
)


Expand Down Expand Up @@ -2075,6 +2077,7 @@ def evaluate_soma_rin(
resume=resume,
parallel_factory=parallel_factory,
db_url=db_url,
progress_bar=os.environ.get("NO_PROGRESS", False),
)


Expand Down Expand Up @@ -2117,6 +2120,7 @@ def evaluate_ais_rin(
resume=resume,
parallel_factory=parallel_factory,
db_url=db_url,
progress_bar=os.environ.get("NO_PROGRESS", False),
)


Expand Down Expand Up @@ -2157,6 +2161,7 @@ def evaluate_somadend_rin(
resume=resume,
parallel_factory=parallel_factory,
db_url=db_url,
progress_bar=os.environ.get("NO_PROGRESS", False),
)


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"xgboost>=1.7.5,<2",
"pyyaml>=6",
"datareuse>=0.0.3",
"bluepyparallel>=0.2.1",
"bluepyparallel>=0.2.2",
"bluecellulab>=1.7.6,<=2.3.1",
"voxcell>=3.1.5",
"efel>=5.5.5",
Expand Down

0 comments on commit d2dafbf

Please sign in to comment.