Closed RaulPPelaez closed 1 year ago
@RaulPPelaez is this ready for review?
Yes, thanks.
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
This is ready for review.
@peastman any comments? Otherwise, we can merge.
Looks good to me.
This PR tries to fix #68 by moving all calls to torch.ops.load to the init.py scripts.