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
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -753,10 +753,16 @@ Run UV scripts (Python scripts with inline dependencies) on HF infrastructure:
753
753
>>> hf jobs uv run ml_training.py --flavor gpu-t4-small
754
754
755
755
# Pass arguments to script
756
-
>>> hf jobs uv run process.py input.csv output.parquet --repo data-scripts
756
+
>>> hf jobs uv run process.py input.csv output.parquet
757
+
758
+
# Add dependencies
759
+
>>> hf jobs uv run --with transformers --with torch train.py
757
760
758
761
# Run a script directly from a URL
759
762
>>> hf jobs uv run https://huggingface.co/datasets/username/scripts/resolve/main/example.py
763
+
764
+
# Run a command
765
+
>>> hf jobs uv run --with lighteval python -c "import lighteval"
760
766
```
761
767
762
768
UV scripts are Python scripts that include their dependencies directly in the file using a special comment syntax. This makes them perfect for self-contained tasks that don't require complex project setups. Learn more about UV scripts in the [UV documentation](https://docs.astral.sh/uv/guides/scripts/).
UV scripts are Python scripts that include their dependencies directly in the file using a special comment syntax. This makes them perfect for self-contained tasks that don't require complex project setups. Learn more about UV scripts in the [UV documentation](https://docs.astral.sh/uv/guides/scripts/).
0 commit comments