-
Notifications
You must be signed in to change notification settings - Fork 648
Error when running inference on DPA-3 #4952
Hello,
I am trying to run LAMMPS with DPA-3. I installed Deepmd from the source code with pip install git+https://github.com/deepmodeling/deepmd-kit.git. When running LAMMPS simulation I get the following error:
deepmd/pt/model/descriptor/repformers.py", line 64, in forward
argument8,
) -> torch.Tensor:
raise NotImplementedError(
~~~~~~~~~~~~~~~~~~~~~~~~~~
"border_op is not available since customized PyTorch OP library is not built when freezing the model. "
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"See documentation for DPA-2 for details."
~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
)
builtins.NotImplementedError: border_op is not available since customized PyTorch OP library is not built when freezing the model. See documentation for DPA-2 for details. (/home/prg/Softwares/ML_Packages/deepmd_v3/deepmd-kit/source/lmp/pair_deepmd.cpp:253)
Last command: run 10000
I tried following the solution provided in this issue, however installing with DP_VARIANT=cuda DP_ENABLE_PYTORCH=1 pip install git+https://github.com/deepmodeling/deepmd-kit.git@devel results in the same issue.
I am using PyTorch 2.7.0+cu128; DeePMD-kit v3.1.1.dev70+gaca4e8c48; with Python 3.13.5. I would appreciate any suggestions for fixing this error.
Thanks!
All reactions
Hello,
I am trying to run LAMMPS with DPA-3. I installed Deepmd from the source code with
pip install git+https://github.com/deepmodeling/deepmd-kit.git. When running LAMMPS simulation I get the following error:deepmd/pt/model/descriptor/repformers.py", line 64, in forward argument8, ) -> torch.Tensor: raise NotImplementedError( ~~~~~~~~~~~~~~~~~~~~~~~~~~ "border_op is not available since customized PyTorch OP library is not built when freezing the model. " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "See documentation for DPA-2 for details." ~~~~~~~~~~...
Replies: 5 comments 2 replies
Hi @nisargjoshi10, did you re-freeze your model after installing with DP_VARIANT=cuda DP_ENABLE_PYTORCH=1 pip install git+https://github.com/deepmodeling/deepmd-kit.git@devel, i.e. dp --pt freeze with your trained checkpoint? This is required for .pth model to correctly link the compiled op.
BTW, I'm wondering which model did you use, since the logs here indicate maybe you are using DPA-2 rather than DPA-3?
All reactions
Hi @iProzd yes I did re-freeze my model with dp --pt freeze. I'm using DPA-3. Here's the freeze command I've been using dp --pt freeze -c DPA-3.1-3M.pt -o frozen_model.pth --model-branch H2O_H2O-PD.
I'm also not sure why the logs show DPA-2 instead of DPA-3.
All reactions
Could you provide the full installation commands as well as the scripts you were using in this project?
All reactions
Hello,
I am trying to run LAMMPS with DPA-3. I installed Deepmd from the source code with
pip install git+https://github.com/deepmodeling/deepmd-kit.git. When running LAMMPS simulation I get the following error:deepmd/pt/model/descriptor/repformers.py", line 64, in forward argument8, ) -> torch.Tensor: raise NotImplementedError( ~~~~~~~~~~~~~~~~~~~~~~~~~~ "border_op is not available since customized PyTorch OP library is not built when freezing the model. " ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ "See documentation for DPA-2 for details." ~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE ) builtins.NotImplementedError: border_op is not available since customized PyTorch OP library is not built when freezing the model. See documentation for DPA-2 for details. (/home/prg/Softwares/ML_Packages/deepmd_v3/deepmd-kit/source/lmp/pair_deepmd.cpp:253) Last command: run 10000I tried following the solution provided in this issue, however installing with
DP_VARIANT=cuda DP_ENABLE_PYTORCH=1 pip install git+https://github.com/deepmodeling/deepmd-kit.git@develresults in the same issue.I am using
PyTorch 2.7.0+cu128; DeePMD-kit v3.1.1.dev70+gaca4e8c48; with Python 3.13.5. I would appreciate any suggestions for fixing this error.Thanks!
You may refer to this article to reinstall deepmd-kit as well as lammps: https://pku.bohrium.com/notebooks/16945863382
If there is still any errors, you can reply directly.
All reactions
@OutisLi Thanks for sending the notebook. I was able to get DPA-3 working with those installation instructions.
All reactions
Is there a DPA-3 .pt file suitable for carbon nanotubes?
All reactions
Is there a DPA-3 .pb file suitable for carbon nanotubes?