Skip to content

Conversation

@lgluszek
Copy link
Contributor

AddTool.Type.RELATIONSHIP, which when passed to OntologyBuilder, will create a relationship tool.

How to test:

from labelbox import Client, Tool, OntologyBuilder, MediaType

client = Client(api_key="...", endpoint="http://localhost:8080/graphql")

object_features = [
    Tool(
        tool=Tool.Type.RELATIONSHIP,
        name="relationship",
        color="#ff0000",
    )
]

ontology_builder = OntologyBuilder(
    tools=object_features
)

ontology = client.create_ontology("Ontology from new features", ontology_builder.asdict(), media_type=MediaType.Image)

When run, will create a new ontology with a relationship tool

image

@lgluszek lgluszek self-assigned this Feb 16, 2023
@karenkyang
Copy link
Contributor

looks good to me

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

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

"source": [
"tool_name = \"super\"\n",
"ontology_builder = 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

@kkim-labelbox
Copy link
Contributor

One small comment. Also, looks like there are some merge conflicts

@lgluszek lgluszek requested a review from kkim-labelbox March 1, 2023 18:44
@lgluszek lgluszek merged commit 0ca5240 into develop Mar 1, 2023
@lgluszek lgluszek deleted the lgluszek/PTDT-1115 branch March 1, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants