Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion examples/annotation_import/image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,10 @@
" name=\"point\"), \n",
" lb.Tool( # Polyline tool given the name \"line\"\n",
" tool=lb.Tool.Type.LINE,\n",
" name=\"polyline\")]\n",
" name=\"polyline\"),\n",
" lb.Tool( # Relationship tool given the name \"relationship\"\n",
" tool=lb.Tool.Type.RELATIONSHIP,\n",
" name=\"relationship\")]\n",
")\n",
"\n",
"ontology = client.create_ontology(\"Image Prediction Import Demo\", ontology_builder.asdict(), media_type=lb.MediaType.Image)"
Expand Down
6 changes: 4 additions & 2 deletions examples/annotation_import/pdf.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,14 @@
{
"metadata": {},
"source": [
"tool_name = \"super\"\n",
"ontology_builder = lb.OntologyBuilder(\n",
" tools=[ \n",
Copy link
Contributor

@kkim-labelbox kkim-labelbox Feb 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tool Type should RELATIONSHIP here


Reply via ReviewNB

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 69373ed

" lb.Tool( # Entity tool given the name \"NER\"\n",
" tool=lb.Tool.Type.NER, \n",
" name= tool_name)]\n",
" name= \"NER\"),\n",
" lb.Tool( # Relationship tool given the name \"relationship\"\n",
" tool=lb.Tool.Type.RELATIONSHIP, \n",
" name=\"relationship\")]\n",
" )"
],
"cell_type": "code",
Expand Down
6 changes: 4 additions & 2 deletions examples/basics/ontologies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
"| Polyline | line |\n",
"| Point | point |\n",
"| Segmentation mask | superpixel |\n",
"| Entity | named-entity |"
"| Entity | named-entity |\n",
"| Relationship | edge |"
],
"cell_type": "markdown"
},
Expand Down Expand Up @@ -315,7 +316,8 @@
"seg_tool = lb.Tool(tool=lb.Tool.Type.SEGMENTATION, name=\"dog_seg\")\n",
"point_tool = lb.Tool(tool=lb.Tool.Type.POINT, name=\"dog_center\")\n",
"line_tool = lb.Tool(tool=lb.Tool.Type.LINE, name=\"dog_orientation\")\n",
"ner_tool = lb.Tool(tool=lb.Tool.Type.NER, name=\"dog_reference\")"
"ner_tool = lb.Tool(tool=lb.Tool.Type.NER, name=\"dog_reference\")\n",
"relationship_tool = lb.Tool(tool=lb.Tool.Type.RELATIONSHIP, name=\"relationship\")"
],
"cell_type": "code",
"outputs": [],
Expand Down
5 changes: 4 additions & 1 deletion examples/prediction_upload/video_predictions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,10 @@
" name=\"point_video\"), \n",
" lb.Tool( # Polyline tool given the name \"line\"\n",
" tool=lb.Tool.Type.LINE,\n",
" name=\"line_video_frame\")]\n",
" name=\"line_video_frame\"),\n",
" lb.Tool( # Relationship tool given the name \"relationship\"\n",
" tool=lb.Tool.Type.RELATIONSHIP,\n",
" name=\"relationship_video\")]\n",
")\n",
"\n",
"ontology = client.create_ontology(\"Video Prediction Import Demo\", ontology_builder.asdict(), media_type=lb.MediaType.Video)\n",
Expand Down
1 change: 1 addition & 0 deletions labelbox/schema/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ class Type(Enum):
BBOX = "rectangle"
LINE = "line"
NER = "named-entity"
RELATIONSHIP = "edge"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update the notebooks with Tool.Type.RELATIONSHIP? For instance, I see ontologies.ipynb lists out all possible Tool types

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated 4 notebooks:

  • examples/annotation_import/image.ipynb
  • examples/annotation_import/pdf.ipynb
  • examples/basics/ontologies.ipynb
  • examples/prediction_upload/video_predictions.ipynb


tool: Type
name: str
Expand Down