Skip to main content

ConsensusReviewTaskStatus Objects

UNKNOWN

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

_missing_

Return UNKNOWN for any unrecognized consensus review task status values.

ConsensusReviewStage Objects

stage_type

The Review stage for Consensus Workflows.

get_tasks

Returns the tasks in this Consensus Review 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[ConsensusReviewTask] - The matching tasks. Tasks are fetched page by page as you iterate. Each task’s options are the label branches of its annotators, with the annotator, branch name, and label hash.

ConsensusReviewTask Objects

Represents tasks in the Review stage of a Consensus Project. Attributes
  • status (ConsensusReviewTaskStatus): The status of the review task.
  • data_hash (UUID): Unique ID for the data unit.
  • data_title (str): Name of the data unit.
  • assignee (Optional[str]): The user assigned to the task.
  • options (List[ConsensusReviewOption]): Specify the labels for the task.
Allowed actions
  • approve: Approves a task.
  • reject: Rejects a task.
  • assign: Assigns a task to a user.
  • release: Releases a task from the current user.
  • move: Moves the review task to another stage in the workflow.

approve

Approves the task and moves it along the stage’s approval pathway. Before you approve the task, save the labels you chose to the data unit’s main label row. Arguments:
  • assignee - The email of the user to assign the task to while approving it.
  • retain_assignee - If True, keep the task’s current assignee while approving 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.

reject

Rejects the task and moves it along the stage’s rejection pathway. Arguments:
  • assignee - The email of the user to assign the task to while rejecting it.
  • retain_assignee - If True, keep the task’s current assignee while rejecting 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 Consensus Review 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.