Skip to content

Commit

Permalink
Set DEFAULT_PIN_LABELS to None
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin committed Apr 3, 2024
1 parent 1178dc6 commit 8515eed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/galaxy/tool_util/parser/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

DEFAULT_METRIC = "mae"
DEFAULT_EPS = 0.01
DEFAULT_PIN_LABELS = ""
DEFAULT_PIN_LABELS = None


def is_dict(item):
Expand Down
7 changes: 5 additions & 2 deletions lib/galaxy/tool_util/verify/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,11 @@ def intersection_over_union(
return min(_multiobject_intersection_over_union(mask1, mask2, pin_labels))


def _parse_label_list(label_list_str: str) -> List[int]:
return [int(label.strip()) for label in label_list_str.split(",") if len(label_list_str) > 0]
def _parse_label_list(label_list_str: Optional[str]) -> List[int]:
if label_list_str is None:
return []
else:
return [int(label.strip()) for label in label_list_str.split(",") if len(label_list_str) > 0]


def get_image_metric(
Expand Down

0 comments on commit 8515eed

Please sign in to comment.