qai_hub.get_job_summaries

get_job_summaries(offset=0, limit=50, creator=None, state=None, type=None)

Returns summary information for jobs matching the specified filters.

Parameters:
  • creator (Optional[str]) – Fetch only jobs created by the specified creator. If unspecified, fetch all jobs owned by your organization.

  • state (Optional[State] | List[State]) – Fetch only jobs that are currently in the specified state(s).

  • type (Optional[JobType]) – Fetch only jobs of the specified type (compile, profile, etc.).

  • limit (int) – Maximum number of jobs to return.

  • offset (int) – How many jobs to skip over (in order to retrieve older jobs).

Returns:

List of job summaries in reverse chronological order (i.e., most recent first).

Return type:

List[JobSummary]

Examples

Print a selection of recent jobs:

import qai_hub as hub

running = hub.get_job_summaries(limit=10, state=hub.JobStatus.all_running_states())
failed = hub.get_job_summaries(limit=10, state=hub.JobStatus.State.FAILED)
more_failed = hub.get_job_summaries(offset=10, limit=10, state=hub.JobStatus.State.FAILED)
for j in running + failed + more_failed:
    print(f"{j.job_id}: {j.name} running since {j.date}: currently {j.status.code}")