Ontology

class labelbox.schema.ontology.FeatureSchema(client, field_values)[source]

Bases: DbObject

class labelbox.schema.ontology.Ontology(*args, **kwargs)[source]

Bases: DbObject

An ontology specifies which tools and classifications are available to a project. This is read only for now. .. attribute:: name

type:

str

description
Type:

str

updated_at
Type:

datetime

created_at
Type:

datetime

normalized
Type:

json

object_schema_count
Type:

int

classification_schema_count
Type:

int

projects

ToMany relationship to Project

Type:

Relationship

created_by

ToOne relationship to User

Type:

Relationship

classifications() List[Classification][source]

Get list of classifications in an Ontology.

tools() List[Tool][source]

Get list of tools (AKA objects) in an Ontology.

class labelbox.schema.ontology.OntologyBuilder(tools: ~typing.List[~labelbox.schema.ontology.Tool] = <factory>, classifications: ~typing.List[~labelbox.schema.ontology.Classification] = <factory>)[source]

Bases: object

A class to help create an ontology for a Project. This should be used for making Project ontologies from scratch. OntologyBuilder can also pull from an already existing Project’s ontology.

There are no required instantiation arguments.

To create an ontology, use the asdict() method after fully building your ontology within this class, and inserting it into project.setup() as the “labeling_frontend_options” parameter.

Example

builder = OntologyBuilder() … frontend = list(client.get_labeling_frontends())[0] project.setup(frontend, builder.asdict())

tools

(list)

Type:

List[labelbox.schema.ontology.Tool]

classifications

(list)

Type:

List[labelbox.schema.ontology.Classification]