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
Workflow and code update for numpy versions from 1.15 to 1.21 #352
Conversation
add numpy version to matrix.
add numpy==1.20, 1.21
test numpy 1.22
test numpy 1.21
Codecov Report
@@ Coverage Diff @@
## master #352 +/- ##
=======================================
Coverage 80.43% 80.43%
=======================================
Files 135 135
Lines 11359 11359
=======================================
Hits 9137 9137
Misses 2222 2222
Continue to review full report at Codecov.
|
Don't know why the config does not work in the my-numpy section, does @huzecong have any ideas? |
I think the I'd imagine the |
I see, so if I understand correctly, there are |
I don't think mypy checks numpy code since we've set |
OK, now I think I understand. And I think we are doing or planning to do mypy check with only certain versions. Now the fix would probably be, don't set |
Thanks a lot for fixing this! |
find some more version related sections in code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize two more things
- Now NumPy is on 1.22, would that also work for us? For example, some of Forte check fail because of this: Texer numpy version requirement is outdated forte#634
- We have only updated the test workflow versions, but not the actual install version check (i.e https://github.com/asyml/texar-pytorch/blob/master/requirements.txt and https://github.com/asyml/texar-pytorch/blob/master/setup.py#L35)
|
thanks a lot |
This PR fixes #333 and fixes #341
Code is updated to pass the mypy test with numpy>=1.20 (which fixes #333)
Workflow is updated to enumerate numpy versions (from 1.15 to 1.21), and further include pytorch version (1.7.1 and 1.8.1), which fixes #341
Note: In mypy.ini, I changed
warn_unused_ignores
toFalse
(here) for the enumeration of numpy versions. Not sure if there are better ways to do it like in mypy-torch. Looks adding a same line under [mypy-numpy] doesn't work.