ray.serve.schema.RayActorOptionsSchema#

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

Options with which to start a replica actor.

Show JSON schema
{
   "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.See :ref:`accelerator types <accelerator_types>`.",
         "type": "string"
      }
   }
}

Fields:
Validators:
field accelerator_type: str = None#

Forces replicas to run on nodes with the specified accelerator type.See accelerator types.

field memory: float = None#

Restrict the heap memory usage of each replica. Uses a default if null.

Constraints:
  • minimum = 0

field num_cpus: float = None#

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.

Constraints:
  • minimum = 0

field num_gpus: float = None#

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.

Constraints:
  • minimum = 0

field object_store_memory: float = None#

Restrict the object store memory used per replica when creating objects. Uses a default if null.

Constraints:
  • minimum = 0

field resources: Dict = {}#

The custom resources required by each replica.

field runtime_env: dict = {}#

This deployment’s runtime_env. working_dir and py_modules may contain only remote URIs.

Validated by:
validator runtime_env_contains_remote_uris  »  runtime_env[source]#