class_docstr: A class used to store the configurations of a job.
  
  Examples:
      .. testcode::
          :hide:
  
          import ray
          ray.shutdown()
  
      .. testcode::
  
          import ray
          from ray.job_config import JobConfig
  
          ray.init(job_config=JobConfig(default_actor_lifetime="non_detached"))
  
  Args:
      jvm_options: The jvm options for java workers of the job.
      code_search_path: A list of directories or jar files that
          specify the search path for user code. This will be used as
          `CLASSPATH` in Java and `PYTHONPATH` in Python.
          See :ref:`Ray cross-language programming <cross_language>` for more details.
      runtime_env: A :ref:`runtime environment <runtime-environments>` dictionary.
      metadata: An opaque metadata dictionary.
      ray_namespace: A :ref:`namespace <namespaces-guide>`
          is a logical grouping of jobs and named actors.
      default_actor_lifetime: The default value of actor lifetime,
          can be "detached" or "non_detached".
          See :ref:`actor lifetimes <actor-lifetimes>` for more details.
class_docstr_tok: ["A","class","used","to","store","the","configurations","of","a","job",".","Examples",":","..","testcode",":",":",":","hide",":","import","ray","ray.shutdown","(",")","..","testcode",":",":","import","ray","from","ray.job_config","import","JobConfig","ray.init","(","job_config=JobConfig","(","default_actor_lifetime=","''","non_detached","''",")",")","Args",":","jvm_options",":","The","jvm","options","for","java","workers","of","the","job",".","code_search_path",":","A","list","of","directories","or","jar","files","that","specify","the","search","path","for","user","code",".","This","will","be","used","as","`","CLASSPATH","`","in","Java","and","`","PYTHONPATH","`","in","Python",".","See",":","ref",":","`","Ray","cross-language","programming","<","cross_language",">","`","for","more","details",".","runtime_env",":","A",":","ref",":","`","runtime","environment","<","runtime-environments",">","`","dictionary",".","metadata",":","An","opaque","metadata","dictionary",".","ray_namespace",":","A",":","ref",":","`","namespace","<","namespaces-guide",">","`","is","a","logical","grouping","of","jobs","and","named","actors",".","default_actor_lifetime",":","The","default","value","of","actor","lifetime",",","can","be","``","detached","''","or","``","non_detached","''",".","See",":","ref",":","`","actor","lifetimes","<","actor-lifetimes",">","`","for","more","details","."]
docstr: Return the protobuf structure of JobConfig.
docstr_tok: ["Return","the","protobuf","structure","of","JobConfig","."]
code: def _get_proto_job_config(self):
      """Return the protobuf structure of JobConfig."""
      # TODO(edoakes): this is really unfortunate, but JobConfig is imported
      # all over the place so this causes circular imports. We should remove
      # this dependency and pass in a validated runtime_env instead.
      import ray.core.generated.common_pb2 as common_pb2
      from ray._private.utils import get_runtime_env_info
  
      if self._cached_pb is None:
          pb = common_pb2.JobConfig()
          if self.ray_namespace is None:
              pb.ray_namespace = str(uuid.uuid4())
          else:
              pb.ray_namespace = self.ray_namespace
          pb.jvm_options.extend(self.jvm_options)
          pb.code_search_path.extend(self.code_search_path)
          pb.py_driver_sys_path.extend(self._py_driver_sys_path)
          for k, v in self.metadata.items():
              pb.metadata[k] = v
  
          parsed_env = self._validate_runtime_env()
          pb.runtime_env_info.CopyFrom(
              get_runtime_env_info(
                  parsed_env,
                  is_job_runtime_env=True,
                  serialize=False,
              )
          )
  
          if self._default_actor_lifetime is not None:
              pb.default_actor_lifetime = self._default_actor_lifetime
          self._cached_pb = pb
  
      return self._cached_pb
  
file_path: ray/python/ray/job_config.py
imports: import uuid
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union
  from ray.util.annotations import PublicAPI
label_desc: Use image node_id 8 for calling the JobConfig obj's underlying member method code with example usage: obj._get_proto_job_config() and returns: self