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 ModelConfig, Sam2ImageParams
models = [
ModelConfig(
name="sam2-image",
model_class="Sam2ImageModel",
model_params=Sam2ImageParams(path="facebook/sam2-hiera-base-plus"),
),
]
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. |