Repository navigation
Correct hf jobs/spaces --timeout help: durations are int, not int/float - #4477
Conversation
|
Thanks for noticing! Preferable to just update the help text yes. User can do "90m" instead of "1.5h" to avoid decimal values. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 8267b71. Configure here.
Following review on huggingface#4477: instead of adding float support, correct the advertised help. The --timeout options of `hf jobs` / `hf spaces` (and the HfApi.run_job timeout docstrings) said "int/float with s/m/h/d", but the string form only accepts integers (e.g. use "90m" instead of "1.5h"). Drop the misleading "float" and regenerate the CLI reference doc to match.
8267b71 to
2d90b2c
Compare
Following review on huggingface#4477: instead of adding float support, correct the advertised help. The --timeout options of `hf jobs` / `hf spaces` (and the HfApi.run_job timeout docstrings) said "int/float with s/m/h/d", but the string form only accepts integers (e.g. use "90m" instead of "1.5h"). Drop the misleading "float" and regenerate the CLI reference doc to match.
2d90b2c to
c9d7d19
Compare
|
@Sreekant13 can you update the PR title and description accordingly now? other than that we should be good to merge once CI is green 🤗 |
|
Thank you so much @Wauplin! Switched to just fixing the help text as you suggested and dropped "float" from the Will update the Title and Description now as well. |
|
Great, merged it! |
|
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. |
|
Thanks a lot, @Wauplin! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4477 +/- ##
==========================================
+ Coverage 75.00% 75.92% +0.92%
==========================================
Files 145 177 +32
Lines 13978 22917 +8939
==========================================
+ Hits 10484 17400 +6916
- Misses 3494 5517 +2023 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
This PR has been shipped as part of the v1.23.0 release. |

Following the review, instead of adding float support this just corrects the misleading help.
The
--timeoutoption onhf jobs run/hf jobs wait/hf spaces wait(and the matchingHfApi.run_jobtimeout docstrings) advertisedint/float with s/m/h/d, but the string-with-unit form only accepts integers, so--timeout 1.5hraisedValueError. This dropsfloatfrom the help so the advertised format matches what's accepted. Users can write90minstead of1.5h. Regenerated the CLI reference doc (package_reference/cli.md) to match.Addresses #4476.