Project

toloka.client.project.Project | Source code

Project(
self,
*,
public_name: Optional[str] = None,
public_description: Optional[str] = None,
task_spec: Optional[TaskSpec] = None,
assignments_issuing_type: Union[AssignmentsIssuingType, str] = AssignmentsIssuingType.AUTOMATED,
assignments_issuing_view_config: Optional[AssignmentsIssuingViewConfig] = None,
assignments_automerge_enabled: Optional[bool] = None,
max_active_assignments_count: Optional[int] = None,
quality_control: Optional[QualityControl] = None,
metadata: Optional[Dict[str, List[str]]] = None,
status: Optional[ProjectStatus] = None,
created: Optional[datetime] = None,
id: Optional[str] = None,
public_instructions: Optional[str] = None,
private_comment: Optional[str] = None,
localization_config: Optional[LocalizationConfig] = None
)

Top-level object in Toloka that describes one requester's objective.

If your task is complex, consider to decompose it into several projects. For example, one project finds images with some objects, another project describes image segmentation, and the third project checks this segmentation.

In a project, you set properties for tasks and responses:

  • Input data parameters describe what kind of input data you have: images, text, and other.
  • Output data parameters describe Tolokers' responses. They are used to validate a data type, range of values, string length, and so on.
  • Task interface. To learn how to define the appearance of tasks, see Task interface in the guide.

You upload tasks to project pools and training pools. They are grouped into task suites and assigned to Tolokers.

Parameters description

ParametersTypeDescription
public_nameOptional[str]

The name of the project. Visible to Tolokers.

public_descriptionOptional[str]

The description of the project. Visible to Tolokers.

public_instructionsOptional[str]

Instructions for Tolokers describe what to do in the tasks. You can use any HTML markup in the instructions.

private_commentOptional[str]

Comments about the project. Visible only to the requester.

task_specOptional[TaskSpec]

Input and output data specification and the task interface. The interface can be defined with HTML, CSS, and JS or using the Template Builder components.

assignments_issuing_typeAssignmentsIssuingType

Settings for assigning tasks.

Default value: AUTOMATED.

assignments_issuing_view_configOptional[AssignmentsIssuingViewConfig]

The configuration of a task view on a map. Provide it if assignments_issuing_type=MAP_SELECTOR.

assignments_automerge_enabledOptional[bool]

Merging tasks control.

max_active_assignments_countOptional[int]

The number of task suites simultaneously assigned to a Toloker. Note, that Toloka counts assignments having the ACTIVE status only.

quality_controlOptional[QualityControl]

Quality control rules.

localization_configOptional[LocalizationConfig]

Translations to other languages.

metadataOptional[Dict[str, List[str]]]

Additional information about the project.

idOptional[str]

The ID of the project. Read-only field.

statusOptional[ProjectStatus]

A project status. Read-only field.

createdOptional[datetime]

The UTC date and time when the project was created. Read-only field.

Examples:

Creating a new project.

new_project = toloka.client.project.Project(
assignments_issuing_type=toloka.client.project.Project.AssignmentsIssuingType.AUTOMATED,
public_name='My best project',
public_description='Describe the picture',
public_instructions='Describe in a few words what is happening in the image.',
task_spec=toloka.client.project.task_spec.TaskSpec(
input_spec={'image': toloka.client.project.field_spec.UrlSpec()},
output_spec={'result': toloka.client.project.field_spec.StringSpec()},
view_spec=project_interface,
),
)
new_project = toloka_client.create_project(new_project)
print(new_project.id)

Methods summary

MethodDescription
add_requester_translationAdds a project interface translation to other language.
set_default_languageSets the main language used in the project parameters.

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