Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/annotation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ def _build_label_schema(label_schema_fields):
field_type = d.get("type", None)
classes = d.get("classes", None) or None
attributes = d.get("attributes", None) or None
if isinstance(attributes, list) and len(attributes) == 1:
attributes = attributes[0]
if "name" in attributes:
attributes = {attributes["name"]: attributes}

if not field_name or not field_type:
return
Expand Down