ray.job_config.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', _py_driver_sys_path: List[str] | None = None)[source]#
A 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 – 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 andPYTHONPATH
in Python. See Ray cross-language programming for more details.runtime_env – A runtime environment dictionary.
metadata – An opaque metadata dictionary.
ray_namespace – A namespace 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 actor lifetimes for more details.
Methods
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.
A list of directories or jar files that specify the search path for user code.
An opaque metadata dictionary.
A namespace is a logical grouping of jobs and named actors.