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 pytorch version check #2544

Merged
merged 2 commits into from
Jan 19, 2021
Merged

Fix pytorch version check #2544

merged 2 commits into from
Jan 19, 2021

Conversation

VoVAllen
Copy link
Collaborator

Description

Checklist

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [$CATEGORY] (such as [NN], [Model], [Doc], [Feature]])
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage
  • Code is well-documented
  • To the my best knowledge, examples are either not affected by this change,
    or have been fixed to be compatible with this change
  • Related issue is referred in this PR
  • If the PR is for a new model/paper, I've updated the example index here.

Changes

dgl_warning("Detected an old version of PyTorch. Suggest using torch>=1.5.0 "
"for the best experience.")
raise Exception("Detected an old version of PyTorch. Please update torch>=1.5.0 "
"for the best experience.")
Copy link
Member

Choose a reason for hiding this comment

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

Have you tested if this works for nightly build?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It can handle the nightly version.

LooseVersion("1.7.1dev20210119") > LooseVersion("1.5") # True
LooseVersion("1.7.1dev20210119") > LooseVersion("1.7") # True
LooseVersion("1.7.1dev20210119") > LooseVersion("1.7.1") # True
LooseVersion("1.7.1dev20210119") > LooseVersion("1.8") # False

@jermainewang jermainewang merged commit 917a755 into dmlc:master Jan 19, 2021
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.

2 participants