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

feat: add caching to resolver #471

Merged
merged 1 commit into from
Oct 24, 2024

Conversation

shubhbapna
Copy link
Collaborator

fixes #359

Summarizing the needs from #358 (and from our previous calls)

  • we shouldn't use caching for install type requirements because we always want the latest version that matches the reqs and constraints and we cannot guarantee that the latest version will exist in the cache. For example:

    • first we resolve numpy<2 which ends up populating the cache with say numpy==1. Then we want to resolve numpy>=1 as an install type req. if we end up using the cache it would return numpy==1 even though there is a numpy==2 that we can use.
    • we want install type reqs to be the latest possible version so that they have the latest possible cve fixes in them
  • the cache is something internal to the resolver and should not be influenced directly by the caller of the resolver

@shubhbapna shubhbapna requested review from dhellmann and tiran October 10, 2024 16:07
@mergify mergify bot added the ci label Oct 10, 2024
src/fromager/resolver.py Show resolved Hide resolved
src/fromager/resolver.py Show resolved Hide resolved
@shubhbapna shubhbapna requested a review from dhellmann October 11, 2024 14:36
@shubhbapna shubhbapna marked this pull request as ready for review October 11, 2024 14:37
@shubhbapna
Copy link
Collaborator Author

@dhellmann anymore changes required?

@mergify mergify bot merged commit c7b3834 into python-wheel-build:main Oct 24, 2024
71 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add caching in resolver
2 participants