Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion docs/hub/jobs-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ Note that you can pass a token with the right permission manually:

## Labels

Add one or more labels to a Job to add some metadata with `-l` or `-label`.
Add one or more labels to a Job to add some metadata with `-l` or `--label`.
You can use such metadata later to filter Jobs on the website or in the CLI.

Add labels with `--label my-label` or key-value labels with `--label key=value`.
Expand All @@ -388,3 +388,26 @@ hf jobs uv run --label fine-tuning --label model=Qwen3-0.6B --label dataset=Capy
```

Note that using the same `key` multiple times causes the last `key=value` to overwrite and discard any previous label with `key`.

### Name a Job

Give a Job a name to make it easier to find and identify in the UI. The name is stored as the `name` label. Names are optional and do not have to be unique. In the UI Jobs will be grouped by name.

```bash
hf jobs run --name daily-report python:3.12 python report.py
```

### Update labels

Update labels on an existing Job with `hf jobs labels`. Passing `--label` replaces all existing labels; passing `--name` alone keeps them:

```bash
# Replace the labels on a Job
hf jobs labels <job_id> --label env=prod --label team=ml

# Name an existing Job (keeps its other labels)
hf jobs labels <job_id> --name daily-report

# Remove all labels from a Job
hf jobs labels <job_id> --clear
```
3 changes: 3 additions & 0 deletions docs/hub/jobs-schedule.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Use `hf jobs uv run ` or `hf jobs run` with a schedule of `@annually`, `@yearly`

# Schedule a Python script with a label
>>> hf jobs scheduled uv run --label fine-tuning @hourly my_script.py

# Schedule a named job (names show up in the UI and do not have to be unique)
>>> hf jobs scheduled run --name hourly-task @hourly python:3.12 python -c "print('This runs every hour!')"
```

Use the same parameters as `hf jobs uv run` and `hf jobs run` to pass environment variables, secrets, timeout, labels, etc.
Expand Down
Loading