ray.serve.schema.DeploymentDetails#

pydantic model ray.serve.schema.DeploymentDetails[source]#

Detailed info about a deployment within a Serve application.

Show JSON schema
{
   "title": "DeploymentDetails",
   "description": "Detailed info about a deployment within a Serve application.",
   "type": "object",
   "properties": {
      "name": {
         "title": "Name",
         "description": "Deployment name.",
         "type": "string"
      },
      "status": {
         "description": "The current status of the deployment.",
         "allOf": [
            {
               "$ref": "#/definitions/DeploymentStatus"
            }
         ]
      },
      "message": {
         "title": "Message",
         "description": "If there are issues with the deployment, this will describe the issue in more detail.",
         "type": "string"
      },
      "deployment_config": {
         "title": "Deployment Config",
         "description": "The set of deployment config options that are currently applied to this deployment. These options may come from the user's code, config file options, or Serve default values.",
         "allOf": [
            {
               "$ref": "#/definitions/DeploymentSchema"
            }
         ]
      },
      "replicas": {
         "title": "Replicas",
         "description": "Details about the live replicas of this deployment.",
         "type": "array",
         "items": {
            "$ref": "#/definitions/ReplicaDetails"
         }
      }
   },
   "required": [
      "name",
      "status",
      "message",
      "deployment_config",
      "replicas"
   ],
   "additionalProperties": false,
   "definitions": {
      "DeploymentStatus": {
         "title": "DeploymentStatus",
         "description": "An enumeration.",
         "enum": [
            "UPDATING",
            "HEALTHY",
            "UNHEALTHY"
         ],
         "type": "string"
      },
      "RayActorOptionsSchema": {
         "title": "RayActorOptionsSchema",
         "description": "Options with which to start a replica actor.",
         "type": "object",
         "properties": {
            "runtime_env": {
               "title": "Runtime Env",
               "description": "This deployment's runtime_env. working_dir and py_modules may contain only remote URIs.",
               "default": {},
               "type": "object"
            },
            "num_cpus": {
               "title": "Num Cpus",
               "description": "The number of CPUs required by the deployment's application per replica. This is the same as a ray actor's num_cpus. Uses a default if null.",
               "minimum": 0,
               "type": "number"
            },
            "num_gpus": {
               "title": "Num Gpus",
               "description": "The number of GPUs required by the deployment's application per replica. This is the same as a ray actor's num_gpus. Uses a default if null.",
               "minimum": 0,
               "type": "number"
            },
            "memory": {
               "title": "Memory",
               "description": "Restrict the heap memory usage of each replica. Uses a default if null.",
               "minimum": 0,
               "type": "number"
            },
            "object_store_memory": {
               "title": "Object Store Memory",
               "description": "Restrict the object store memory used per replica when creating objects. Uses a default if null.",
               "minimum": 0,
               "type": "number"
            },
            "resources": {
               "title": "Resources",
               "description": "The custom resources required by each replica.",
               "default": {},
               "type": "object"
            },
            "accelerator_type": {
               "title": "Accelerator Type",
               "description": "Forces replicas to run on nodes with the specified accelerator type.",
               "type": "string"
            }
         }
      },
      "DeploymentSchema": {
         "title": "DeploymentSchema",
         "description": "Specifies options for one deployment within a Serve application. For each deployment\nthis can optionally be included in `ServeApplicationSchema` to override deployment\noptions specified in code.",
         "type": "object",
         "properties": {
            "name": {
               "title": "Name",
               "description": "Globally-unique name identifying this deployment.",
               "type": "string"
            },
            "num_replicas": {
               "title": "Num Replicas",
               "description": "The number of processes that handle requests to this deployment. Uses a default if null.",
               "default": 1,
               "exclusiveMinimum": 0,
               "type": "integer"
            },
            "route_prefix": {
               "title": "Route Prefix",
               "description": "[DEPRECATED] Please use route_prefix under ServeApplicationSchema instead.",
               "default": 1,
               "type": "string"
            },
            "max_concurrent_queries": {
               "title": "Max Concurrent Queries",
               "description": "The max number of pending queries in a single replica. Uses a default if null.",
               "default": 1,
               "exclusiveMinimum": 0,
               "type": "integer"
            },
            "user_config": {
               "title": "User Config",
               "description": "Config to pass into this deployment's reconfigure method. This can be updated dynamically without restarting replicas",
               "default": 1,
               "type": "object"
            },
            "autoscaling_config": {
               "title": "Autoscaling Config",
               "description": "Config specifying autoscaling parameters for the deployment's number of replicas. If null, the deployment won't autoscale its number of replicas; the number of replicas will be fixed at num_replicas.",
               "default": 1,
               "type": "object"
            },
            "graceful_shutdown_wait_loop_s": {
               "title": "Graceful Shutdown Wait Loop S",
               "description": "Duration that deployment replicas will wait until there is no more work to be done before shutting down. Uses a default if null.",
               "default": 1,
               "minimum": 0,
               "type": "number"
            },
            "graceful_shutdown_timeout_s": {
               "title": "Graceful Shutdown Timeout S",
               "description": "Serve controller waits for this duration before forcefully killing the replica for shutdown. Uses a default if null.",
               "default": 1,
               "minimum": 0,
               "type": "number"
            },
            "health_check_period_s": {
               "title": "Health Check Period S",
               "description": "Frequency at which the controller will health check replicas. Uses a default if null.",
               "default": 1,
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "health_check_timeout_s": {
               "title": "Health Check Timeout S",
               "description": "Timeout that the controller will wait for a response from the replica's health check before marking it unhealthy. Uses a default if null.",
               "default": 1,
               "exclusiveMinimum": 0,
               "type": "number"
            },
            "ray_actor_options": {
               "title": "Ray Actor Options",
               "description": "Options set for each replica actor.",
               "default": 1,
               "allOf": [
                  {
                     "$ref": "#/definitions/RayActorOptionsSchema"
                  }
               ]
            },
            "placement_group_bundles": {
               "title": "Placement Group Bundles",
               "description": "Define a set of placement group bundles to be scheduled *for each replica* of this deployment. The replica actor will be scheduled in the first bundle provided, so the resources specified in `ray_actor_options` must be a subset of the first bundle's resources. All actors and tasks created by the replica actor will be scheduled in the placement group by default (`placement_group_capture_child_tasks` is set to True).",
               "default": 1,
               "type": "array",
               "items": {
                  "type": "object",
                  "additionalProperties": {
                     "type": "number"
                  }
               }
            },
            "placement_group_strategy": {
               "title": "Placement Group Strategy",
               "description": "Strategy to use for the replica placement group specified via `placement_group_bundles`. Defaults to `PACK`.",
               "default": 1,
               "type": "string"
            },
            "max_replicas_per_node": {
               "title": "Max Replicas Per Node",
               "description": "[EXPERIMENTAL] The max number of deployment replicas can run on a single node. Valid values are None (no limitation) or an integer in the range of [1, 100]. Defaults to no limitation.",
               "default": 1,
               "type": "integer"
            }
         },
         "required": [
            "name"
         ]
      },
      "ReplicaState": {
         "title": "ReplicaState",
         "description": "An enumeration.",
         "enum": [
            "STARTING",
            "UPDATING",
            "RECOVERING",
            "RUNNING",
            "STOPPING"
         ],
         "type": "string"
      },
      "ReplicaDetails": {
         "title": "ReplicaDetails",
         "description": "Detailed info about a single deployment replica.",
         "type": "object",
         "properties": {
            "node_id": {
               "title": "Node Id",
               "description": "ID of the node that the actor is running on.",
               "type": "string"
            },
            "node_ip": {
               "title": "Node Ip",
               "description": "IP address of the node that the actor is running on.",
               "type": "string"
            },
            "actor_id": {
               "title": "Actor Id",
               "description": "Actor ID.",
               "type": "string"
            },
            "actor_name": {
               "title": "Actor Name",
               "description": "Actor name.",
               "type": "string"
            },
            "worker_id": {
               "title": "Worker Id",
               "description": "Worker ID.",
               "type": "string"
            },
            "log_file_path": {
               "title": "Log File Path",
               "description": "The relative path to the Serve actor's log file from the ray logs directory.",
               "type": "string"
            },
            "replica_id": {
               "title": "Replica Id",
               "description": "Unique ID for the replica. By default, this will be \"<deployment name>#<replica suffix>\", where the replica suffix is a randomly generated unique string.",
               "type": "string"
            },
            "state": {
               "description": "Current state of the replica.",
               "allOf": [
                  {
                     "$ref": "#/definitions/ReplicaState"
                  }
               ]
            },
            "pid": {
               "title": "Pid",
               "description": "PID of the replica actor process.",
               "type": "integer"
            },
            "start_time_s": {
               "title": "Start Time S",
               "description": "The time at which the replica actor was started. If the controller dies, this is the time at which the controller recovers and retrieves replica state from the running replica actor.",
               "type": "number"
            }
         },
         "required": [
            "replica_id",
            "state",
            "start_time_s"
         ]
      }
   }
}

Fields
Validators
field deployment_config: ray.serve.schema.DeploymentSchema [Required]#

The set of deployment config options that are currently applied to this deployment. These options may come from the user’s code, config file options, or Serve default values.

Validated by
field message: str [Required]#

If there are issues with the deployment, this will describe the issue in more detail.

field name: str [Required]#

Deployment name.

field replicas: List[ray.serve.schema.ReplicaDetails] [Required]#

Details about the live replicas of this deployment.

field status: ray.serve._private.common.DeploymentStatus [Required]#

The current status of the deployment.

validator deployment_route_prefix_not_set  »  deployment_config[source]#