JobConfig#
- class ray.job_config.JobConfig(jvm_options: List[str] | None = None, code_search_path: List[str] | None = None, runtime_env: dict | None = None, _client_job: bool = False, metadata: dict | None = None, ray_namespace: str | None = None, default_actor_lifetime: str = 'non_detached', _disable_job_level_lineage_reconstruction: bool = False, _py_driver_sys_path: List[str] | None = None)[source]#
Bases:
objectA class used to store the configurations of a job.
Examples
import ray from ray.job_config import JobConfig ray.init(job_config=JobConfig(default_actor_lifetime="non_detached"))
- Parameters:
jvm_options (List[str] | None) – The jvm options for java workers of the job.
code_search_path (List[str] | None) – A list of directories or jar files that specify the search path for user code. This will be used as
CLASSPATHin Java andPYTHONPATHin Python. See Ray cross-language programming for more details.runtime_env (dict | None) – A runtime environment dictionary.
_client_job (bool) – Whether this job was submitted via Ray Client.
metadata (dict | None) – An opaque metadata dictionary.
ray_namespace (str | None) – A namespace is a logical grouping of jobs and named actors.
default_actor_lifetime (str) – The default value of actor lifetime, can be “detached” or “non_detached”. See actor lifetimes for more details.
_disable_job_level_lineage_reconstruction (bool) – Whether to turn off Ray Core lineage reconstruction for this job, leaving the application responsible for reconstructing its own lost objects. When
True, the job’s workers never pin object lineage. WhenFalse, the cluster-levellineage_pinning_enabledsystem config applies. Defaults toFalse. This config is currently experimental._py_driver_sys_path (List[str] | None) – A list of directories that specify the search path for python workers.
Methods
Set logging config from a dict or LoggingConfig if not already configured.
Generates a JobConfig object from json.
Set the default actor lifetime, which can be "detached" or "non_detached".
Add key-value pair to the metadata dictionary.
Set the logging configuration for the job.
Set Ray namespace.
Modify the runtime_env of the JobConfig.
Attributes
The jvm options for java workers of the job.
An opaque metadata dictionary.
A namespace is a logical grouping of jobs and named actors.