Skip to content

Conversation

@Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Mar 1, 2024

Quick benchmarks show it saves around 30s-40s per workflow (both for code quality and CI tests)

Note: running uv instead of pip in Github CI is not yet a first-class citizen but should be the case once astral-sh/uv#1526 is addressed. This is why we need to source env in each step.

@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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.95%. Comparing base (485d313) to head (cfce875).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2072      +/-   ##
==========================================
+ Coverage   82.64%   82.95%   +0.30%     
==========================================
  Files         102      102              
  Lines        9475     9475              
==========================================
+ Hits         7831     7860      +29     
+ Misses       1644     1615      -29     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Wauplin Wauplin marked this pull request as ready for review March 1, 2024 12:47
@Wauplin Wauplin requested review from LysandreJik and julien-c March 1, 2024 12:47
@Wauplin Wauplin mentioned this pull request Mar 1, 2024
4 tasks
Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Awesome, love uv !

@Wauplin Wauplin merged commit 0ab9391 into main Mar 4, 2024
@Wauplin Wauplin deleted the use-uv-in-ci branch March 4, 2024 09:44
uv venv
- name: Install dependencies
run: uv pip install "huggingface_hub[dev] @ ."

Choose a reason for hiding this comment

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

You should be able to do uv pip install --system "huggingface_hub[dev] @ ." on the latest release, if you want to remove the virtualenv (per the PR summary), but using a virtualenv is also good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks @charliermarsh! I just saw the issue has been merged on uv's repo 🎉. Thanks for the direct ping here ❤️

Choose a reason for hiding this comment

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

Of course! It's pretty new so of course ping if you see issues with it.

Copy link

@ArthurZucker ArthurZucker left a comment

Choose a reason for hiding this comment

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

Nice! We'll also do something similar in transformers! Speeds up a lot the resolution as well Related PR: huggingface/transformers#29202

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.

7 participants