module documentation

Undocumented

Function create_model Creates a new model resource.
Function create_model_cli Creates a new model resource.
Function delete_model Deletes a model.
Function delete_model_cli Deletes a model.
Function get_model Get the model information from the HubAI.
Function get_model_info_cli Get the model information from the HubAI.
Function list_models List the models in the HubAI.
Function list_models_cli List the models in the HubAI.
Function update_model Updates a model.
Function update_model_cli Updates a model.
Constant MODEL_INFO_KEYS Undocumented
Constant MODEL_LIST_KEYS Undocumented
Variable app Undocumented
Function _model_to_cli_data Undocumented
Function _print_model_info Undocumented
Function _print_model_list Undocumented
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:strstr. The name of the model.
license_type:LicenseLicense. The type of the license.
is_public:bool | Nonebool | None. Whether the model is public (True), private (False), or team (None).
description:str | Nonestr | None. Full description of the model.
description_short:strstr. Short description of the model.
architecture_id:UUID | str | NoneUUID | str | None. The architecture ID.
tasks:list[Task] | Nonelist[Task] | None. List of tasks this model supports.
links:list[str] | Nonelist[str] | None. List of links to related resources.
is_yolo:boolbool. Whether the model is a YOLO model.
Returns
ModelResponseThe 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 | strUUID | str. The model ID or slug.
@app.command(name='delete')
def delete_model_cli(identifier: UUID | str):

Deletes a model.

@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 | strUUID | str. The model ID or slug.
Returns
ModelResponseThe resolved model resource.
@app.command(name='info')
def get_model_info_cli(identifier: UUID | str):

Get the model information from the HubAI.

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[Task] | Nonelist[Task] | None. Filter the listed models by tasks.
license_type:License | NoneLicense | None. Filter the listed models by license type.
is_public:bool | Nonebool | None. Filter the listed models by public status.
project_id:str | Nonestr | None. Filter the listed models by project ID.
luxonis_only:boolbool. Filter the listed models by Luxonis only.
limit:intint. Maximum number of models to return.
sort:strstr. Field to sort the models by. It should be the field name from the ModelResponse. For example, "name", "id", "updated", etc.
order:OrderOrder. Order to sort the models by. It should be "asc" or "desc".
Returns
list[ModelResponse]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 | strUUID | str. The model ID or slug.
license_type:License | NoneLicense | None. The type of the license.
is_public:bool | Nonebool | None. Whether the model is public (True), private (False), or team (None).
description:str | Nonestr | None. Full description of the model.
description_short:str | Nonestr | None. Short description of the model.
architecture_id:UUID | str | NoneUUID | str | None. The architecture ID.
tasks:list[Task] | Nonelist[Task] | None. List of tasks this model supports.
links:list[str] | Nonelist[str] | None. List of links to related resources.
is_yolo:bool | Nonebool | None. Whether the model is a YOLO model.
Returns
ModelResponseThe 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.

MODEL_INFO_KEYS: list[str] =

Undocumented

Value
['name',
 'slug',
 'id',
 'created',
 'updated',
 'tasks',
 'platforms',
...
MODEL_LIST_KEYS: list[str] =

Undocumented

Value
['name', 'id', 'slug']
app =

Undocumented

def _model_to_cli_data(model: ModelResponse) -> dict[str, object]:

Undocumented

def _print_model_info(model: ModelResponse):

Undocumented

def _print_model_list(models: list[ModelResponse], field: list[str] | None = None):

Undocumented