Skip to content

Commit

Permalink
Do not set PATHs to N/A in the parameter file
Browse files Browse the repository at this point in the history
Use N/A if get failed. Put N/A in the parameter file confuses Abiss
  • Loading branch information
ranlu committed Mar 24, 2024
1 parent ea9ef05 commit 5a17135
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 4 additions & 7 deletions dags/sanitycheck_dag.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions dags/segmentation_dags.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -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"
Expand Down

0 comments on commit 5a17135

Please sign in to comment.