You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/en/guides/cli.md
-14Lines changed: 0 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2116,20 +2116,6 @@ Pass `--ssh` to `hf jobs run` (or `hf jobs uv run`) to make the Job's container
2116
2116
2117
2117
Only users with write access to the Job's namespace are allowed in (the Job creator, or members of the owner organization), authenticated by an SSH public key registered at https://huggingface.co/settings/keys.
2118
2118
2119
-
### Network groups
2120
-
2121
-
Pass `--network-group <name>` to `hf jobs run` (or `hf jobs uv run`) to let Jobs of the same owner reach each other on every port. Inside each member, `$HF_NETWORK_GROUP_HOSTNAME` resolves to every Job in the group, and `${HF_NETWORK_GROUP_PREFIX}<alias>` to the members that claimed an alias with `--network-alias <alias>`:
2122
-
2123
-
```bash
2124
-
# Start a server, reachable by the other members of the group as "master"
2125
-
>>> hf jobs run --detach --network-group train --network-alias master python:3.12 python -m http.server 8000
2126
-
2127
-
# Start a client in the same group
2128
-
>>> hf jobs run --detach --network-group train python:3.12 sh -c 'curl --retry 10 --retry-connrefused "http://${HF_NETWORK_GROUP_PREFIX}master:8000/"'
2129
-
```
2130
-
2131
-
Members are resolvable before they are ready, so connect with retries.
2132
-
2133
2119
### UV Scripts (Experimental)
2134
2120
2135
2121
Run UV scripts (Python scripts with inline dependencies) on HF infrastructure. UV scripts are Python scripts that include their dependencies directly in the file using a special comment syntax.
Copy file name to clipboardExpand all lines: docs/source/en/guides/jobs.md
-21Lines changed: 0 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -372,27 +372,6 @@ Connect from a terminal with `hf jobs ssh <job_id>` (or directly with `ssh <job_
372
372
373
373
Only users with write access to the Job's namespace are allowed in (the Job creator, or members of the owner organization), authenticated by an SSH public key registered at https://huggingface.co/settings/keys.
374
374
375
-
## Network groups
376
-
377
-
Pass `network_group="<name>"` to [`run_job`] (or [`run_uv_job`]) to let Jobs of the same owner reach each other on every port. Inside each member, `HF_NETWORK_GROUP_HOSTNAME` resolves to every Job in the group, and `${HF_NETWORK_GROUP_PREFIX}<alias>` to the members that claimed an alias with `network_aliases=[...]`:
Members are resolvable before they are ready, so connect with retries.
395
-
396
375
## Configure Job Timeout
397
376
398
377
Jobs have a default timeout (30 minutes), after which they will automatically stop. This is important to know when running long-running tasks like model training.
Copy file name to clipboardExpand all lines: docs/source/en/package_reference/cli.md
-4Lines changed: 0 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2505,8 +2505,6 @@ $ hf jobs run [OPTIONS] IMAGE COMMAND...
2505
2505
*`-d, --detach`: Run the Job in the background and print the Job ID.
2506
2506
*`--expose INTEGER`: Expose a container port through the jobs proxy. Repeat the flag for multiple ports (e.g. `--expose 8000 --expose 8001`). Each exposed port is reachable on the public jobs domain; access requires an HF token with read access to the job's namespace.
2507
2507
*`--ssh`: Make the job's container reachable over SSH. Connect with `hf jobs ssh <job_id>`. Requires an SSH public key registered on https://huggingface.co/settings/keys.
2508
-
*`--network-group TEXT`: Join a network group. Jobs of the same owner sharing a group are placed together and reach each other on every port. Inside each member, `$HF_NETWORK_GROUP_HOSTNAME` resolves to every member. Lowercase alphanumerics and dashes, 46 characters max.
2509
-
*`--network-alias TEXT`: Claim an alias in the network group. Members reach the jobs claiming it at `${HF_NETWORK_GROUP_PREFIX}<alias>`. Repeat the flag for several aliases. Requires `--network-group`.
2510
2508
*`--resource-group-id TEXT`: The ID of the resource group to create the Job in. Used to control access to resources within an organization and for cost attribution/spending-limit features.
2511
2509
*`--namespace TEXT`: The namespace where the job will be running. Defaults to the current user's namespace.
2512
2510
*`--token TEXT`: A User Access Token generated from https://huggingface.co/settings/tokens.
@@ -2979,8 +2977,6 @@ $ hf jobs uv run [OPTIONS] SCRIPT [SCRIPT_ARGS]...
2979
2977
*`-d, --detach`: Run the Job in the background and print the Job ID.
2980
2978
*`--expose INTEGER`: Expose a container port through the jobs proxy. Repeat the flag for multiple ports (e.g. `--expose 8000 --expose 8001`). Each exposed port is reachable on the public jobs domain; access requires an HF token with read access to the job's namespace.
2981
2979
*`--ssh`: Make the job's container reachable over SSH. Connect with `hf jobs ssh <job_id>`. Requires an SSH public key registered on https://huggingface.co/settings/keys.
2982
-
*`--network-group TEXT`: Join a network group. Jobs of the same owner sharing a group are placed together and reach each other on every port. Inside each member, `$HF_NETWORK_GROUP_HOSTNAME` resolves to every member. Lowercase alphanumerics and dashes, 46 characters max.
2983
-
*`--network-alias TEXT`: Claim an alias in the network group. Members reach the jobs claiming it at `${HF_NETWORK_GROUP_PREFIX}<alias>`. Repeat the flag for several aliases. Requires `--network-group`.
2984
2980
*`--resource-group-id TEXT`: The ID of the resource group to create the Job in. Used to control access to resources within an organization and for cost attribution/spending-limit features.
2985
2981
*`--namespace TEXT`: The namespace where the job will be running. Defaults to the current user's namespace.
2986
2982
*`--token TEXT`: A User Access Token generated from https://huggingface.co/settings/tokens.
help="Join a network group. Jobs of the same owner sharing a group are placed together and reach each other on every port. Inside each member, `$HF_NETWORK_GROUP_HOSTNAME` resolves to every member. Lowercase alphanumerics and dashes, 46 characters max.",
224
-
),
225
-
]
226
-
227
-
NetworkAliasOpt=Annotated[
228
-
list[str] |None,
229
-
Option(
230
-
"--network-alias",
231
-
help="Claim an alias in the network group. Members reach the jobs claiming it at `${HF_NETWORK_GROUP_PREFIX}<alias>`. Repeat the flag for several aliases. Requires `--network-group`.",
232
-
),
233
-
]
234
-
235
219
WithOpt=Annotated[
236
220
list[str] |None,
237
221
Option(
@@ -369,8 +353,6 @@ def jobs_run(
369
353
detach: DetachOpt=False,
370
354
expose: ExposeOpt=None,
371
355
ssh: SshEnabledOpt=False,
372
-
network_group: NetworkGroupOpt=None,
373
-
network_alias: NetworkAliasOpt=None,
374
356
resource_group_id: ResourceGroupIdOpt=None,
375
357
namespace: NamespaceOpt=None,
376
358
token: TokenOpt=None,
@@ -391,8 +373,6 @@ def jobs_run(
391
373
timeout=timeout,
392
374
expose=expose,
393
375
ssh=ssh,
394
-
network_group=network_group,
395
-
network_aliases=network_alias,
396
376
resource_group_id=resource_group_id,
397
377
namespace=namespace,
398
378
)
@@ -408,11 +388,6 @@ def jobs_run(
408
388
out.hint(f"Exposed ports are reachable at (requires an HF token with read access to the job):\n{urls}")
409
389
ifisinstance(job.status.ssh_url, str):
410
390
out.hint(f"Use `hf jobs ssh {job.owner.name}/{job.id}` to open an SSH session into the job.")
411
-
ifnetwork_group:
412
-
out.hint(
413
-
f"Joined network group '{network_group}'. Jobs started with `--network-group {network_group}` reach each other "
414
-
"at `$HF_NETWORK_GROUP_HOSTNAME` (every member) or `${HF_NETWORK_GROUP_PREFIX}<alias>` (members claiming an alias)."
415
-
)
416
391
ifdetach:
417
392
job_ref=f"{job.owner.name}/{job.id}"
418
393
out.hint(f"Use `hf jobs logs -f {job_ref}` to stream logs, or `hf jobs inspect {job_ref}` to check status.")
@@ -963,8 +938,6 @@ def jobs_uv_run(
963
938
detach: DetachOpt=False,
964
939
expose: ExposeOpt=None,
965
940
ssh: SshEnabledOpt=False,
966
-
network_group: NetworkGroupOpt=None,
967
-
network_alias: NetworkAliasOpt=None,
968
941
resource_group_id: ResourceGroupIdOpt=None,
969
942
namespace: NamespaceOpt=None,
970
943
token: TokenOpt=None,
@@ -990,8 +963,6 @@ def jobs_uv_run(
990
963
timeout=timeout,
991
964
expose=expose,
992
965
ssh=ssh,
993
-
network_group=network_group,
994
-
network_aliases=network_alias,
995
966
resource_group_id=resource_group_id,
996
967
namespace=namespace,
997
968
)
@@ -1007,11 +978,6 @@ def jobs_uv_run(
1007
978
out.hint(f"Exposed ports are reachable at (requires an HF token with read access to the job):\n{urls}")
1008
979
ifisinstance(job.status.ssh_url, str):
1009
980
out.hint(f"Use `hf jobs ssh {job.owner.name}/{job.id}` to open an SSH session into the job.")
1010
-
ifnetwork_group:
1011
-
out.hint(
1012
-
f"Joined network group '{network_group}'. Jobs started with `--network-group {network_group}` reach each other "
1013
-
"at `$HF_NETWORK_GROUP_HOSTNAME` (every member) or `${HF_NETWORK_GROUP_PREFIX}<alias>` (members claiming an alias)."
1014
-
)
1015
981
ifdetach:
1016
982
job_ref=f"{job.owner.name}/{job.id}"
1017
983
out.hint(f"Use `hf jobs logs -f {job_ref}` to stream logs, or `hf jobs inspect {job_ref}` to check status.")
0 commit comments