ray.job_submission.JobSubmissionClient#
- class ray.job_submission.JobSubmissionClient(address: str | None = None, create_cluster_if_needed: bool = False, cookies: Dict[str, Any] | None = None, metadata: Dict[str, Any] | None = None, headers: Dict[str, Any] | None = None, verify: str | bool | None = True)[source]#
Bases:
SubmissionClient
A local client for submitting and interacting with jobs on a remote cluster.
Submits requests over HTTP to the job server on the cluster using the REST API.
- Parameters:
address – Either (1) the address of the Ray cluster, or (2) the HTTP address of the dashboard server on the head node, e.g. “http://<head-node-ip>:8265”. In case (1) it must be specified as an address that can be passed to ray.init(), e.g. a Ray Client address (ray://<head_node_host>:10001), or “auto”, or “localhost:<port>”. If unspecified, will try to connect to a running local Ray cluster. This argument is always overridden by the RAY_ADDRESS environment variable.
create_cluster_if_needed – Indicates whether the cluster at the specified address needs to already be running. Ray doesn’t start a cluster before interacting with jobs, but third-party job managers may do so.
cookies – Cookies to use when sending requests to the HTTP job server.
metadata – Arbitrary metadata to store along with all jobs. New metadata specified per job will be merged with the global metadata provided here via a simple dict update.
headers – Headers to use when sending requests to the HTTP job server, used for cases like authentication to a remote cluster.
verify – Boolean indication to verify the server’s TLS certificate or a path to a file or directory of trusted certificates. Default: True.
Methods
Delete a job in a terminal state and all of its associated data.
DeveloperAPI: This API may change across minor Ray releases.
Get the latest status and other information associated with a job.
Get all logs produced by a job.
Get the most recent status of a job.
PublicAPI (beta): This API is in beta and may change before becoming stable.
List all jobs along with their status and other information.
Request a job to exit asynchronously.
Submit and execute a job asynchronously.
Get an iterator that follows the logs of a job.