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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
torch.sparse.mm
breaking API changes
#11
Comments
On the current master and with
the code runs through - though even there, the signature seems to be |
i've never set this up before but can we get the unit tests to run on multiple versions of pytorch? |
I am not sure whether I want to support multiple version though, in particular as the sparse API is currently (1.11) declared beta 馃槄 |
okay up to you |
@migalkin , for the first problem: If you do not provide a starting value yourself, it will initialize to torch-ppr/src/torch_ppr/utils.py Line 260 in 921898f
which should sum up to 1. So I guess this is a numerical problem here. |
I played around with it, and the the error seemed to occur when there is large number of non-zero entries in one column. This is intuitive, since the more values we sum, the more error can accumulate. In natural graphs with hub nodes, this can occur. |
Suddenly, everything stopped working 馃槺 presumably because of the changes to torch.sparse.
Particularly, I am on PyTorch 1.10, master branch of PyKEEN and torch-ppr 0.0.5.
Problem 1: the
allclose()
check does not pass now:torch-ppr/src/torch_ppr/utils.py
Lines 221 to 222 in 921898f
MWE:
Looking into the debugger:
adj_sum
does sum up to the number of nodesrtol=1e-4
oratol=1e-4
- the check passesProblem 2: the signature of
torch.sparse.addmm
has changed from the one used inpower_iteration
so the API call fails with the unknown kwarg error.torch-ppr/src/torch_ppr/utils.py
Line 310 in 921898f
In fact, I can't find where those kwargs
input, sparse, dense
come from because the current signature has less readablemat, mat1, mat2
. I traced to the very Torch 1.3.0 and still can't find where those originated from. Where does this signature come from? 馃槄My test env
The text was updated successfully, but these errors were encountered: