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

Move all torch.ops.load calls to the __init__.py scripts #89

Merged
merged 9 commits into from
Mar 17, 2023

Conversation

RaulPPelaez
Copy link
Contributor

This PR tries to fix #68 by moving all calls to torch.ops.load to the init.py scripts.

@raimis
Copy link
Contributor

raimis commented Mar 8, 2023

@RaulPPelaez is this ready for review?

@RaulPPelaez
Copy link
Contributor Author

Yes, thanks.

@raimis raimis requested review from raimis and peastman March 8, 2023 10:31
src/pytorch/neighbors/__init__.py Outdated Show resolved Hide resolved
src/pytorch/__init__.py Outdated Show resolved Hide resolved
@RaulPPelaez
Copy link
Contributor Author

RaulPPelaez commented Mar 9, 2023

My last commit broke the tests. This made me notice there is something weird about make install. See its output:

Install the project...
-- Install configuration: ""
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/libNNPOpsPyTorch.so
-- Set runtime path of "/usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/libNNPOpsPyTorch.so" to ""
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/__init__.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/BatchedNN.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/CFConv.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/CFConvNeighbors.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/EnergyShifter.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/OptimizedTorchANI.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/SpeciesConverter.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/SymmetryFunctions.py
-- Up-to-date: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/__init__.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/getNeighborPairs.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/neighbors/__init__.py
-- Installing: /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/neighbors/getNeighborPairs.py

The second time init.py is mentioned it says "up to date", and in fact

$ diff /usr/share/miniconda3/envs/nnpops/lib/python3.8/site-packages/NNPOps/{neighbors,}/__init__.py

Prints nothing, i.e NNPOps/neighbors/init.py overwrites NNPOps/init.py

@raimis
Copy link
Contributor

raimis commented Mar 9, 2023

Remove

NNPOps/CMakeLists.txt

Lines 80 to 81 in 293d908

src/pytorch/neighbors/__init__.py
src/pytorch/neighbors/getNeighborPairs.py

@RaulPPelaez
Copy link
Contributor Author

This is ready for review.

src/pytorch/__init__.py Outdated Show resolved Hide resolved
Copy link
Contributor

@raimis raimis left a comment

Choose a reason for hiding this comment

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

Looks good!

@raimis
Copy link
Contributor

raimis commented Mar 17, 2023

@peastman any comments? Otherwise, we can merge.

@peastman
Copy link
Member

Looks good to me.

@raimis raimis merged commit c8690ac into openmm:master Mar 17, 2023
@RaulPPelaez RaulPPelaez deleted the fix_torch_load branch March 22, 2023 16:06
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.

getNeighborPairs error
3 participants