Skip to content

webknossos.administration.task

logger = <Logger webknossos.administration.task (WARNING)>
class TaskStatus:
TaskStatus( pending_instance_count: int, active_instance_count: int, finished_instance_count: int)

Method generated by attrs for class TaskStatus.

pending_instance_count: int
active_instance_count: int
finished_instance_count: int
open_instance_count: int
class TaskType:
TaskType( task_type_id: str, name: str, description: str, team_id: str, team_name: str)

Method generated by attrs for class TaskType.

task_type_id: str
name: str
description: str
team_id: str
team_name: str
class Task:

Data class containing information about a WEBKNOSSOS task

Task( task_id: str, project_id: str, dataset_name: str, status: webknossos.administration.task.TaskStatus, task_type: webknossos.administration.task.TaskType)

Method generated by attrs for class Task.

task_id: str
project_id: str
dataset_name: str
@classmethod
def get_by_id(cls, task_id: str) -> webknossos.administration.task.Task:

Returns the task specified by the passed id (if your token authorizes you to see it)

@classmethod
def create_from_annotations( cls, task_type_id: str, project_name: str, base_annotations: List[webknossos.annotation.annotation.Annotation], needed_experience_domain: str, needed_experience_value: int, instances: int = 1, script_id: Union[str, NoneType] = None, bounding_box: Union[webknossos.geometry.bounding_box.BoundingBox, NoneType] = None) -> list[webknossos.administration.task.Task]:

Submits tasks in WEBKNOSSOS based on existing annotations, and returns the Task objects

@classmethod
def create( cls, task_type_id: str, project_name: str, dataset_name: Union[str, webknossos.dataset.dataset.RemoteDataset], needed_experience_domain: str, needed_experience_value: int, starting_position: webknossos.geometry.vec3_int.Vec3Int, starting_rotation: webknossos.geometry.vec3_int.Vec3Int = Vec3Int(0,0,0), instances: int = 1, script_id: Union[str, NoneType] = None, bounding_box: Union[webknossos.geometry.bounding_box.BoundingBox, NoneType] = None) -> list[webknossos.administration.task.Task]:

Submits tasks in WEBKNOSSOS based on a dataset, starting position + rotation, and returns the Task objects

def get_annotation_infos(self) -> List[webknossos.annotation.annotation_info.AnnotationInfo]:

Returns AnnotationInfo objects describing all task instances that have been started by annotators for this task

def get_project(self) -> webknossos.administration.project.Project:

Returns the project this task belongs to