Labeling parameters

Alex Cota Updated by Alex Cota

In order to customize your Label queue, you need to specify the labeling parameters. For an overview of queue prioritization, see our docs on the Queue system.

The setLabelingParameterOverrides mutation allows you to do the following:

  • Configure the number of times an individual asset gets labeled.
  • Prioritize your queue by assigning priority scores to individual assets.

In order to set prioritization for data rows, you must provide the following required information:

Field

Definition

dataRow

ID of the data row you wish to set priority for. Max number of Data Rows you can include is 1000. Note: externalId not supported.

priority

A prioritization score (integer).

numLabels

Total number of times a data row should be labeled.

Fetch parameter overrides

Use this query to fetch any existing labeling parameter overrides.

query PullLabelingParameters{
project(where:{id:"<PROJECT_ID>"}){
labelingParameterOverrides{
id
priority
}
}
}

Set parameter overrides

When using the setLabelingParameterOverrides mutation, you’ll need to rebuild the queue yourself. Follow these recommended steps:

  1. Upload assets in bulk.
  2. Set all parameter overrides in one mutation. Success will only return an error if the request was not properly received and processed. It was still return true if you submit one or more Data Rows that do not exist. Note: to avoid stalling your project, make sure the value for numLabels is no more than the amount of active labelers in the project.
The max number of Data Rows is 1000 for setLabelingParameterOverrides.
mutation SetLabelingParameterOverrides {
project(where: { id: "<PROJECT_ID>" }) {
setLabelingParameterOverrides(data: [
{
dataRow: { id: "<DATA_ROW_ID>" },
priority: 1,
numLabels: 2
},
{
dataRow: { id: "<DATA_ROW_ID>" },
priority: 2,
numLabels: 3
}
]) {
success
}
}
}
  1. Rebuild the queue. For more information on how to do this programmatically, contact our support team via the chat box in the corner of this screen.

Unset parameter overrides

Use the unsetLabelingParameterOverrides mutation to unset the prioritization for a set of Data Rows. Using this mutation will automatically result in the rebuild of the Label queue.

The max number of Data Rows is 1000 for unsetLabelingParameterOverrides.
mutation UnsetLabelingParameterOverrides {
project(where: { id: "<PROJECT_ID>" }) {
unsetLabelingParameterOverrides(data: [
{
dataRowId: "<DATA_ROW_ID>"
},
{
dataRowId: "<DATA_ROW_ID>"
}
]) {
success
deletedCount
}
}
}

Unset all parameter overrides

Use the unsetAllLabelingParameterOverrides to unset all of the labeling parameter overrides on a project.

mutation {
project(where: {id: "<project-id>"}) {
unsetAllLabelingParameterOverrides {
success
deletedCount
}
}
}

Was this page helpful?

Bulk import requests

Labels

Contact