Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add incremental resolution benchmark to codspeed #6418

Open
konstin opened this issue Aug 22, 2024 · 0 comments
Open

Add incremental resolution benchmark to codspeed #6418

konstin opened this issue Aug 22, 2024 · 0 comments
Labels
help wanted Contribution especially encouraged performance Potential performance improvement

Comments

@konstin
Copy link
Member

konstin commented Aug 22, 2024

There are three scenarios for the uv resolver:

  • Fresh resolution: We have a set of requirements, but no lockfile. We need to figure a resolution without any prior context. These are continuously tested by resolve_warm_airflow, resolve_warm_jupyter and resolve_warm_jupyter_universal.
  • Incremental resolution: We have a lockfile that gives us preferences for versions (and help prefetching), but it's incompatible or incomplete with the requirements. This happens in a lot of cases, e.g. when pyproject.toml changed due to a version upgrade, with uv lock --upgrade-package or when using uv run --with. Our goal is to resolve versions that preserve most of the existing lockfile.
  • We run uv lock and the lockfile matches: We only need to check against package.metadata.requires-dist.

While we have good coverage for the first case and the last case is fast beyond the need for optimization (<20ms even for transformers with all extras), we don't have good coverage for the middle case. We should add a scenario to codspeed, with a universal resolution where the requirements changes so that they don't match uv.lock anymore.

@konstin konstin added help wanted Contribution especially encouraged performance Potential performance improvement labels Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Contribution especially encouraged performance Potential performance improvement
Projects
None yet
Development

No branches or pull requests

1 participant