From 17eac08bfb50b1c2340a441170c37b25d91f7220 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Al=C3=A1n=20Mu=C3=B1oz?= <alan.munoz@ed.ac.uk>
Date: Fri, 17 Mar 2023 18:39:35 +0000
Subject: [PATCH] fix(bclient):tiler-model shape assert only if z!=5

---
 src/aliby/baby_client.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/aliby/baby_client.py b/src/aliby/baby_client.py
index 2ea41b57..f2852826 100644
--- a/src/aliby/baby_client.py
+++ b/src/aliby/baby_client.py
@@ -139,11 +139,13 @@ class BabyRunner(StepABC):
             if parameters is None
             else parameters.model_config
         )
+
         tiler_z = self.tiler.shape[-3]
         model_name = self.model_config["flattener_file"]
-        assert (
-            f"{tiler_z}z" in model_name
-        ), f"Tiler z-stack ({tiler_z}) and Model shape ({model_name}) do not match "
+        if tiler_z != 5:
+            assert (
+                f"{tiler_z}z" in model_name
+            ), f"Tiler z-stack ({tiler_z}) and Model shape ({model_name}) do not match "
 
         self.brain = BabyBrain(**self.model_config)
         self.crawler = BabyCrawler(self.brain)
-- 
GitLab