module documentation
Undocumented
| Function | create |
Creates a new model resource. |
| Function | create |
Creates a new model resource. |
| Function | delete |
Deletes a model. |
| Function | delete |
Deletes a model. |
| Function | get |
Get the model information from the HubAI. |
| Function | get |
Get the model information from the HubAI. |
| Function | list |
List the models in the HubAI. |
| Function | list |
List the models in the HubAI. |
| Function | update |
Updates a model. |
| Function | update |
Updates a model. |
| Constant | MODEL |
Undocumented |
| Constant | MODEL |
Undocumented |
| Variable | app |
Undocumented |
| Function | _model |
Undocumented |
| Function | _print |
Undocumented |
| Function | _print |
Undocumented |
@telemetry_operation( OperationTelemetrySpec( operation_name=OperationName.MODEL_CREATE, operation_group=TelemetryGroup.MODELS, success_event=MODEL_CREATED_EVENT, target_resource=TargetResource.MODEL, success_builder=build_model_created_properties))
def create_model(name: str, *, license_type: License = 'undefined', is_public: bool | None = False, description: str | None = None, description_short: str = '<empty>', architecture_id: UUID | str | None = None, tasks: list[ Task] | None = None, links: list[ str] | None = None, is_yolo: bool = False) -> ModelResponse:
¶
Creates a new model resource.
| Parameters | |
name:str | str. The name of the model. |
licenseLicense | License. The type of the license. |
isbool | None | bool | None. Whether the model is public (True), private (False), or team (None). |
description:str | None | str | None. Full description of the model. |
descriptionstr | str. Short description of the model. |
architectureUUID | str | None | UUID | str | None. The architecture ID. |
tasks:list[ | list[Task] | None. List of tasks this model supports. |
links:list[ | list[str] | None. List of links to related resources. |
isbool | bool. Whether the model is a YOLO model. |
| Returns | |
ModelResponse | The created model resource. |
@app.command( name='create')
def create_model_cli(name: str, *, license_type: License = 'undefined', is_public: bool | None = False, description: str | None = None, description_short: str = '<empty>', architecture_id: UUID | str | None = None, tasks: list[ Task] | None = None, links: list[ str] | None = None, is_yolo: bool = False):
¶
Creates a new model resource.
@telemetry_operation( OperationTelemetrySpec( operation_name=OperationName.MODEL_DELETE, operation_group=TelemetryGroup.MODELS, success_event=MODEL_DELETED_EVENT, target_resource=TargetResource.MODEL, identifier_param='identifier', success_builder=build_model_identifier_properties))
def delete_model(identifier: UUID | str):
¶
Deletes a model.
| Parameters | |
identifier:UUID | str | UUID | str. The model ID or slug. |
@telemetry_operation( OperationTelemetrySpec( operation_name=OperationName.MODEL_GET, operation_group=TelemetryGroup.MODELS, success_event=MODEL_RETRIEVED_EVENT, target_resource=TargetResource.MODEL, identifier_param='identifier', success_builder=build_model_identifier_properties))
def get_model(identifier: UUID | str) -> ModelResponse:
¶
Get the model information from the HubAI.
| Parameters | |
identifier:UUID | str | UUID | str. The model ID or slug. |
| Returns | |
ModelResponse | The resolved model resource. |
@telemetry_operation( OperationTelemetrySpec( operation_name=OperationName.MODELS_LIST, operation_group=TelemetryGroup.MODELS, success_event=MODELS_LISTED_EVENT, target_resource=TargetResource.MODEL, success_builder=build_models_listed_properties))
def list_models(tasks: list[ Task] | None = None, license_type: License | None = None, is_public: bool | None = None, project_id: str | None = None, luxonis_only: bool = False, limit: int = 50, sort: str = 'updated', order: Order = 'desc') -> list[ ModelResponse]:
¶
List the models in the HubAI.
| Parameters | |
tasks:list[ | list[Task] | None. Filter the listed models by tasks. |
licenseLicense | None | License | None. Filter the listed models by license type. |
isbool | None | bool | None. Filter the listed models by public status. |
projectstr | None | str | None. Filter the listed models by project ID. |
luxonisbool | bool. Filter the listed models by Luxonis only. |
limit:int | int. Maximum number of models to return. |
sort:str | str. Field to sort the models by. It should be the field name from the ModelResponse. For example, "name", "id", "updated", etc. |
order:Order | Order. Order to sort the models by. It should be "asc" or "desc". |
| Returns | |
list[ | A list of matching model resources. |
@app.command( name='ls')
def list_models_cli(tasks: list[ Task] | None = None, license_type: License | None = None, is_public: bool | None = None, project_id: str | None = None, luxonis_only: bool = False, limit: int = 50, sort: str = 'updated', order: Order = 'desc', field: Annotated[ list[ str] | None, Parameter( name=[ (--field), (-f)])] = None):
¶
List the models in the HubAI.
@telemetry_operation( OperationTelemetrySpec( operation_name=OperationName.MODEL_UPDATE, operation_group=TelemetryGroup.MODELS, success_event=MODEL_UPDATED_EVENT, target_resource=TargetResource.MODEL, identifier_param='identifier', success_builder=build_model_updated_properties))
def update_model(identifier: UUID | str, *, license_type: License | None = None, is_public: bool | None = None, description: str | None = None, description_short: str | None = None, architecture_id: UUID | str | None = None, tasks: list[ Task] | None = None, links: list[ str] | None = None, is_yolo: bool | None = None) -> ModelResponse:
¶
Updates a model.
| Parameters | |
identifier:UUID | str | UUID | str. The model ID or slug. |
licenseLicense | None | License | None. The type of the license. |
isbool | None | bool | None. Whether the model is public (True), private (False), or team (None). |
description:str | None | str | None. Full description of the model. |
descriptionstr | None | str | None. Short description of the model. |
architectureUUID | str | None | UUID | str | None. The architecture ID. |
tasks:list[ | list[Task] | None. List of tasks this model supports. |
links:list[ | list[str] | None. List of links to related resources. |
isbool | None | bool | None. Whether the model is a YOLO model. |
| Returns | |
ModelResponse | The updated model resource. |
@app.command( name='update')
def update_model_cli(identifier: UUID | str, *, license_type: License | None = None, is_public: bool | None = None, description: str | None = None, description_short: str | None = None, architecture_id: UUID | str | None = None, tasks: list[ Task] | None = None, links: list[ str] | None = None, is_yolo: bool | None = None):
¶
Updates a model.