From dd4965ab2e9c44473beb3e5d0d8a93ae03810e71 Mon Sep 17 00:00:00 2001
From: Peter Swain <peter.swain@ed.ac.uk>
Date: Fri, 23 Feb 2024 14:09:27 +0000
Subject: [PATCH] change(pipeline): works for all Baby versions

---
 src/aliby/pipeline.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/aliby/pipeline.py b/src/aliby/pipeline.py
index c05bc3b..ace2816 100644
--- a/src/aliby/pipeline.py
+++ b/src/aliby/pipeline.py
@@ -19,7 +19,7 @@ from pathos.multiprocessing import Pool
 from tqdm import tqdm
 
 try:
-    if baby.__version__ == "v0.30.1":
+    if baby.__version__:
         from aliby.baby_sitter import BabyParameters, BabyRunner
 except AttributeError:
     from aliby.baby_client import BabyParameters, BabyRunner
@@ -420,6 +420,7 @@ class Pipeline(ProcessABC):
                 "state": loaded_writers["state"].datatypes.keys(),
                 "baby": ["mother_assign"],
             }
+            breakpoint()
 
             # START PIPELINE
             frac_clogged_traps = 0.0
@@ -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
     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"]
     )
     return (traps_above_nthresh & traps_above_athresh).mean()
-- 
GitLab