ray.serve.schema.ServeApplicationSchema#
- pydantic model ray.serve.schema.ServeApplicationSchema[source]#
Describes one Serve application, and currently can also be used as a standalone config to deploy a single application to a Ray cluster.
- field autoscaling_policy: dict | None = None#
Application-level autoscaling policy. If null, serve fallbacks to autoscaling policy in each deployment. This option is under development and not yet supported.
- field deployments: List[DeploymentSchema] = []#
Deployment options that override options specified in the code.
- field external_scaler_enabled: bool = False#
If True, indicates that an external autoscaler will manage replica scaling for this application. When enabled, Serve’s built-in autoscaling cannot be used for any deployments in this application.
- field host: str = '0.0.0.0'#
Host for HTTP servers to listen on. Defaults to “0.0.0.0”, which exposes Serve publicly. Cannot be updated once your Serve application has started running. The Serve application must be shut down and restarted with the new host instead.
- field import_path: str [Required]#
An import path to a bound deployment node. Should be of the form “module.submodule_1…submodule_n.dag_node”. This is equivalent to “from module.submodule_1…submodule_n import dag_node”. Only works with Python applications. This field is REQUIRED when deploying Serve config to a Ray cluster.
- field logging_config: LoggingConfig | None = None#
Logging config for configuring serve application logs.
- field port: int = 8000#
Port for HTTP server. Defaults to 8000. Cannot be updated once your Serve application has started running. The Serve application must be shut down and restarted with the new port instead.
- field route_prefix: str | None = '/'#
Route prefix for HTTP requests. If not provided, it will useroute_prefix of the ingress deployment. By default, the ingress route prefix is ‘/’.
- field runtime_env: dict = {}#
The runtime_env that the deployment graph will be run in. Per-deployment runtime_envs will inherit from this. working_dir and py_modules may contain only remote URIs.
- validator convert_autoscaling_policy_to_dict » autoscaling_policy[source]#
Convert AutoscalingPolicy to dict if needed.
- static get_empty_schema_dict() Dict[source]#
Returns an empty app schema dictionary.
Schema can be used as a representation of an empty Serve application config.
- validator import_path_format_valid » import_path[source]#
- validator runtime_env_contains_remote_uris » runtime_env[source]#