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 deprecated torch.Tensor.nonzero usage #86

Merged
merged 2 commits into from
Oct 2, 2020
Merged

Conversation

mberr
Copy link
Member

@mberr mberr commented Sep 1, 2020

Closes #79

This is the default behaviour, but as of torch 1.6. emits a deprecation warning that this will change in future versions.
@mberr mberr requested a review from lvermue September 1, 2020 09:04
@codecov
Copy link

codecov bot commented Sep 1, 2020

Codecov Report

Merging #86 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #86   +/-   ##
=======================================
  Coverage   69.47%   69.47%           
=======================================
  Files          91       91           
  Lines        5549     5549           
  Branches      677      677           
=======================================
  Hits         3855     3855           
  Misses       1498     1498           
  Partials      196      196           
Impacted Files Coverage Δ
src/pykeen/evaluation/evaluator.py 67.42% <100.00%> (ø)
src/pykeen/training/lcwa.py 34.17% <100.00%> (ø)
src/pykeen/version.py 75.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 526d674...4db8f5f. Read the comment docs.

@cthoyt
Copy link
Member

cthoyt commented Sep 1, 2020

@mberr should we add multiple test environments on travis CI for different versions of PyTorch (1.6, 1.7?)

@mberr
Copy link
Member Author

mberr commented Sep 1, 2020

@mberr should we add multiple test environments on travis CI for different versions of PyTorch (1.6, 1.7?)

If you want to maintain compatibility, we should.

However, we could also only (guarantee to) support the latest version.

@cthoyt
Copy link
Member

cthoyt commented Sep 1, 2020

@mberr i think just supporting the most recent version is fine until we see lots of people using it in their papers :)

Copy link
Member

@lvermue lvermue left a comment

Choose a reason for hiding this comment

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

👍

@cthoyt
Copy link
Member

cthoyt commented Oct 2, 2020

@cthoyt cthoyt merged commit 852e25e into master Oct 2, 2020
@cthoyt cthoyt deleted the fix-nonzero-usage branch October 2, 2020 11:54
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.

Fix usage of nonzero for PyTorch 1.7+
3 participants