Validate wheel name before trying to use it#27
Open
ppham-nv wants to merge 1 commit into
Open
Conversation
…a gitlab package registry may have generic package registry wheel where its file name is not following a standard
| # Validate wheel filename before adding it | ||
| try: | ||
| parse_wheel_filename(wheel_filename) | ||
| except Exception as e: |
Collaborator
There was a problem hiding this comment.
Suggested change
| except Exception as e: | |
| except InvalidWheelFilename as e: |
Let's only catch InvalidWheelFilename here. You'll also need to import it above.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Overview
This PR adds logic to filter out invalid wheel file names first before trying to use it in
get_compatible_wheel. This change help resolves an issue where a pypi index repo could have "generic package" with invalid wheel names.Example of this bug
There may be a case where a gitlab package registry has a combination of both pypi compatible wheel names and "generic package" wheels where it doesn't match the expected file name required by
get_compatible_wheel.Even though my wheel stub is pointed to
vllm-0.10.2+9dd9ca32.nv25.10.cu130I am unable to install it. The reason is due to our gitlab registry contains an invalid wheel file name in the generic repo:vllm-0.10.0+c02c4027.25.6.eclair.cu129but wheel-stub collect all wheels name inWheelFiltervia HTML parsing but then will run into error when it tries to call get_compatible_wheel against an invalid wheel name.Using the suggestion to do
pip install --extra-index-url https://[REDACTED]/packages/pypi/simple vllm==0.10.2+9dd9ca32.nv25.10.cu130works just fine.