pixano_inference.configs.deployment
Deployment configuration of a single model: the object every model is constructed with.
These classes are plain pydantic models. They belong to the model API, not to the Ray Serve runtime, so a model package imports them without loading the server stack.
AutoscalingConfig(**data)
Bases: BaseModel
Autoscaling configuration for Ray Serve deployments.
Attributes:
| Name | Type | Description |
|---|---|---|
min_replicas |
int
|
Minimum number of replicas. Can be 0 for scale-to-zero. |
max_replicas |
int
|
Maximum number of replicas. |
target_num_ongoing_requests_per_replica |
int
|
Target number of ongoing requests per replica before scaling up. |
downscale_delay_s |
float
|
Delay in seconds before scaling down. |
upscale_delay_s |
float
|
Delay in seconds before scaling up. |
Source code in pydantic/main.py
ModelDeploymentConfig(**data)
Bases: BaseModel
Configuration for deploying a single model.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Unique model name. Optional for HuggingFace models (auto-derived from path). |
capability |
str
|
Capability string (e.g. "segmentation"). |
model_class |
str
|
Registered class name (e.g. "MyDetector"), provided by an installed model package. |
model_params |
dict
|
Parameters passed to model init via config. |
resources |
ResourceConfig
|
Resource configuration for the deployment. |
autoscaling |
AutoscalingConfig
|
Autoscaling configuration for the deployment. |
max_batch_size |
int
|
Maximum batch size for inference (1 disables batching). |
batch_wait_timeout_s |
float
|
Timeout for waiting to fill batch. |
max_ongoing_requests |
int
|
Max concurrent requests Serve routes to one replica before queueing / triggering autoscaling. |
health_check_period_s |
float
|
How often Serve calls the replica health check. |
timeout_s |
float | None
|
Per-request inference timeout. None uses the capability default. |
Source code in pydantic/main.py
ResourceConfig(**data)
Bases: BaseModel
Resource configuration for a model deployment.
Attributes:
| Name | Type | Description |
|---|---|---|
num_gpus |
float
|
Number of GPUs per replica. |
num_cpus |
float
|
Number of CPUs per replica. |
memory_mb |
int | None
|
Memory limit in MB. None means no limit. |