From 8f7dba9b02c13eb823e9a3fb2050ad7678457364 Mon Sep 17 00:00:00 2001 From: Christopher Rhodes <christopher.rhodes@embl.de> Date: Thu, 26 Oct 2023 10:42:28 +0200 Subject: [PATCH] Restored batch example to a working state, confirmed batch jobs run --- extensions/chaeo/examples/batch_run_patches.py | 8 +++----- extensions/chaeo/workflows.py | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/extensions/chaeo/examples/batch_run_patches.py b/extensions/chaeo/examples/batch_run_patches.py index 48efac25..dcb35207 100644 --- a/extensions/chaeo/examples/batch_run_patches.py +++ b/extensions/chaeo/examples/batch_run_patches.py @@ -4,11 +4,9 @@ from model_server.util import autonumber_new_directory, get_matching_files, loop from extensions.chaeo.workflows import export_patches_from_multichannel_zstack if __name__ == '__main__': - # where_czi = 'z:/rhodes/projects/proj0004-marine-photoactivation/data/exp0038/AutoMic/20230906-163415/Selection' - where_czi = 'c:/Users/rhodes/projects/proj0012-trec-handoff/owncloud-sync/TREC-HD/Images/TREC_STOP_15_Kristineberg/230805_automic_AI_PA/20230805-122525_AI_PA_successfulrun_recognitiononPLL405cilindionas/Selection' + where_czi = 'z:/rhodes/projects/proj0004-marine-photoactivation/data/exp0038/AutoMic/20230906-163415/Selection' where_output = autonumber_new_directory( - # 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0009/output', - 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0016/output', + 'c:/Users/rhodes/projects/proj0011-plankton-seg/exp0009/output', 'batch-output' ) @@ -31,7 +29,6 @@ if __name__ == '__main__': 'export_patch_masks': True, } - # input_files = get_matching_files(where_czi, 'czi', coord_filter={'P': (0, 10)}, ) input_files = get_matching_files(where_czi, 'czi', coord_filter={'P': (0, 10)}, ) loop_workflow( @@ -39,6 +36,7 @@ if __name__ == '__main__': where_output, export_patches_from_multichannel_zstack, params, + catch_and_continue=False, ) print('Finished') \ No newline at end of file diff --git a/extensions/chaeo/workflows.py b/extensions/chaeo/workflows.py index 7486395e..21880fed 100644 --- a/extensions/chaeo/workflows.py +++ b/extensions/chaeo/workflows.py @@ -23,8 +23,8 @@ def export_patches_from_multichannel_zstack( pxmap_threshold: float, pixel_class: int, zmask_channel: int, - zmask_zindex: None, # None for MIP, patches_channel: int, + zmask_zindex: int = None, # None for MIP, rescale_zmask_clip: int = None, mask_type: str = 'boxes', zmask_filters: Dict = None, -- GitLab