1. Create a QA Task

To reach the tasks and assignments repositories go to tasks and assignments.

To reach the tasks and assignments entities go to tasks and assignments.

In Dataloop there are two ways to create a QA task:

  1. You can create a QA task from the annotation task. This will collect all completed Items and create a QA Task.

  2. You can create a standalone QA task.
    ### QA task from the annotation task
    #### prep

import dtlpy as dl
import datetime
if dl.token_expired():
    dl.login()
project = dl.projects.get(project_name='<project_name>')
dataset = project.datasets.get(dataset_name='<dataset_name>')
# Get the annotation task, you can also get a task by name or from a list
task = project.tasks.get(task_id='<my-task-id>')

1.1. 2. Create a QA Task

This action will collect all completed Items and create a QA Task under the annotation task.

Note
Adding filters is optional. Learn all about filters here.
# Add filter for completed items
filters = dl.Filters()
filters.add(field='<metadata.system.annotationStatus>', values='<completed>')
# create a QA task - fill in the due date and assignees.
QAtask = dataset.tasks.create_qa_task(task=task,
                                      due_date=datetime.datetime(day=1, month=1, year=2029).timestamp(),
                                      assignee_ids=['<annotator1@dataloop.ai>', '<annotator2@dataloop.ai>'],
                                      filters=filters  # this filter is for "completed items"
                                      )

1.1.1. A standalone QA task

1.2. prep

import dtlpy as dl
import datetime
if dl.token_expired():
    dl.login()
project = dl.projects.get(project_name='<project_name>')
dataset = project.datasets.get(dataset_name='<dataset_name>')

1.3. 2. Add filter by directory

Note
Adding filters is optional. Learn all about filters here.
filters = dl.Filters(field='<metadata.system.annotationStatus>', values='<completed>')
filters.add(field='<dir>', values='</my/folder/directory>')

1.3.1. Create a QA Task

This action will collect all items on the folder and create a QA Task from them.

QAtask = dataset.tasks.create(
    task_type='<qa>',
    due_date=datetime.datetime(day=1, month=1, year=2029).timestamp(),
    assignee_ids=['<annotator1@dataloop.ai>', '<annotator2@dataloop.ai>'],
    filters=filters  # filter by folder directory or use other filters
)