Labeling Workforce

Python SDK methods for requesting and managing your labeling workforce.

You can request labeling service for your Annotate projects and manage the requested labeling workforce using the Labelbox Python SDK.

📘

Experimental feature

This is an experimental feature that requires you to enable experimental features before using its methods.

Methods

Get and request labeling service

Use project.labeling_service = project.get_labeling_service() to get the labeling service associated with the project. Then use labeling_service.request() to request a workforce of trained labelers for your data.

# Enable experimental features
client.enable_experimental = True

# Get labeling service
labeling_service = project.get_labeling_service()

# Validate all project requirements and request labeling service
labeling_service.request()

Get labeling service status

Use project.get_labeling_service_status() to check the status of your requested labeling service.

# Enable experimental features
client.enable_experimental = True

# Get status of requested labeling service
project.get_labeling_service_status()

This method returns the following value defined in the LabelingServiceStatus enum, corresponding to the statuses of your requested labeling service:

  • SET_UP: Your request has been submitted, but you need to set up your request by adding data rows, ontologies, and labeling instructions to proceed the request.
  • REQUESTED: Your request has been validated and is pending approval for connecting to labeling workforce.
  • ACCEPTED: Your request has satisfied the prerequisite and been accepted.
  • CALIBRATION: Labelers are labeling a sample of your data rows that you can review and confirm alignment on the expectation.
  • PRODUCTION: Labelers are labeling all data rows.
  • COMPLETE: Labelers have finished adding labels to your projects.

Get labeling service details

Use project.get_labeling_service_dashboard() to retrieve the following attributes of the project for which you requested labeling service:

  • id: The project ID
  • name: The project name
    status: The status of the labeling service
  • data_rows_count: The total number of data rows batched in the project
  • tasks_completed_count: The number of completed tasks (with the COMPLETE status)
  • tasks_remaining_count: The number of incomplete tasks (queued data rows with statuses other than COMPLETE)
  • tags: Project tags associated with the project
  • media_type: The media type of the project
  • client: The Labelbox client

If you are an admin, you can also use client.get_labeling_service_dashboard() to retrieve details of all projects with labeling service requested in your workspace.

# Enable experimental features
client.enable_experimental = True

# Get details of a project with labeling service requested
project.get_labeling_service_dashboard()

# Get details of all projects with labeling service requested
client.get_labeling_service_dashboard()