aiqm / torchani

Accurate Neural Network Potential on PyTorch
https://aiqm.github.io/torchani/
MIT License
460 stars 127 forks source link

Overload of nonzero is deprecated #579

Closed RMeli closed 3 years ago

RMeli commented 3 years ago

Overload of nonzero deprecated in PyTorch 1.7:

torchani/aev.py:195: UserWarning: This overload of nonzero is deprecated:
    nonzero()
Consider using one of the following signatures instead:
    nonzero(*, bool as_tuple) (Triggered internally at  /opt/conda/conda-bld/pytorch_1607370141920/work/torch/csrc/utils/python_arg_parser.cpp:882.)
  in_cutoff = (distances <= cutoff).nonzero()
RMeli commented 3 years ago

Wooops, I looked at open issues but not open PRs. =)

IgnacioJPickering commented 3 years ago

Closing this since we are waiting for pytorch to fix an issue in order to address it