ray.job_config.JobConfig
ray.job_config.JobConfig#
- class ray.job_config.JobConfig(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)[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 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.