code: def test_ray_actor_options_validation(self):
      class Class:
          pass
  
      ReplicaConfig.create(
          Class,
          tuple(),
          dict(),
          ray_actor_options={
              "num_cpus": 1.0,
              "num_gpus": 10,
              "resources": {"abc": 1.0},
              "memory": 1000000.0,
              "object_store_memory": 1000000,
          },
      )
      with pytest.raises(TypeError):
          ReplicaConfig.create(Class, ray_actor_options=1.0)
      with pytest.raises(TypeError):
          ReplicaConfig.create(Class, ray_actor_options=False)
      with pytest.raises(TypeError):
          ReplicaConfig.create(
              Class, ray_actor_options={"num_cpus": "hello"}
          )
      with pytest.raises(ValueError):
          ReplicaConfig.create(
              Class, ray_actor_options={"num_cpus": -1}
          )
      with pytest.raises(TypeError):
          ReplicaConfig.create(
              Class, ray_actor_options={"num_gpus": "hello"}
          )
      with pytest.raises(ValueError):
          ReplicaConfig.create(
              Class, ray_actor_options={"num_gpus": -1}
          )
      with pytest.raises(TypeError):
          ReplicaConfig.create(
              Class, ray_actor_options={"memory": "hello"}
          )
      with pytest.raises(ValueError):
          ReplicaConfig.create(Class, ray_actor_options={"memory": -1})
      with pytest.raises(TypeError):
          ReplicaConfig.create(
              Class, ray_actor_options={"object_store_memory": "hello"}
          )
      with pytest.raises(ValueError):
          ReplicaConfig.create(
              Class, ray_actor_options={"object_store_memory": -1}
          )
      with pytest.raises(TypeError):
          ReplicaConfig.create(
              Class, ray_actor_options={"resources": []}
          )
  
      disallowed_ray_actor_options = {
          "max_concurrency",
          "max_restarts",
          "max_task_retries",
          "name",
          "namespace",
          "lifetime",
          "placement_group",
          "placement_group_bundle_index",
          "placement_group_capture_child_tasks",
          "max_pending_calls",
          "scheduling_strategy",
          "get_if_exists",
          "_metadata",
      }
  
      for option in disallowed_ray_actor_options:
          with pytest.raises(ValueError):
              ReplicaConfig.create(
                  Class, ray_actor_options={option: None}
              )
  
imports: import pytest
  from ray import cloudpickle
  from ray._private.pydantic_compat import ValidationError
  from ray._private.utils import import_attr
  from ray.serve._private.config import DeploymentConfig, ReplicaConfig, _proto_to_dict
  from ray.serve._private.constants import DEFAULT_AUTOSCALING_POLICY, DEFAULT_GRPC_PORT
  from ray.serve._private.utils import DEFAULT
  from ray.serve.autoscaling_policy import default_autoscaling_policy
  from ray.serve.config import AutoscalingConfig, DeploymentMode, HTTPOptions, ProxyLocation, gRPCOptions
  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_grpc import add_UserDefinedServiceServicer_to_server
  from ray.serve.schema import DeploymentSchema, HTTPOptionsSchema, ServeApplicationSchema, ServeDeploySchema
label_desc: Use image node_id 2 for calling the TestReplicaConfig obj's underlying member method code with example usage: obj.test_ray_actor_options_validation() without return types