From 5a171354a2d809cd24141be1f71c4c80a19e621e Mon Sep 17 00:00:00 2001 From: Ran Lu Date: Sat, 23 Mar 2024 21:12:11 -0400 Subject: [PATCH] Do not set PATHs to N/A in the parameter file Use N/A if get failed. Put N/A in the parameter file confuses Abiss --- dags/sanitycheck_dag.py | 11 ++++------- dags/segmentation_dags.py | 6 +++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/dags/sanitycheck_dag.py b/dags/sanitycheck_dag.py index acf084c2..857ef2e6 100644 --- a/dags/sanitycheck_dag.py +++ b/dags/sanitycheck_dag.py @@ -166,9 +166,6 @@ def check_cv_data(): slack_message(":u7981:*ERROR: Cannot access the segmentation layer* `{}`".format(param["SEG_PATH"])) raise - if param.get("SKIP_WS", False): - param["AFF_PATH"] = "N/A" if "AFF_PATH" not in param else param["AFF_PATH"] - param["WS_PATH"] = "N/A" if "WS_PATH" not in param else param["WS_PATH"] param["AFF_MIP"] = 0 param["AFF_RESOLUTION"] = vol_seg.resolution.tolist() if "BBOX" not in param: @@ -319,13 +316,13 @@ def print_summary(): Segmentation: `{seg}` Region graph and friends: `{scratch}` '''.format( - aff = param["AFF_PATH"], + aff = param.get("AFF_PATH", "N/A"), resolution = ", ".join(str(x) for x in param["AFF_RESOLUTION"]), bbox = ", ".join(str(x) for x in data_bbox), size = ", ".join(str(data_bbox[i+3] - data_bbox[i]) for i in range(3)), - ws = paths["WS_PATH"], - seg = paths["SEG_PATH"], - scratch = paths["SCRATCH_PATH"], + ws = paths.get("WS_PATH", "N/A"), + seg = paths.get("SEG_PATH", "N/A"), + scratch = paths.get("SCRATCH_PATH", "N/A"), ) if param.get("SEM_PATH", None): diff --git a/dags/segmentation_dags.py b/dags/segmentation_dags.py index dc99b1bf..12a63150 100644 --- a/dags/segmentation_dags.py +++ b/dags/segmentation_dags.py @@ -473,7 +473,7 @@ def process_infos(param): Affinity mip level: {mip} Bounding box: [{bbox}]'''.format( name = param["NAME"], - aff = param["AFF_PATH"], + aff = param.get("AFF_PATH", "N/A"), bbox = ", ".join(str(x) for x in param["BBOX"]), mip = param.get("AFF_MIP",0) ) @@ -482,8 +482,8 @@ def process_infos(param): Watershed layer: `{ws}` Segmentation Layer: `{seg}`'''.format( name = param["NAME"], - ws = param["WS_PATH"], - seg = param["SEG_PATH"] + ws = param.get("WS_PATH", "N/A"), + seg = param.get("SEG_PATH", "N/A") ) no_rescale_msg = ":exclamation: Cannot rescale cluster"