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] Fixed version comparison to include prerelease versions #1877

Merged
merged 3 commits into from
Apr 18, 2022

Conversation

mattcasey02
Copy link
Contributor

@mattcasey02 mattcasey02 commented Apr 13, 2022

Motivation

Currently all tagged versions of torch 1.11.0 have version 1.11.0a0. Previously the comparison to 1.11.0 failed and self._sync_params() was still used, causing an error. This fix should include all versions of 1.11.

Modification

Changed a line of code to include prerelease versions in version checking.

BC-breaking (Optional)

N/A

Use cases (Optional)

N/A

Checklist

Before PR:

  • I have read and followed the workflow indicated in the CONTRIBUTING.md to create this PR.
  • Pre-commit or linting tools indicated in CONTRIBUTING.md are used to fix the potential lint issues.
  • Bug fixes are covered by unit tests, the case that causes the bug should be added in the unit tests.
  • New functionalities are covered by complete unit tests. If not, please add more unit test to ensure the correctness.
  • The documentation has been modified accordingly, including docstring or example tutorials.

After PR:

  • If the modification has potential influence on downstream or other related projects, this PR should be tested with some of those projects, like MMDet or MMCls.
  • CLA has been signed and all committers have signed the CLA in this PR.

Currently all tagged versions of torch 1.11.0 have version 1.11.0a0. Previously the comparison to 1.11.0 failed and self._sync_params() was still used, causing an error. This fix should include all versions of 1.11.
@CLAassistant
Copy link

CLAassistant commented Apr 13, 2022

CLA assistant check
All committers have signed the CLA.

Didn't realize that 1.11.0 was mentioned multiple times in the file. This fixes the other instances.
@zhouzaida zhouzaida requested a review from teamwong111 April 14, 2022 01:32
@zhouzaida
Copy link
Collaborator

Hi @mattcasey02 , thanks for your contribution. Did you install pytorch build from source? I found the pre-build packages provided by torch are 1.11.0+cu113 or 1.11.0+cu115 which do not contain a0.

@mattcasey02
Copy link
Contributor Author

Yes I installed from source. If you check out any of the tagged versions of torch 1.11 and look at the version.txt file they all have it listed as 1.11.0a0. For example, see here: https://github.com/pytorch/pytorch/blob/v1.11.0/version.txt

@zhouzaida
Copy link
Collaborator

Yes I installed from source. If you check out any of the tagged versions of torch 1.11 and look at the version.txt file they all have it listed as 1.11.0a0. For example, see here: https://github.com/pytorch/pytorch/blob/v1.11.0/version.txt

Got it. Thanks for your description.

@zhouzaida zhouzaida requested a review from ZwwWayne April 17, 2022 05:07
@zhouzaida zhouzaida changed the title Fixed version comparison to include prerelease versions [Fix] Fixed version comparison to include prerelease versions Apr 18, 2022
@zhouzaida zhouzaida merged commit 6f6b17e into open-mmlab:master Apr 18, 2022
@mattcasey02 mattcasey02 deleted the fix-versioning-comparison branch April 18, 2022 02:48
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.

5 participants