Fix torch.__version__ for PEP440#15682
Conversation
Summary of ChangesHello @EduardDurech, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors how PyTorch version numbers are handled throughout the codebase. The primary goal is to eliminate potential bugs arising from incorrect string-based version comparisons, particularly when dealing with versions like '2.10' versus '2.6'. By adopting the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the issue of improper version string comparison by using packaging.version.parse as per PEP 440. The changes are sound. I've provided a couple of suggestions to improve maintainability by reducing code duplication and redundant imports. Overall, this is a good fix.
076938c to
81fbd97
Compare
kartikx
left a comment
There was a problem hiding this comment.
Thank you for the PR, these changes are helpful.
The torch_release util can also help in other locations that are manually parsing the release.
For example:
sglang/python/sglang/srt/server_args.py
Lines 4562 to 4570 in 0d0367e
sglang/python/sglang/srt/server_args.py
Lines 4627 to 4628 in 0d0367e
|
@kartikx updated all instances, if anyone has any suggestions please contribute review, I don't have time to maintain the PR (also if this could be merged? 😃) |
|
The changes look good to me, however I do not have CI perms. @fzyzcjy Can you please take a look since you have also been doing refactoring changes recently? |
|
/gemini review |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
/tag-and-rerun-ci |
|
@Kangyan-Zhou @kartikx could one of you guys rerun the CLI and bring this up to admins? It's crazy such a basic, fundamental, standard PR takes a month to merge... |
7b0be5b to
07d6fec
Compare
|
The CI is broken, I'm no longer maintaining this PR, if SGLang doesn't merge it SGLang's problem |
Yes we also realized our review process is completely broken, and are working to improve it asap. Sry for the long review and merge process. |
|
@Kangyan-Zhou thank you, I know you guys have a lot and it's difficult to manage 1.5k PRs but it blocks us quite often for doing development, is it possible to have a fast-track or some internal chat with you guys when we want to do PRs? We're doing things at scale (>10k GH200) and fully transparent with data, models, repos, we have our model PR'd to SGLang and are constantly training new versions https://huggingface.co/swiss-ai, it would be nice if we could have a bit more contact with you guys because I'm waiting on average 1 month for PRs now and have to rebase We're quite active with SGLang and multiple people, we'd like to contribute but the current workflow is very unappealing for contributors, some example PRs #9156 Thank you |
|
@EduardDurech could you please join sglang slack and dm me? Thanks! |
| get_sp_group, | ||
| get_ulysses_parallel_world_size, | ||
| ) | ||
| from sglang.srt.utils.common import torch_release |
There was a problem hiding this comment.
please avoid importing sglang.srt in multimodal_gen
There was a problem hiding this comment.
@mickqian would you like me to make a version utils? Or just duplicate the torch vesrion in https://github.com/sgl-project/sglang/blob/main/python/sglang/multimodal_gen/utils.py?
https://peps.python.org/pep-0440