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","."]
code: def __init__(
      self,
      jvm_options: Optional[List[str]] = None,
      code_search_path: Optional[List[str]] = None,
      runtime_env: Optional[dict] = None,
      _client_job: bool = False,
      metadata: Optional[dict] = None,
      ray_namespace: Optional[str] = None,
      default_actor_lifetime: str = "non_detached",
      _py_driver_sys_path: Optional[List[str]] = None,
  ):
      #: The jvm options for java workers of the job.
      self.jvm_options = jvm_options or []
      #: A list of directories or jar files that
      #: specify the search path for user code.
      self.code_search_path = code_search_path or []
      # It's difficult to find the error that caused by the
      # code_search_path is a string. So we assert here.
      assert isinstance(self.code_search_path, (list, tuple)), (
          f"The type of code search path is incorrect: "
          f"{type(code_search_path)}"
      )
      self._client_job = _client_job
      #: An opaque metadata dictionary.
      self.metadata = metadata or {}
      #: A namespace is a logical grouping of jobs and named actors.
      self.ray_namespace = ray_namespace
      self.set_runtime_env(runtime_env)
      self.set_default_actor_lifetime(default_actor_lifetime)
      # A list of directories that specify the search path for python workers.
      self._py_driver_sys_path = _py_driver_sys_path or []
  
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 1 to create a new JobConfig object  with example: obj = JobConfig(jvm_options, code_search_path, runtime_env, _client_job, metadata, ray_namespace, default_actor_lifetime, _py_driver_sys_path)