{
  "slug": "hf-jobs-run-adds-retries-rerun-schedule-rescheduling-and-port-exposure-93eaab111f1e",
  "title": "hf jobs run adds retries, rerun, schedule rescheduling, and port exposure",
  "tools": [
    "hf"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-10-01T12:12:05.000Z",
  "announced_at": "2026-10-01T12:12:05.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When maintaining a Hugging Face Job workflow, use `--attempts` to retry failures, `hf jobs rerun` to create a fresh Job from a saved spec, and `hf jobs scheduled reschedule` to change a schedule. Use `hf jobs expose` to replace exposed ports on a running Job.",
    "examples": [
      "hf jobs run --attempts 3 --detach python:3.12 python train.py",
      "hf jobs rerun <job_id>",
      "hf jobs scheduled reschedule <scheduled_job_id> \"0 9 * * 1\"\n hf jobs expose <job_id> 8000 --public 9000"
    ],
    "gotchas": [
      "Version: v2.1.0",
      "--attempts <n>: Maximum attempts, including the first run; defaults to 1. `3` allows two retries.",
      "--detach: Run the Job in the background and print its ID.",
      "JOB_ID (required): Job ID to rerun or expose ports for.",
      "SCHEDULED_JOB_ID (required): Scheduled Job ID to reschedule.",
      "SCHEDULE (required): Cron expression or supported preset such as `@daily` or `@hourly`.",
      "PORTS: Positional ports to expose with token-protected access; omitted ports are closed when replacing the configuration.",
      "--public INTEGER: Expose a port without authentication; repeat for multiple ports. May be combined with positional token-protected ports.",
      "--clear: Close all exposed ports.",
      "Prerequisite: The machine must be logged in to Hugging Face; Jobs require a positive credit balance.",
      "Prerequisite: Manage only Jobs you own or Jobs in organizations where you have write permission.",
      "Prerequisite: Accessing token-protected exposed ports requires an HF token with read access to the Job's namespace.",
      "Retries are automatic on failure.",
      "A rerun starts a fresh Job using an existing Job's saved spec, including secrets and hardware settings.",
      "Scheduled Jobs can change their cron expression or preset without being recreated.",
      "Port exposure may be configured at Job creation time or on a running Job.",
      "`expose` provides token-protected access; `expose_public` provides unauthenticated access."
    ]
  },
  "why_it_matters": "When maintaining a Hugging Face Job workflow, retry failed jobs, rerun saved job specifications, reschedule scheduled jobs, or expose job ports.",
  "sources": [
    "https://github.com/huggingface/huggingface_hub/releases/tag/v2.1.0",
    "https://huggingface.co/docs/huggingface_hub/v2.1.1/en/guides/cli",
    "https://huggingface.co/docs/huggingface_hub/main/en/guides/jobs",
    "https://huggingface.co/docs/huggingface_hub/v2.2.0/guides/cli",
    "https://huggingface.co/docs/huggingface_hub/v2.2.0.rc0/package_reference/cli",
    "https://huggingface.co/docs/huggingface_hub/v2.2.0/package_reference/cli",
    "https://huggingface.co/docs/huggingface_hub/v2.1.1/en/guides/jobs",
    "https://github.com/huggingface/huggingface_hub/blob/main/docs/source/en/guides/jobs.md",
    "https://huggingface.co/docs/hub/jobs-configuration"
  ],
  "rank": 0.98061,
  "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-a424eb929dd99d6a-0:gate",
    "evidence_hash": "1988694b2a2b01c7e4be950ab53bebdd7d144d5bdd768b42b1255f9491da806b"
  },
  "review": {
    "draft_hash": "3c2e712106b0f1a1e91ca728c14c1730365817336fd3d8dd201d5f4454e8fe8b",
    "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.98 >= 0.9; 2 needed) and Jev gave 0.74 (>= 0.6 needed)."
  }
}
