Project Management
get_info
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
)
)
Attribute | Type | Description |
---|---|---|
id | str | Unique ID of the project. |
name | str | Name 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_id | str | Unique ID of the current workspace that this project is in. |
type | str | Type of project. This can be one of ObjectDetection , InstanceSegmentation , Classification , or Keypoint depending on the type selected during project creation on Nexus. |
create_date | int | UNIX timestamp of project creation date. |
localization | str | Region(s) for data localization. Defaults to MULTI for multi-region. |
tags | list[str] | List of tag names in the project. |
groups | list[str | List of asset group names in the project. |
statistic | Statistic object | Contains 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
update
Updates the metadata of the project, such as the name of the project.
Arguments
Name | Type | Description |
---|---|---|
project | dict | ProjectMetadata | The 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
)
)
Attribute | Type | Description |
---|---|---|
id | str | Unique ID of the project. |
name | str | Name 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_id | str | Unique ID of the current workspace that this project is in. |
type | str | Type of project. This can be one of ObjectDetection , InstanceSegmentation , Classification , or Keypoint depending on the type selected during project creation on Nexus. |
create_date | int | UNIX timestamp of project creation date. |
localization | str | Region(s) for data localization. Defaults to MULTI for multi-region. |
tags | list[str] | List of tag names in the project. |
groups | list[str | List of asset group names in the project. |
statistic | Statistic object | Contains 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
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
)]
Name | Type | Description |
---|---|---|
flow_title | str | Name of the workflow. |
run_id | str | ID of the training run. |
dataset | InsightDataset object | Information and statistics on the training dataset. |
model | InsightModel object | Information on model architecture and hyperparameters. |
checkpoint | RunCheckpoint object | Information on training setup. |
artifact | InsightArtifact object | Information and metrics on saved artifact. |
create_date | int | UNIX 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
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'
)]
Name | Type | Description |
---|---|---|
id | str | Unique ID of the user. |
access_type | str | The role access of the user, this is one of Owner , Collaborator , Labeller , or Expert (for Datature engineering consultants) |
email | str | Email that the user signed up with. |
nickname | str | Nickname of the user. |
picture | str | URL 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()
Updated 10 months ago