Assignment

toloka.client.assignment.Assignment | Source code

Assignment(
self,
*,
id: Optional[str] = None,
task_suite_id: Optional[str] = None,
pool_id: Optional[str] = None,
user_id: Optional[str] = None,
status: Union[Status, str, None] = None,
reward: Optional[Decimal] = None,
bonus_ids: Optional[List[str]] = None,
tasks: Optional[List[Task]] = None,
automerged: Optional[bool] = None,
created: Optional[datetime] = None,
submitted: Optional[datetime] = None,
accepted: Optional[datetime] = None,
rejected: Optional[datetime] = None,
skipped: Optional[datetime] = None,
expired: Optional[datetime] = None,
first_declined_solution_attempt: Optional[List[Solution]] = None,
solutions: Optional[List[Solution]] = None,
mixed: Optional[bool] = None,
owner: Optional[Owner] = None,
public_comment: Optional[str] = None
)

Information about an assigned task suite.

Parameters description

ParametersTypeDescription
idOptional[str]

The ID of the assignment.

task_suite_idOptional[str]

The ID of the assigned task suite.

pool_idOptional[str]

The ID of the pool containing the task suite.

user_idOptional[str]

The ID of the Toloker who was assigned the task suite.

statusOptional[Status]

Status of the assignment.

  • ACTIVE — The task suite is assigned but it isn't completed yet.
  • SUBMITTED — The task suite is completed but it isn't checked.
  • ACCEPTED — The task suite is accepted by the requester.
  • REJECTED — The task suite is rejected by the requester.
  • SKIPPED — The task suite is skipped by the Toloker.
  • EXPIRED — Time for completing the tasks has expired.
rewardOptional[Decimal]

Payment received by the Toloker.

bonus_idsOptional[List[str]]

IDs of bonuses issued for the task.

tasksOptional[List[Task]]

Data for the tasks.

automergedOptional[bool]

Flag of the response received as a result of merging identical tasks. Value:

  • True — The response was recorded when identical tasks were merged.
  • False — Normal Toloker response.
createdOptional[datetime]

The date and time when the task suite was assigned to a Toloker.

submittedOptional[datetime]

The date and time when the task suite was completed by a Toloker.

acceptedOptional[datetime]

The date and time when the responses for the task suite were accepted by the requester.

rejectedOptional[datetime]

The date and time when the responses for the task suite were rejected by the requester.

skippedOptional[datetime]

The date and time when the task suite was skipped by the Toloker.

expiredOptional[datetime]

The date and time when the time for completing the task suite expired.

first_declined_solution_attemptOptional[List[Solution]]

For training tasks. The Toloker's first responses in the training task (only if these were the wrong answers). If the Toloker answered correctly on the first try, the first_declined_solution_attempt array is omitted. Arrays with the responses (output_values) are arranged in the same order as the task data in the tasks array.

solutionsOptional[List[Solution]]

Toloker responses. Arranged in the same order as the data for tasks in the tasks array.

mixedOptional[bool]

Type of operation for creating a task suite:

  • True — Smart mixing was used.
  • False — The tasks were grouped manually, smart mixing was not used.
ownerOptional[Owner]

Properties of Requester.

public_commentOptional[str]

A public comment that is set when accepting or rejecting the assignment.

Examples:

for assignment in toloka_client.get_assignments(pool_id='1240045', status='SUBMITTED'):
print(assignment.id)
for solution in assignment.solutions:
print(solution)

Last updated: August 28, 2023

Toloka-Kit
OverviewGetting API keyQuick start
Recipes
Reference
toloka.client
toloka.async_client
toloka.autoquality [autoquality]
toloka.metrics
toloka.streaming