From 837bc1a99b401239cca428e064736587171d0141 Mon Sep 17 00:00:00 2001 From: William Patton Date: Thu, 2 Jan 2025 12:34:49 -0800 Subject: [PATCH] only test for existance of snapshots when running train --- tests/operations/test_mini.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/operations/test_mini.py b/tests/operations/test_mini.py index bf1edffb..06eee3fc 100644 --- a/tests/operations/test_mini.py +++ b/tests/operations/test_mini.py @@ -78,21 +78,21 @@ def test_mini( if func == "train": train_run(run) + array_store = create_array_store() + snapshot_container = array_store.snapshot_container(run.name).container + assert snapshot_container.exists() + assert all( + x in zarr.open(snapshot_container) + for x in [ + "0/volumes/raw", + "0/volumes/gt", + "0/volumes/target", + "0/volumes/weight", + "0/volumes/prediction", + "0/volumes/gradients", + "0/volumes/mask", + ] + ) elif func == "validate": validate_run(run, 1) - array_store = create_array_store() - snapshot_container = array_store.snapshot_container(run.name).container - assert snapshot_container.exists() - assert all( - x in zarr.open(snapshot_container) - for x in [ - "0/volumes/raw", - "0/volumes/gt", - "0/volumes/target", - "0/volumes/weight", - "0/volumes/prediction", - "0/volumes/gradients", - "0/volumes/mask", - ] - )