Project Management

get_info

Retrieves project information based on the project key, such as the project type, asset groups, tags, and project's statistics.

Arguments

None

Return

Project object containing the relevant project information with the following structure:

Project(
    id='proj_9004a21df7b040ace4674c4879603fe8',
    name='keypoints',
    workspace_id='ws_1c8aab980f174b0296c7e35e88665b13',
    type='ObjectDetection',
    create_date=1701927649302,
    localization='MULTI',
    tags=['cat faces'],
    groups=['main', 'cats'],
    statistic=Statistic(
        tags_count=[TagsCountItem(name='cat faces', count=0)],
        total_assets=28,
        annotated_assets=0,
        total_annotations=0
    )
)
AttributeTypeDescription
idstrUnique ID of the project.
namestrName of the project. You can modify this by calling the function project.update({"name": "YOUR_NEW_PROJECT_NAME"}), or you can directly modify this on Nexus by clicking on the Settings tab on the left sidebar of the Project Dashboard.
workspace_idstrUnique ID of the current workspace that this project is in.
typestrType of project. This can be one of ObjectDetection, InstanceSegmentation, Classification, or Keypoint depending on the type selected during project creation on Nexus.
create_dateintUNIX timestamp of project creation date.
localizationstrRegion(s) for data localization. Defaults to MULTI for multi-region.
tagslist[str]List of tag names in the project.
groupslist[strList of asset group names in the project.
statisticStatistic objectContains project statistics for the following categories:
- tags_count: List of TagCountItem objects representing tag counts for each tag in the project.
- total_assets: Total number of assets in the project.
- annotated_assets: Total number of annotated assets in the project.
- total_annotations: Total number of annotations in the project.

Examples

Retrieve project information from the project with project key 9004a21df7b040ace4674c4879603fe8

from datature.nexus import Client

SECRET_KEY = "01048a3572a00dec13a6ca204fa78c0c4c216475c2ca80cb618114d26783d5a2"
PROJECT_ID = "proj_9004a21df7b040ace4674c4879603fe8"
client = Client(SECRET_KEY)
project = client.get_project(PROJECT_ID)

project.get_info()

update

Updates the metadata of the project, such as the name of the project.

Arguments

NameTypeDescription
projectdict |ProjectMetadataThe metadata of the project.

Return

Project object containing the relevant project information with the following structure:

Project(
    id='proj_9004a21df7b040ace4674c4879603fe8',
    name='My Cool Project',
    workspace_id='ws_1c8aab980f174b0296c7e35e88665b13',
    type='ObjectDetection',
    create_date=1701927649302,
    localization='MULTI',
    tags=['cat faces'],
    groups=['main', 'cats'],
    statistic=Statistic(
        tags_count=[TagsCountItem(name='cat faces', count=0)],
        total_assets=28,
        annotated_assets=0,
        total_annotations=0
    )
)
AttributeTypeDescription
idstrUnique ID of the project.
namestrName of the project. You can modify this by calling the function project.update({"name": "YOUR_NEW_PROJECT_NAME"}), or you can directly modify this on Nexus by clicking on the Settings tab on the left sidebar of the Project Dashboard.
workspace_idstrUnique ID of the current workspace that this project is in.
typestrType of project. This can be one of ObjectDetection, InstanceSegmentation, Classification, or Keypoint depending on the type selected during project creation on Nexus.
create_dateintUNIX timestamp of project creation date.
localizationstrRegion(s) for data localization. Defaults to MULTI for multi-region.
tagslist[str]List of tag names in the project.
groupslist[strList of asset group names in the project.
statisticStatistic objectContains project statistics for the following categories:
- tags_count: List of TagCountItem objects representing tag counts for each tag in the project.
- total_assets: Total number of assets in the project.
- annotated_assets: Total number of annotated assets in the project.
- total_annotations: Total number of annotations in the project.

Examples

Updating the name of the project 9004a21df7b040ace4674c4879603fe8 to My Cool Project by providing the metadata as a dictionary.

from datature.nexus import Client

SECRET_KEY = "01048a3572a00dec13a6ca204fa78c0c4c216475c2ca80cb618114d26783d5a2"
PROJECT_ID = "proj_9004a21df7b040ace4674c4879603fe8"
client = Client(SECRET_KEY)
project = client.get_project(PROJECT_ID)

project.update({"name":"My Cool Project"})

Updating the name of the project 9004a21df7b040ace4674c4879603fe8 to My Cool Project by providing the metadata as a ProjectMetadata object.

from datature.nexus import Client

SECRET_KEY = "01048a3572a00dec13a6ca204fa78c0c4c216475c2ca80cb618114d26783d5a2"
PROJECT_ID = "proj_9004a21df7b040ace4674c4879603fe8"
client = Client(SECRET_KEY)
project = client.get_project(PROJECT_ID)

project.update(ApiTypes.ProjectMetadata(name="My Cool Project"))

list_insights

Retrieves project insight and metrics of the completed training runs.

Arguments

None

Return

List of ProjectInsight objects containing information and metrics on completed training runs.

[ProjectInsight(
    flow_title='Test workflow', 
    run_id='run_4a5d406d-464d-470c-bd7d-e92456621ad3', 
    dataset=InsightDataset(
        data_type='Rectangle', 
        num_classes=1, 
        average_annotations=5.19, 
        total_assets=500, 
        settings=DatasetSettings(
            split_ratio=0.3, 
            shuffle=True, 
            seed=0, 
            using_sliding_window=False
        )
    ), 
    model=InsightModel(
        name='fasterrcnn-inceptionv2-1024x1024', 
        batch_size=2, 
        training_steps=5000, 
        max_detection_per_class=100, 
        solver='momentum', 
        learning_rate=0.04, 
        momentum=0.9
    ), 
    checkpoint=RunCheckpoint(
        strategy='STRAT_ALWAYS_SAVE_LATEST', 
        evaluation_interval=250, 
        metric=None
    ), 
    artifact=InsightArtifact(
        id='artifact_65ae274540259e2a07533532', 
        is_training=False, 
        step=5000, 
        metric=ArtifactMetric(
            total_loss=0.32356, 
            classification_loss=0.012036, 
            localization_loss=0.010706, 
            regularization_loss=0.0
        )
    ),
    create_date=1705912133684
)]
NameTypeDescription
flow_titlestrName of the workflow.
run_idstrID of the training run.
datasetInsightDataset objectInformation and statistics on the training dataset.
modelInsightModel objectInformation on model architecture and hyperparameters.
checkpointRunCheckpoint objectInformation on training setup.
artifactInsightArtifact objectInformation and metrics on saved artifact.
create_dateintUNIX timestamp of the project creation date.

Examples

View the training insight of all training runs:

from datature.nexus import Client

SECRET_KEY = "01048a3572a00dec13a6ca204fa78c0c4c216475c2ca80cb618114d26783d5a2"
PROJECT_ID = "proj_9004a21df7b040ace4674c4879603fe8"
client = Client(SECRET_KEY)
project = client.get_project(PROJECT_ID)

project.list_insights()

View the training insight of all training runs with model architecture EfficientDet D1 640x640:

from datature.nexus import Client

SECRET_KEY = "01048a3572a00dec13a6ca204fa78c0c4c216475c2ca80cb618114d26783d5a2"
PROJECT_ID = "proj_9004a21df7b040ace4674c4879603fe8"
client = Client(SECRET_KEY)
project = client.get_project(PROJECT_ID)

insights = project.list_insights()
filtered = [
    run for run in insights if run.model.name == "efficientdet-d1-640x640"
]

list_users

Retrieves all users in the project, this includes Project Owners, Collaborators, and Datature Experts.

Arguments

None

Return

List of ProjectUser objects containing details of users who have access to the project, with the following structure:

[ProjectUser(
    id='user_6323fea23e292439f31c58cd',
    access_type='Owner',
    email='[email protected]',
    nickname='raighne',
    picture='https://s.gravatar.com/avatar/avatars%2Fra.png'
)]
NameTypeDescription
idstrUnique ID of the user.
access_typestrThe role access of the user, this is one of Owner, Collaborator, Labeller, or Expert (for Datature engineering consultants)
emailstrEmail that the user signed up with.
nicknamestrNickname of the user.
picturestrURL to the user's profile picture.

Examples

List all users in the project with project key 9004a21df7b040ace4674c4879603fe8.

from datature.nexus import Client

SECRET_KEY = "01048a3572a00dec13a6ca204fa78c0c4c216475c2ca80cb618114d26783d5a2"
PROJECT_ID = "proj_9004a21df7b040ace4674c4879603fe8"
client = Client(SECRET_KEY)
project = client.get_project(PROJECT_ID)

project.list_users()