Labeling Service

class labelbox.schema.labeling_service.LabelingService(*, id: str, projectId: str, createdAt: datetime, updatedAt: datetime, createdById: str, status: LabelingServiceStatus, client: Any)[source]

Bases: _CamelCaseMixin

Labeling service for a project. This is a service that can be requested to label data for a project.

dashboard() LabelingServiceDashboard[source]

Returns the dashboard for the labeling service associated with the project.

Raises:

ResourceNotFoundError – If the project does not have a labeling service.

classmethod get(client, project_id: str) LabelingService[source]

Returns the labeling service associated with the project.

Raises:

ResourceNotFoundError – If the project does not have a labeling service.

classmethod getOrCreate(client, project_id: str) LabelingService[source]

Returns the labeling service associated with the project. If the project does not have a labeling service, it will create one.

Returns:

The labeling service for the project.

Return type:

LabelingService

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'arbitrary_types_allowed': True, 'populate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'client': FieldInfo(annotation=Any, required=True, alias='client', alias_priority=1), 'created_at': FieldInfo(annotation=datetime, required=True, alias='createdAt', alias_priority=1), 'created_by_id': FieldInfo(annotation=str, required=True, alias='createdById', alias_priority=1, metadata=[MinLen(min_length=25), MaxLen(max_length=25)]), 'id': FieldInfo(annotation=str, required=True, alias='id', alias_priority=1, metadata=[MinLen(min_length=25), MaxLen(max_length=25)]), 'project_id': FieldInfo(annotation=str, required=True, alias='projectId', alias_priority=1, metadata=[MinLen(min_length=25), MaxLen(max_length=25)]), 'status': FieldInfo(annotation=LabelingServiceStatus, required=True, alias='status', alias_priority=1), 'updated_at': FieldInfo(annotation=datetime, required=True, alias='updatedAt', alias_priority=1)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

request() LabelingService[source]

Creates a request to labeling service to start labeling for the project. Our back end will validate that the project is ready for labeling and then request the labeling service.

Returns:

The labeling service for the project.

Return type:

LabelingService

Raises:

ResourceNotFoundError – If ontology is not associated with the project or if any projects required prerequisites are missing.

classmethod start(client, project_id: str) LabelingService[source]

Starts the labeling service for the project. This is equivalent to a UI action to Request Specialized Labelers

Returns:

The labeling service for the project.

Return type:

LabelingService

Raises:

Exception – If the service fails to start.