# hubai_utils

Python API: `modelconverter.utils.hubai_utils`

Lookups against the HubAI model zoo.

Commands such as benchmarking accept a HubAI model slug in place of a local file, so the slug has to be checked against the zoo
before the model is pulled from it.

## Functions

### create_hubai_client

```python
def create_hubai_client() -> HubAIClient:
```

Create a HubAI SDK client from the ModelConverter settings.

The client is pointed at the configured HubAI URL and is authenticated with the configured API key.

Returns

 * `HubAIClient`: The authenticated client.

### is_hubai_model_variant_available

```python
def is_hubai_model_variant_available(model_identifier: str, model_variant: str) -> bool:
```

Check whether a model variant is published on HubAI.

The variant is looked up with the configured API key, so a private variant counts as available only for a key that can see it.

Parameters

 * `model_identifier` (`str`): Name of the model, the first part of its slug.
 * `model_variant` (`str`): Variant of the model, the part of the slug that follows the colon.

Returns

 * `bool`: `True` if HubAI lists a variant with this slug, `False` otherwise.
