Skip to main content

AnnotationTaskStatus Objects

UNKNOWN

Returned when the Encord platform reports a task status that this SDK version does not recognize.

_missing_

Return UNKNOWN for any unrecognized annotation task status values.

AnnotationStage Objects

stage_type

An Annotate stage in a non-Consensus Project. You can use this stage in Consensus and non-Consensus Projects.

get_tasks

Returns the tasks in this Annotate stage that match the given filters. All filters are optional. If you pass several, only tasks that match all of them are returned. Arguments:
  • assignee - Only return tasks assigned to this user, or to any of these users. Pass user emails.
  • data_hash - Only return tasks for this data unit, or for any of these data units.
  • dataset_hash - Only return tasks for data units in this dataset, or in any of these datasets.
  • data_title - Only return tasks whose data unit title contains this text.
  • status - Only return tasks with this status, or with any of these statuses.
Returns:
  • Iterable[AnnotationTask] - The matching tasks. Tasks are fetched page by page as you iterate.

AnnotationTask Objects

Represents a task in a non-Consensus Annotate stage. Attributes
  • status (AnnotationTaskStatus): The current status of the task.
  • data_hash (UUID): Unique ID for the data unit.
  • data_title (str): Name of the data unit.
  • label_branch_name (str): Name of the label branch.
  • assignee (Optional[str]): User assigned to the task.
Allowed actions
  • submit: Submits a task for review.
  • assign: Assigns a task to a user.
  • release: Releases a task from the current user.
  • move: Moves the task to another stage in the workflow.

submit

Submits the task, which moves it to the next stage in the Workflow. Submitting doesn’t upload labels. Save the data unit’s label row with LabelRowV2.save() before you submit the task. Any rejected label reviews on the task are marked as resolved. Arguments:
  • assignee - The email of the user to assign the task to while submitting it.
  • retain_assignee - If True, keep the task’s current assignee while submitting it. Ignored if assignee is provided. Raises an error if the task has no assignee.
  • bundle - If not provided, the action is performed immediately. If provided, the action is deferred and performed together with the other operations in the bundle.

assign

Assigns the task to a user. Arguments:
  • assignee - The email of the user to assign the task to.
  • bundle - If not provided, the action is performed immediately. If provided, the action is deferred and performed together with the other operations in the bundle.

release

Releases the task from its current assignee, so that another user can pick it up. Arguments:
  • bundle - If not provided, the action is performed immediately. If provided, the action is deferred and performed together with the other operations in the bundle.

move

Moves the task directly to another stage in the Workflow. The task skips any stages in between. Webhooks don’t fire for moved tasks, and labels are approved automatically when a task is moved to a Complete stage. Arguments:
  • destination_stage_uuid - The UUID of the stage to move the task to.
  • bundle - If not provided, the action is performed immediately. If provided, the action is deferred and performed together with the other operations in the bundle.

issues

Returns the issue client for the task.