Skip to content
Snippets Groups Projects
Commit dd4965ab authored by pswain's avatar pswain
Browse files

change(pipeline): works for all Baby versions

parent 69a50d20
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ from pathos.multiprocessing import Pool ...@@ -19,7 +19,7 @@ from pathos.multiprocessing import Pool
from tqdm import tqdm from tqdm import tqdm
try: try:
if baby.__version__ == "v0.30.1": if baby.__version__:
from aliby.baby_sitter import BabyParameters, BabyRunner from aliby.baby_sitter import BabyParameters, BabyRunner
except AttributeError: except AttributeError:
from aliby.baby_client import BabyParameters, BabyRunner from aliby.baby_client import BabyParameters, BabyRunner
...@@ -420,6 +420,7 @@ class Pipeline(ProcessABC): ...@@ -420,6 +420,7 @@ class Pipeline(ProcessABC):
"state": loaded_writers["state"].datatypes.keys(), "state": loaded_writers["state"].datatypes.keys(),
"baby": ["mother_assign"], "baby": ["mother_assign"],
} }
breakpoint()
# START PIPELINE # START PIPELINE
frac_clogged_traps = 0.0 frac_clogged_traps = 0.0
...@@ -730,7 +731,8 @@ def check_earlystop(filename: str, es_parameters: dict, tile_size: int): ...@@ -730,7 +731,8 @@ def check_earlystop(filename: str, es_parameters: dict, tile_size: int):
) )
# find tiles with cells covering too great a fraction of the tiles' area # find tiles with cells covering too great a fraction of the tiles' area
traps_above_athresh = ( traps_above_athresh = (
cells_used.groupby("trap").sum().apply(np.mean, axis=1) / tile_size**2 cells_used.groupby("trap").sum().apply(np.mean, axis=1)
/ tile_size**2
> es_parameters["thresh_trap_area"] > es_parameters["thresh_trap_area"]
) )
return (traps_above_nthresh & traps_above_athresh).mean() return (traps_above_nthresh & traps_above_athresh).mean()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment