Skip to content

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Aug 13, 2025

support hf jobs uv run command in addition to hf jobs uv run script.py as in the official uv

this is useful to run cli commands from python packages, e.g.

hf jobs uv run --with lighteval -s HF_TOKEN lighteval endpoint inference-providers "model_name=openai/gpt-oss-20b,provider=groq" "lighteval|gsm8k|0|0"

@lhoestq lhoestq requested a review from Wauplin August 13, 2025 12:48
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Contributor

@hanouticelina hanouticelina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I left one comment, otherwise everything else looks good to me

Comment on lines +10370 to +10371
if script.startswith("http://") or script.startswith("https://") or not script.endswith(".py"):
# Direct URL execution or command - no upload needed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe more robust to check for the presence of a file here because the script could be any file type, like a .sh file, not just one ending in .py.

Suggested change
if script.startswith("http://") or script.startswith("https://") or not script.endswith(".py"):
# Direct URL execution or command - no upload needed
is_url = script.startswith("http://") or script.startswith("https://")
if is_url or not os.path.isfile(script):
# Direct URL execution or command - no upload needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants