class_docstr: Internal datastructure wrapping config options for a deployment's replicas.
  
  Provides five main properties (see property docstrings for more info):
      deployment_def: the code, or a reference to the code, that this
          replica should run.
      init_args: the deployment_def's init_args.
      init_kwargs: the deployment_def's init_kwargs.
      ray_actor_options: the Ray actor options to pass into the replica's
          actor.
      resource_dict: contains info on this replica's actor's resource needs.
  
  Offers a serialized equivalent (e.g. serialized_deployment_def) for
  deployment_def, init_args, and init_kwargs. Deserializes these properties
  when they're first accessed, if they were not passed in directly through
  create().
  
  Use the classmethod create() to make a ReplicaConfig with the deserialized
  properties.
  
  Note: overwriting or setting any property after the ReplicaConfig has been
  constructed is currently undefined behavior. The config's fields should not
  be modified externally after it is created.
class_docstr_tok: ["Internal","datastructure","wrapping","config","options","for","a","deployment","'s","replicas",".","Provides","five","main","properties","(","see","property","docstrings","for","more","info",")",":","deployment_def",":","the","code",",","or","a","reference","to","the","code",",","that","this","replica","should","run",".","init_args",":","the","deployment_def","'s","init_args",".","init_kwargs",":","the","deployment_def","'s","init_kwargs",".","ray_actor_options",":","the","Ray","actor","options","to","pass","into","the","replica's","actor",".","resource_dict",":","contains","info","on","this","replica","'s","actor","'s","resource","needs",".","Offers","a","serialized","equivalent","(","e.g",".","serialized_deployment_def",")","for","deployment_def",",","init_args",",","and","init_kwargs",".","Deserializes","these","properties","when","they","'re","first","accessed",",","if","they","were","not","passed","in","directly","through","create","(",")",".","Use","the","classmethod","create","(",")","to","make","a","ReplicaConfig","with","the","deserialized","properties",".","Note",":","overwriting","or","setting","any","property","after","the","ReplicaConfig","has","been","constructed","is","currently","undefined","behavior",".","The","config","'s","fields","should","not","be","modified","externally","after","it","is","created","."]
docstr: Create a ReplicaConfig from deserialized parameters.
docstr_tok: ["Create","a","ReplicaConfig","from","deserialized","parameters","."]
code: def create(
      cls,
      deployment_def: Union[Callable, str],
      init_args: Optional[Tuple[Any]] = None,
      init_kwargs: Optional[Dict[Any, Any]] = None,
      ray_actor_options: Optional[Dict] = None,
      placement_group_bundles: Optional[List[Dict[str, float]]] = None,
      placement_group_strategy: Optional[str] = None,
      max_replicas_per_node: Optional[int] = None,
      deployment_def_name: Optional[str] = None,
  ):
      """Create a ReplicaConfig from deserialized parameters."""
  
      if not callable(deployment_def) and not isinstance(
          deployment_def, str
      ):
          raise TypeError(
              "@serve.deployment must be called on a class or function."
          )
  
      if not (
          init_args is None or isinstance(init_args, (tuple, list))
      ):
          raise TypeError("init_args must be a tuple.")
  
      if not (init_kwargs is None or isinstance(init_kwargs, dict)):
          raise TypeError("init_kwargs must be a dict.")
  
      if inspect.isfunction(deployment_def):
          if init_args:
              raise ValueError(
                  "init_args not supported for function deployments."
              )
          elif init_kwargs:
              raise ValueError(
                  "init_kwargs not supported for function deployments."
              )
  
      if not isinstance(deployment_def, (Callable, str)):
          raise TypeError(
              f'Got invalid type "{type(deployment_def)}" for '
              "deployment_def. Expected deployment_def to be a "
              "class, function, or string."
          )
      # Set defaults
      if init_args is None:
          init_args = ()
      if init_kwargs is None:
          init_kwargs = {}
      if ray_actor_options is None:
          ray_actor_options = {}
      if deployment_def_name is None:
          if isinstance(deployment_def, str):
              deployment_def_name = deployment_def
          else:
              deployment_def_name = deployment_def.__name__
  
      config = cls(
          deployment_def_name,
          pickle_dumps(
              deployment_def,
              f"Could not serialize the deployment {repr(deployment_def)}",
          ),
          pickle_dumps(
              init_args, "Could not serialize the deployment init args"
          ),
          pickle_dumps(
              init_kwargs,
              "Could not serialize the deployment init kwargs",
          ),
          ray_actor_options,
          placement_group_bundles,
          placement_group_strategy,
          max_replicas_per_node,
      )
  
      config._deployment_def = deployment_def
      config._init_args = init_args
      config._init_kwargs = init_kwargs
  
      return config
  
imports: import inspect
  import json
  from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
  from google.protobuf.descriptor import FieldDescriptor
  from google.protobuf.message import Message
  from ray import cloudpickle
  from ray._private import ray_option_utils
  from ray._private.pydantic_compat import BaseModel, Field, NonNegativeFloat, NonNegativeInt, PositiveFloat, validator
  from ray._private.serialization import pickle_dumps
  from ray._private.utils import resources_from_ray_options
  from ray.serve._private.constants import DEFAULT_GRACEFUL_SHUTDOWN_TIMEOUT_S, DEFAULT_GRACEFUL_SHUTDOWN_WAIT_LOOP_S, DEFAULT_HEALTH_CHECK_PERIOD_S, DEFAULT_HEALTH_CHECK_TIMEOUT_S, DEFAULT_MAX_CONCURRENT_QUERIES, MAX_REPLICAS_PER_NODE_MAX_VALUE
  from ray.serve._private.utils import DEFAULT, DeploymentOptionUpdateType
  from ray.serve.config import AutoscalingConfig
  from ray.serve.generated.serve_pb2 import AutoscalingConfig
  from ray.serve.generated.serve_pb2 import DeploymentConfig
  from ray.serve.generated.serve_pb2 import DeploymentLanguage
  from ray.serve.generated.serve_pb2 import EncodingType
  from ray.serve.generated.serve_pb2 import LoggingConfig
  from ray.serve.generated.serve_pb2 import ReplicaConfig
  from ray.util.placement_group import VALID_PLACEMENT_GROUP_STRATEGIES
label_desc: Use image node_id 5 for calling the ReplicaConfig obj's underlying member method code with example usage: obj.create(cls, deployment_def, init_args, init_kwargs, ray_actor_options, placement_group_bundles, placement_group_strategy, max_replicas_per_node, deployment_def_name) and returns: config