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

fix: use regexp to extract pytorch version in misc.py #281

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

soulteary
Copy link

@soulteary soulteary commented Jul 30, 2023

Hi @sczhou , I've test above version, all cases are passed:

1.0.0
2.1.2
1.0.0a1
1.0.0a1+git
2.1.0.dev20230728+cu121
2.1.0a0+b5021ba
2.0.0.dev20230219+cu118

online review link: https://regex101.com/r/pfxFFI/1

ref: #148 #279 #280

Copy link

@sloflo sloflo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally. this now fixes #279

Torch now works, tested and verified

@albcunha
Copy link

albcunha commented Sep 4, 2023

hi! This commit wont catch pytorch installs with rocm, such as 1.13.1+rocm5.2. Maybe shouldn´t we remove $ at the end of regex?
Like this?
IS_HIGH_VERSION = [int(m) for m in list(re.findall(r"^(\d+).(\d+).(\d+)([\w\d.].*)?",
torch.version)[0][:3])] >= [1, 12, 0]

This will it will catch 1.13.1 and ignore +rocm5.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants