# telemetry

Python API: `hubai_sdk.utils.telemetry`

## Classes

### ApiKeySource

#### Attributes

##### ARGUMENT

##### ENVIRONMENT

##### STORED_CREDENTIALS

### CommandMetadata

#### Attributes

##### command_group

##### command_name

### CommandName

#### Attributes

##### CONVERT

##### INSTANCE_CONFIG

##### INSTANCE_CREATE

##### INSTANCE_DELETE

##### INSTANCE_DOWNLOAD

##### INSTANCE_FILES

##### INSTANCE_INFO

##### INSTANCE_LIST

##### INSTANCE_UPLOAD

##### LOGIN

##### LOGOUT

##### MODEL_CREATE

##### MODEL_DELETE

##### MODEL_INFO

##### MODEL_LIST

##### MODEL_UPDATE

##### VARIANT_CREATE

##### VARIANT_DELETE

##### VARIANT_INFO

##### VARIANT_LIST

### ConfigSource

#### Attributes

##### DIRECT_MODEL_INPUT

##### NN_ARCHIVE

##### YAML_CONFIG

### ConversionFlowStep

#### Attributes

##### CONFIGURATION_RESOLVED

##### RESULT_RECORDED

### ConversionPhase

#### Attributes

##### CONFIGURATION

##### DOWNLOAD

##### EXPORT

##### RESOURCE_SETUP

##### UPLOAD

### FailureReason

#### Attributes

##### API_ERROR

##### AUTH_ERROR

##### CONFIG_ERROR

##### CONFLICT

##### DOWNLOAD_ERROR

##### EXPORT_ERROR

##### NETWORK_ERROR

##### NOT_FOUND

##### SERVER_ERROR

##### TIMEOUT

##### UNKNOWN

##### UPLOAD_ERROR

##### USER_INTERRUPT

##### VALIDATION_ERROR

### IdentifierType

#### Attributes

##### SLUG

##### UNKNOWN

##### UUID

### InvocationSurface

#### Attributes

##### CLI

##### PYTHON_API

### OperationName

#### Attributes

##### CLIENT_INITIALIZE

##### CONVERT

##### INSTANCE_CONFIG_GET

##### INSTANCE_CREATE

##### INSTANCE_DELETE

##### INSTANCE_DOWNLOAD

##### INSTANCE_FILES_LIST

##### INSTANCE_GET

##### INSTANCE_UPLOAD

##### INSTANCES_LIST

##### MODEL_CREATE

##### MODEL_DELETE

##### MODEL_GET

##### MODEL_UPDATE

##### MODELS_LIST

##### VARIANT_CREATE

##### VARIANT_DELETE

##### VARIANT_GET

##### VARIANTS_LIST

### OperationTelemetrySpec

#### Attributes

##### identifier_param

##### operation_group

##### operation_name

##### success_builder

##### success_event

##### target_resource

### QuantizationInputType

#### Attributes

##### CUSTOM_ZIP

##### DATASET_ID

##### NONE

##### PREDEFINED_DOMAIN

### TargetResource

#### Attributes

##### CONVERSION

##### INSTANCE

##### MODEL

##### VARIANT

### TelemetryGroup

#### Attributes

##### AUTH

##### CLIENT

##### CONVERSION

##### INSTANCES

##### MODELS

##### VARIANTS

### TelemetryResult

#### Attributes

##### FAILED

##### INTERRUPTED

##### SUCCESS

### VisibilityFilterValue

#### Attributes

##### ALL

##### PRIVATE

##### PUBLIC

### VisibilityValue

#### Attributes

##### PRIVATE

##### PUBLIC

##### TEAM

## Functions

### bucket_file_size

```python
def bucket_file_size(value: int) -> str:
```

### bucket_limit

```python
def bucket_limit(value: int) -> str:
```

### bucket_max_quantization_images

```python
def bucket_max_quantization_images(value: int) -> str:
```

### bucket_nonzero_count

```python
def bucket_nonzero_count(value: int) -> str:
```

### bucket_result_count

```python
def bucket_result_count(value: int) -> str:
```

### bucket_rvc2_shaves

```python
def bucket_rvc2_shaves(value: int) -> str:
```

### bucket_yolo_class_count

```python
def bucket_yolo_class_count(value: int) -> str:
```

### bucket_zero_count

```python
def bucket_zero_count(value: int) -> str:
```

### build_client_initialized_properties

```python
def build_client_initialized_properties(api_key_source: ApiKeySource) -> dict[str, Any]:
```

### build_command_properties

```python
def build_command_properties(*, command_name: CommandName, command_group: TelemetryGroup, result: TelemetryResult, duration_ms: int, failure_reason: FailureReason | None = None) -> dict[str, Any]:
```

### build_conversion_flow_properties

```python
def build_conversion_flow_properties(conversion_run_id: str, flow_step: ConversionFlowStep, properties: dict[str, Any]) -> dict[str, Any]:
```

### build_conversion_result_properties

```python
def build_conversion_result_properties(*, result: TelemetryResult, duration_ms: int, failure_reason: FailureReason | None = None, downloaded_file_count: int | None = None) -> dict[str, Any]:
```

### build_conversion_summary

```python
def build_conversion_summary(*, target: str, config_source: ConfigSource, input_model_type: ModelType, invocation_surface: InvocationSurface, existing_model_reused: bool, existing_variant_reused: bool, quantization_mode: str | None, quantization_input_type: QuantizationInputType, max_quantization_images: int | None, yolo_version: str | None, yolo_class_names: list[str] | None, yolo_input_shape_provided: bool, tool_version_provided: bool, input_shape_provided: bool, download_output_dir_provided: bool, input_count: int, target_options: Mapping[str, Any]) -> dict[str, Any]:
```

### build_instance_created_properties

```python
def build_instance_created_properties(arguments: dict[str, Any], _result: Any) -> dict[str, Any]:
```

### build_instance_downloaded_properties

```python
def build_instance_downloaded_properties(arguments: dict[str, Any], result: Path) -> dict[str, Any]:
```

### build_instance_files_listed_properties

```python
def build_instance_files_listed_properties(arguments: dict[str, Any], result: list[Any]) -> dict[str, Any]:
```

### build_instance_uploaded_properties

```python
def build_instance_uploaded_properties(arguments: dict[str, Any], _result: Any) -> dict[str, Any]:
```

### build_instances_listed_properties

```python
def build_instances_listed_properties(arguments: dict[str, Any], result: list[Any]) -> dict[str, Any]:
```

### build_model_created_properties

```python
def build_model_created_properties(arguments: dict[str, Any], _result: Any) -> dict[str, Any]:
```

### build_model_identifier_properties

```python
def build_model_identifier_properties(arguments: dict[str, Any], _result: Any) -> dict[str, Any]:
```

### build_model_updated_properties

```python
def build_model_updated_properties(arguments: dict[str, Any], _result: Any) -> dict[str, Any]:
```

### build_models_listed_properties

```python
def build_models_listed_properties(arguments: dict[str, Any], result: list[Any]) -> dict[str, Any]:
```

### build_variant_created_properties

```python
def build_variant_created_properties(arguments: dict[str, Any], _result: Any) -> dict[str, Any]:
```

### build_variants_listed_properties

```python
def build_variants_listed_properties(arguments: dict[str, Any], result: list[Any]) -> dict[str, Any]:
```

### capture_client_initialized

```python
def capture_client_initialized(api_key_source: ApiKeySource):
```

### capture_conversion_configured

```python
def capture_conversion_configured(conversion_run_id: str, properties: dict[str, Any]):
```

### capture_conversion_result

```python
def capture_conversion_result(conversion_run_id: str, properties: dict[str, Any]):
```

### capture_operation_result

```python
def capture_operation_result(*, spec: OperationTelemetrySpec, exc: BaseException | None, duration_ms: int, bound_arguments: dict[str, Any] | None = None):
```

### command_metadata

```python
def command_metadata(command_path: str) -> CommandMetadata | None:
```

### command_result_from_exception

```python
def command_result_from_exception(exc: BaseException | None) -> TelemetryResult:
```

### config_source_from_path

```python
def config_source_from_path(path: str, *, is_archive: bool, is_yaml: bool) -> ConfigSource:
```

### conversion_failure_reason

```python
def conversion_failure_reason(exc: BaseException | None, *, phase: ConversionPhase) -> FailureReason | None:
```

### current_conversion_run_id

```python
def current_conversion_run_id() -> str | None:
```

### failure_reason_from_exception

```python
def failure_reason_from_exception(exc: BaseException | None) -> FailureReason | None:
```

### file_extension

```python
def file_extension(path: str | Path) -> str:
```

### get_component_telemetry

```python
def get_component_telemetry() -> Telemetry:
```

### get_or_create_conversion_run_id

```python
def get_or_create_conversion_run_id() -> str:
```

### identifier_type

```python
def identifier_type(identifier: UUID | str | None) -> IdentifierType | None:
```

### instrument_hubai_cli

```python
def instrument_hubai_cli(app: cyclopts.App):
```

### invocation_surface

```python
def invocation_surface() -> InvocationSurface:
```

### pop_cli_failure_reason

```python
def pop_cli_failure_reason() -> FailureReason | None:
```

### quantization_input_type

```python
def quantization_input_type(quantization_data: str | None, *, custom_zip: bool = False) -> QuantizationInputType:
```

### record_cli_failure_reason

```python
def record_cli_failure_reason(exc: BaseException):
```

### reset_conversion_run_id

```python
def reset_conversion_run_id(previous_value: str | None):
```

### sort_mode

```python
def sort_mode(value: str, *, allowed: set[str]) -> str:
```

### telemetry_operation

```python
def telemetry_operation(spec: OperationTelemetrySpec) -> Callable[[Callable[..., Any]], Callable[..., Any]]:
```

### visibility_filter

```python
def visibility_filter(is_public: bool | None) -> VisibilityFilterValue:
```

### visibility_value

```python
def visibility_value(is_public: bool | None) -> VisibilityValue:
```

## Attributes

### CLIENT_INITIALIZED_EVENT

### COMMAND_EVENT

### CONVERSION_CONFIGURED_EVENT

### CONVERSION_FLOW_NAME

### CONVERSION_RESULT_EVENT

### HUBAI_SDK_TELEMETRY_DEFAULTS

### INSTANCE_CONFIG_RETRIEVED_EVENT

### INSTANCE_CREATED_EVENT

### INSTANCE_DELETED_EVENT

### INSTANCE_DOWNLOAD_COMPLETED_EVENT

### INSTANCE_FILE_UPLOADED_EVENT

### INSTANCE_FILES_LISTED_EVENT

### INSTANCE_RETRIEVED_EVENT

### INSTANCES_LISTED_EVENT

### MODEL_CREATED_EVENT

### MODEL_DELETED_EVENT

### MODEL_RETRIEVED_EVENT

### MODEL_UPDATED_EVENT

### MODELS_LISTED_EVENT

### OPERATION_RESULT_EVENT

### VARIANT_CREATED_EVENT

### VARIANT_DELETED_EVENT

### VARIANT_RETRIEVED_EVENT

### VARIANTS_LISTED_EVENT
