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:
You upload tasks to project pools and training pools. They are grouped into task suites and assigned to Tolokers.
Parameters | Type | Description |
---|---|---|
public_name | Optional[str] | The name of the project. Visible to Tolokers. |
public_description | Optional[str] | The description of the project. Visible to Tolokers. |
public_instructions | Optional[str] | Instructions for Tolokers describe what to do in the tasks. You can use any HTML markup in the instructions. |
private_comment | Optional[str] | Comments about the project. Visible only to the requester. |
task_spec | Optional[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_type | AssignmentsIssuingType | Settings for assigning tasks. Default value: |
assignments_issuing_view_config | Optional[AssignmentsIssuingViewConfig] | The configuration of a task view on a map. Provide it if |
assignments_automerge_enabled | Optional[bool] | Merging tasks control. |
max_active_assignments_count | Optional[int] | The number of task suites simultaneously assigned to a Toloker. Note, that Toloka counts assignments having the |
quality_control | Optional[QualityControl] | Quality control rules. |
localization_config | Optional[LocalizationConfig] | Translations to other languages. |
metadata | Optional[Dict[str, List[str]]] | Additional information about the project. |
id | Optional[str] | The ID of the project. Read-only field. |
status | Optional[ProjectStatus] | A project status. Read-only field. |
created | Optional[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)
Method | Description |
---|---|
add_requester_translation | Adds a project interface translation to other language. |
set_default_language | Sets the main language used in the project parameters. |
Last updated: August 28, 2023