pixano.inference.registry
¶
Provider registration and lookup.
This module provides a registry for inference providers, allowing them to be registered and retrieved by name.
get_provider(name, **kwargs)
¶
Get a provider instance by name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name of the provider to retrieve. |
required |
**kwargs
|
Any
|
Arguments to pass to the provider constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
InferenceProvider
|
An instance of the requested provider. |
Raises:
| Type | Description |
|---|---|
ProviderNotFoundError
|
If the provider is not registered. |
Source code in pixano/inference/registry.py
is_provider_registered(name)
¶
list_providers()
¶
register_provider(name)
¶
Decorator to register a provider class.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
The name to register the provider under. |
required |
Returns:
| Type | Description |
|---|---|
|
A decorator that registers the class. |