pixano_inference.ray.config_loader
Configuration loader for Ray Serve deployments.
ConfigLoader(config_path=None)
Loader for model deployment configurations.
Python config files define a models list of ModelConfig:
.. code-block:: python
from pixano_inference.configs import DeploymentConfig, ModelConfig
models = [
ModelConfig(
name="my-detector",
model_class="MyDetector", # registered by an installed model package
model_params={"path": "org/my-detector"},
deployment=DeploymentConfig(num_gpus=1),
),
]
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
config_path
|
str | Path | None
|
Path to the configuration file (.py). |
None
|
Source code in pixano_inference/ray/config_loader.py
load()
Load model deployment configurations from the config file.
Dispatches to the appropriate loader based on file extension.
Returns:
| Type | Description |
|---|---|
list[ModelDeploymentConfig]
|
List of model deployment configurations. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the config file does not exist. |
ValueError
|
If the config is invalid or has an unsupported extension. |