From 44cd96b72538b550e9a44c1b14542681c0700225 Mon Sep 17 00:00:00 2001 From: dachengx Date: Fri, 24 Jan 2025 11:28:29 -0600 Subject: [PATCH] Debug --- straxen/config/protocols.py | 1 + tests/plugins/peak_building.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/straxen/config/protocols.py b/straxen/config/protocols.py index 8ac0e9177..4d031d445 100644 --- a/straxen/config/protocols.py +++ b/straxen/config/protocols.py @@ -97,6 +97,7 @@ def open_neural_net(model_path: str, custom_objects=None, **kwargs): """Open a tensorflow file and return a keras model.""" # Nested import to reduce loading time of import straxen and it not # base requirement + import jax # noqa: F401 import tensorflow as tf if not os.path.exists(model_path): diff --git a/tests/plugins/peak_building.py b/tests/plugins/peak_building.py index e93d7a523..77c97ea17 100644 --- a/tests/plugins/peak_building.py +++ b/tests/plugins/peak_building.py @@ -68,7 +68,7 @@ def test_tight_coincidence(self: PluginTestCase): peaklets = self.st.get_array(self.run_id, "peaklets", progress_bar=False) message = "There might be some issue in tight_coincidence." sum_tight_coincidence = np.sum(peaklets["tight_coincidence"]) - assert np.abs(sum_tight_coincidence - 1990) < 5, message + assert sum_tight_coincidence == 1991, message if __name__ == "__main__":