Try uv for package management (245ms project installation) #281
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Still playing with it.
Installation takes
245ms
vs the typical 2-5 mins withpip
. It also has many other additional benefits. For example, it locks the entire dependency tree, so there is always a reproducible build, so things like #246 would not happen unless we specifically decided to bump dependency.With the current
requirements.txt
there is no dependency locking, so the dependencies may be different in just a couple of days. E.g.., the dependency difference in the image below comes fromSome speed tests:
uv sync
with caches: takes235ms
to install the whole open instruct project and then10ms
to install flash attentionScreen.Recording.2024-08-22.at.10.09.16.AM.mov
uv sync
without caches: takes ~90 seconds (mostly download time; if done in the server, it should much much faster due to parallel download) to install the whole open instruct project and then 10 seconds to install flash attentionScreen.Recording.2024-08-22.at.10.06.23.AM.mov
**
requirements.txt
caches: takes about 2 minshttps://youtu.be/BLYBx5gCWqA
**
requirements.txt
without caches: takes about 4 minshttps://youtu.be/z0VdT29wb6E