Skip to main content

Jobs - Python SDK

client.jobs is the generic job-kernel view across long-running task types. Use the domain-specific Training or Evaluation resource when you need fields specific to that domain.

Overview​

Available Operations​

MethodDescription
list(...)Page jobs across domains.
get(id)Read one generic job.
logs(id, tail=None)Read the newest log lines.
cancel(id)Cancel a supported non-terminal job.

list​

Page jobs across domains.

Request​

Optional type, status, page, page_size. The service uses lowercase domain values such as train and eval.

Response​

PageResult[JobStatusView].

get​

Read one generic job.

Request​

id: str required.

Response​

JobStatusView.

logs​

Read the newest log lines.

Request​

id required; optional tail.

Response​

list[str].

cancel​

Cancel a supported non-terminal job.

Request​

id: str required.

Response​

None.

Field Reference and Examples​

JobStatusView includes id, jobType, status, progress, progressInfo, metrics, artifacts, error, model/dataset/cluster context, and timestamps.

page = client.jobs.list(type="train", status="RUNNING", page=1, page_size=20)
job = client.jobs.get("job-id")
logs = client.jobs.logs("job-id", tail=200)
client.jobs.cancel("job-id")

All methods use the shared authentication and typed error behavior described in Response Conventions and Retry and Security.