{
  "slug": "hf-jobs-ls-and-list-jobs-support-server-side-filters-and-lazy-pagination-a34644f7fa95",
  "title": "hf jobs ls and list_jobs support server-side filters and lazy pagination",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-06-25T12:48:12.000Z",
  "announced_at": "2026-06-25T12:48:12.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When listing Jobs, use `list_jobs(status=..., labels=...)` to filter server-side and iterate its paginated results lazily; use `hf jobs ls` with `--status`, repeated `--label`, and `--limit` to filter and cap CLI output. Use `--limit 0` to show all Jobs.",
    "examples": [
      "from huggingface_hub import list_jobs\n\nfor job in list_jobs(status=[\"RUNNING\", \"SCHEDULING\"], labels={\"env\": \"prod\"}):\n    print(job.id)",
      "hf jobs ls --status running,scheduling --label env=prod --label team=ml --limit 500",
      "hf jobs ls -a --limit 0"
    ],
    "gotchas": [
      "Version: v1.21.0",
      "list_jobs(status): A status string or list of statuses; examples include `RUNNING` and `SCHEDULING`.",
      "list_jobs(labels): A dictionary of label key/value pairs used to filter Jobs.",
      "--status: Filters by status; accepts comma-separated or repeated statuses. Cannot be combined with `-a`/`--all`.",
      "-l, --label TEXT: Filters by `key=value` label; repeat to require several labels. A Job must match every filter.",
      "-a, --all: Shows all Jobs; cannot be combined with `--status`.",
      "--limit INTEGER: Maximum Jobs displayed; default is 100. Set to 0 for no limit.",
      "-f, --filter TEXT: Deprecated; use `--status` and `--label` instead.",
      "`-f`/`--filter` is deprecated.",
      "Glob patterns (`data-*`), negation (`key!=value`), and filtering by `id`, `image`, or `command` are no longer supported."
    ]
  },
  "why_it_matters": "List and process Jobs in a repository, filtering by status or labels and handling large result sets.",
  "before": "The CLI used `-f`/`--filter` for client-side filtering, including glob patterns, negation, and filtering by `id`, `image`, or `command`; `list_jobs()` returned results without lazy page-by-page iteration.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v1.21.0",
    "https://github.com/huggingface/huggingface_hub/pull/4395",
    "https://huggingface.co/docs/huggingface_hub/guides/jobs",
    "https://huggingface.co/docs/huggingface_hub/en/package_reference/cli"
  ],
  "rank": 0.97045,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v2+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "wave2b-20261017",
    "verdict_id": "wave2b-20261017:wave2b-20261017-b50cc57ad1ad068f-0:gate",
    "evidence_hash": "974914f1f1f23dbfae2d01b5ba5e31daf5d839bcaa6aef020d8addfd09300025"
  },
  "review": {
    "draft_hash": "d4475df32d765e79625b9a9510a43548bf2e748c4b5da15af70688b4fc25778a",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "wave2b-20261017:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.97 >= 0.9; 2 needed) and Jev gave 0.80 (>= 0.6 needed)."
  }
}
