Skip to main content

Project Objects

class Project(base_orm.BaseORM)
DEPRECATED - prefer using the encord.project.Project class instead. A project defines a label ontology and is a collection of datasets and label rows. ORM:
  • title,
  • description,
  • editor_ontology,
  • ontology_hash,
  • datasets::
    [
       {
            dataset_hash (uid),
            title,
            description,
            dataset_type (internal vs. AWS/GCP/Azure),
       },
       ...
    ],
  • label_rows::
    [
        {
            label_hash (uid),
            data_hash (uid),
            dataset_hash (uid),
            dataset_title,
            data_title,
            data_type,
            label_status
        },
        ...
    ]
  • annotation_task_status

get_labels_list

def get_labels_list() -> List[Optional[str]]
Returns a list of all optional label row IDs (label_hash uid) in a project. If no label_hash is found, a None value is appended. This can be useful for working with fetching additional label row data via :meth:encord.project.Project.get_label_rows for example.

        project = client_instance.get_project(<project_hash>)
        project_orm = project.get_project()

        labels_list = project_orm.get_labels_list()
        created_labels_list = []
        for label in labels_list:
            if label is not None:  # None values will fail the operation
                created_labels_list.append(label)

        label_rows = project.get_label_rows(created_labels_list, get_signed_url=False)

workflow_manager_uuid

@property
def workflow_manager_uuid() -> UUID
Accessing this property will raise a WrongProjectTypeError if the project is not a workflow project.

CopyDatasetAction Objects

class CopyDatasetAction(str, Enum)

ATTACH

Attach the datasets associated with the original project to the copy project.

CLONE

Clone the data units from the associated datasets into a new dataset an attach it to the copy project.

CopyDatasetOptions Objects

@dataclass
class CopyDatasetOptions()
Options for copying the datasets associated with a project.

action

One of CopyDatasetAction.ATTACH or CopyDatasetAction.CLONE. (defaults to ATTACH)

datasets_to_data_hashes_map

A dictionary of { <dataset_hash>: List[<data_unit_hash>]}. When provided with a CLONE action this will filter the copied data units. When combined with CopyLabelsOptions, only labels from specific data units will be copied.

CopyLabelsOptions Objects

@dataclass
class CopyLabelsOptions()
Options for copying the labels associated with a project.

accepted_label_hashes

A list of label hashes that will be copied to the new project

accepted_label_statuses

A list of label statuses to filter the labels copied to the new project, defined in ReviewApprovalState

CopyProjectPayload Objects

@dataclass
class CopyProjectPayload()
WARN: do not use, this is only for internal purpose.

ManualReviewWorkflowSettings Objects

class ManualReviewWorkflowSettings()
Sets the project QA workflow to ā€œmanual reviewsā€. There are currently no available settings for this workflow

BenchmarkQaWorkflowSettings Objects

@dataclass
class BenchmarkQaWorkflowSettings()
Sets the project QA workflow to ā€œAutomaticā€, with benchmark data being presented to all the annotators

source_projects

For Benchmark QA projects, a list of project ids (project_hash-es) that contain the benchmark source data

ProjectWorkflowSettings

A variant type that allows you to select the type of quality assurance workflow for the project, and configure it. Currently one of: :class:ManualReviewWorkflowSettings: a workflow with optional manual reviews :class:BenchmarkQaWorkflowSettings: annotators are presented with ā€œbenchmarkā€ or ā€œhoneypotā€ data

ReviewMode Objects

class ReviewMode(str, Enum)
UNLABELLED: The labels are added to the images. However, the one person must still go over all of the labels before submitting them for review. LABELLED: The labels are added to the images and are marked as labelled. A reviewer will still need to approve those. REVIEWED: The labels are added to the images and considered reviewed. No more action is required from the labeler or reviewer.

CvatReviewMode Objects

class CvatReviewMode(CamelStrEnum)
UNLABELLED: The labels are added to the images. However, the one person must still go over all the labels before submitting them for review. LABELLED: The labels are added to the images and are marked as labelled. A reviewer will still need to approve those. REVIEWED: The labels are added to the images and considered reviewed. No more action is required from the labeler or reviewer.

CvatImportGetResultResponse Objects

class CvatImportGetResultResponse(BaseDTO)
Response model for CVAT import operation status. Attributes:
  • status CvatImportGetResultLongPollingStatus - Import status (ā€œDONEā€, ā€œERRORā€, ā€œPENDINGā€)
  • project_uuid Optional[UUID] - Created project ID. Only present when status=ā€œDONEā€
  • issues Optional[Dict] - Import issues. Present for ā€œDONEā€ (warnings) or ā€œERRORā€ (failures)

ProjectFilterParams Objects

class ProjectFilterParams(BaseDTO)
Filter parameters for the /v2/public/projects endpoint

ProjectUserResponse Objects

class ProjectUserResponse(BaseDTO)
This one should be merged with ProjectUser class But at the moment server doesn’t return ā€œproject_hashā€ field (which is correct I suppose), that ProjectUser expects TODO: deprecate project_hash field from ProjectUsers and merge this two together