class_docstr: A class used to store the parameters used by Ray.
  
  Attributes:
      redis_address: The address of the Redis server to connect to. If
          this address is not provided, then this command will start Redis, a
          raylet, a plasma store, a plasma manager, and some workers.
          It will also kill these processes when Python exits.
      redis_port: The port that the primary Redis shard should listen
          to. If None, then it will fall back to
          ray._private.ray_constants.DEFAULT_PORT, or a random port if the default is
          not available.
      redis_shard_ports: A list of the ports to use for the non-primary Redis
          shards. If None, then it will fall back to the ports right after
          redis_port, or random ports if those are not available.
      num_cpus: Number of CPUs to configure the raylet with.
      num_gpus: Number of GPUs to configure the raylet with.
      resources: A dictionary mapping the name of a resource to the quantity
          of that resource available.
      labels: The key-value labels of the node.
      memory: Total available memory for workers requesting memory.
      object_store_memory: The amount of memory (in bytes) to start the
          object store with.
      redis_max_memory: The max amount of memory (in bytes) to allow redis
          to use, or None for no limit. Once the limit is exceeded, redis
          will start LRU eviction of entries. This only applies to the
          sharded redis tables (task and object tables).
      object_manager_port int: The port to use for the object manager.
      node_manager_port: The port to use for the node manager.
      gcs_server_port: The port to use for the GCS server.
      node_ip_address: The IP address of the node that we are on.
      raylet_ip_address: The IP address of the raylet that this node
          connects to.
      min_worker_port: The lowest port number that workers will bind
          on. If not set or set to 0, random ports will be chosen.
      max_worker_port: The highest port number that workers will bind
          on. If set, min_worker_port must also be set.
      worker_port_list: An explicit list of ports to be used for
          workers (comma-separated). Overrides min_worker_port and
          max_worker_port.
      ray_client_server_port: The port number the ray client server
          will bind on. If not set, the ray client server will not
          be started.
      object_ref_seed: Used to seed the deterministic generation of
          object refs. The same value can be used across multiple runs of the
          same job in order to generate the object refs in a consistent
          manner. However, the same ID should not be used for different jobs.
      redirect_output: True if stdout and stderr for non-worker
          processes should be redirected to files and false otherwise.
      external_addresses: The address of external Redis server to
          connect to, in format of "ip1:port1,ip2:port2,...".  If this
          address is provided, then ray won't start Redis instances in the
          head node but use external Redis server(s) instead.
      num_redis_shards: The number of Redis shards to start in addition to
          the primary Redis shard.
      redis_max_clients: If provided, attempt to configure Redis with this
          maxclients number.
      redis_password: Prevents external clients without the password
          from connecting to Redis if provided.
      plasma_directory: A directory where the Plasma memory mapped files will
          be created.
      worker_path: The path of the source code that will be run by the
          worker.
      setup_worker_path: The path of the Python file that will set up
          the environment for the worker process.
      huge_pages: Boolean flag indicating whether to start the Object
          Store with hugetlbfs support. Requires plasma_directory.
      include_dashboard: Boolean flag indicating whether to start the web
          UI, which displays the status of the Ray cluster. If this value is
          None, then the UI will be started if the relevant dependencies are
          present.
      dashboard_host: The host to bind the web UI server to. Can either be
          localhost (127.0.0.1) or 0.0.0.0 (available from all interfaces).
          By default, this is set to localhost to prevent access from
          external machines.
      dashboard_port: The port to bind the dashboard server to.
          Defaults to 8265.
      dashboard_agent_listen_port: The port for dashboard agents to listen on
          for HTTP requests.
          Defaults to 52365.
      dashboard_grpc_port: The port for the dashboard head process to listen
          for gRPC on.
          Defaults to random available port.
      runtime_env_agent_port: The port at which the runtime env agent
          listens to for HTTP.
          Defaults to random available port.
      plasma_store_socket_name: If provided, it specifies the socket
          name used by the plasma store.
      raylet_socket_name: If provided, it specifies the socket path
          used by the raylet process.
      temp_dir: If provided, it will specify the root temporary
          directory for the Ray process. Must be an absolute path.
      storage: Specify a URI for persistent cluster-wide storage. This storage path
          must be accessible by all nodes of the cluster, otherwise an error will be
          raised.
      runtime_env_dir_name: If provided, specifies the directory that
          will be created in the session dir to hold runtime_env files.
      include_log_monitor: If True, then start a log monitor to
          monitor the log files for all processes on this node and push their
          contents to Redis.
      autoscaling_config: path to autoscaling config file.
      metrics_agent_port: The port to bind metrics agent.
      metrics_export_port: The port at which metrics are exposed
          through a Prometheus endpoint.
      no_monitor: If True, the ray autoscaler monitor for this cluster
          will not be started.
      _system_config: Configuration for overriding RayConfig
          defaults. Used to set system configuration and for experimental Ray
          core feature flags.
      enable_object_reconstruction: Enable plasma reconstruction on
          failure.
      ray_debugger_external: If true, make the Ray debugger for a
          worker available externally to the node it is running on. This will
          bind on 0.0.0.0 instead of localhost.
      env_vars: Override environment variables for the raylet.
      session_name: The name of the session of the ray cluster.
      webui: The url of the UI.
      cluster_id: The cluster ID.
docstr: Update the settings when the target fields are None.
  
  Args:
      kwargs: The keyword arguments to set corresponding fields.
code: def update_if_absent(self, **kwargs):
      """Update the settings when the target fields are None.
  
      Args:
          kwargs: The keyword arguments to set corresponding fields.
      """
      for arg in kwargs:
          if hasattr(self, arg):
              if getattr(self, arg) is None:
                  setattr(self, arg, kwargs[arg])
          else:
              raise ValueError(
                  f"Invalid RayParams parameter in update_if_absent: {arg}"
              )
  
      self._check_usage()
  
file_path: ray/python/ray/_private/parameter.py
imports: import logging
  import os
  from typing import Dict, List, Optional
  import ray._private.ray_constants
  from ray._private.utils import validate_node_labels, check_ray_client_dependencies_installed
label_desc: Use image node_id 3 for calling the RayParams obj's underlying member method code with example usage: obj.update_if_absent() without return types