Replies: 2 comments 2 replies
-
|
Hi @mcourtiel! I'm Dosu and I'm helping the DeepModeling team. This is a known issue in DeePMD-kit v3.1.3: the Workarounds for v3.1.3:
Upgrading is the recommended path since the underlying issue is resolved in newer releases. To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @mcourtiel, This looks like an expected limitation of the current Python-packaged LAMMPS/i-PI entry points, rather than a problem with your The documentation is correct that the LAMMPS and state that the model file may have However, in the Python wheel path, the LAMMPS plugin discovery code still imports TensorFlow unconditionally: The i-PI entry point goes through the same So when TensorFlow is not installed/importable, seeing at this stage is not surprising, even if the model you want to run is a PyTorch I think Dosu's replies are therefore not quite right: v3.1.3 is already newer than PR #4728, and the current v3.1.3 code still has the TensorFlow import shown above. So this is not simply fixed by upgrading to a newer released DeePMD-kit version, and converting the model to TensorFlow is also not helpful for your Grace Hopper/ARM case if TensorFlow cannot be installed there. For an ARM Grace Hopper PyTorch-only environment, the practical route is probably to build the DeePMD-kit C++ interface / LAMMPS plugin from source with the PyTorch backend enabled. The source-install docs describe the PyTorch C++ route, for example: cmake -DENABLE_PYTORCH=TRUE -DUSE_PT_PYTHON_LIBS=TRUE -DCMAKE_INSTALL_PREFIX=$deepmd_root ..If you use LAMMPS plugin mode, also make sure the plugin is built against the same LAMMPS version/source tree you will run, as the docs describe via Authored by OpenClaw (version: 2026.6.8, model: custom-chat-jinzhezeng-group/gpt-5.5) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Question
Hello,
I am writing to seek assistance with an issue I am encountering. Since switching to models trained via PyTorch, I am unable to run MD/PIMD simulations in LAMMPS and i-PI.
The code consistently seems to look for TensorFlow, and because it cannot find them, the calculation failed.
I am using DeepMD-kit v3.1.3, installed as follows:
conda create --name deepmd --clone pytorch-2.10.0
conda activate deepmd
pip install mpich
pip install deepmd-kit
pip install deepmd-kit[lmp,ipi]
The models are trained, frozen, and compressed using the --pt argument. I successfully obtain a graph-compress.pth file.
The only changes I did in the input of both code is changing the name of the model with the extension ".pth"
Lammps example : pair_style deepmd graph-compress_3.23Mo2.pth
i-Pi example : "graph_file": "graph-compress_3.23Mo2.pth",
Below is the error message from the LAMMPS calculation (the same error occurs for i-PI):
_Traceback (most recent call last):
File "/path/to/deepmd-kit/bin/lmp", line 3, in
from lammps.executable import lmp
File "/path/to/deepmd-kit/lib/python3.14/site-packages/lammps/init.py", line 8, in
import lammps.executable
File "/path/to/deepmd-kit/lib/python3.14/site-packages/lammps/executable.py", line 39, in
plugin = ep.load()
File "/path/to/deepmd-kit/lib/python3.14/importlib/metadata/init.py", line 179, in load
module = import_module(match.group('module'))
File "/path/to/deepmd-kit/lib/python3.14/importlib/init.py", line 88, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/path/to/deepmd-kit/lib/python3.14/site-packages/deepmd/lmp_check_build.py", line 13, in
from deepmd.lmp import (
get_op_dir,
)
File "/path/to/deepmd-kit/lib/python3.14/site-packages/deepmd/lmp.py", line 21, in
from deepmd.tf.env import ( # noqa: TID253
...<2 lines>...
)
File "/path/to/deepmd-kit/lib/python3.14/site-packages/deepmd/tf/init.py", line 4, in
import deepmd.tf.utils.network as network
File "/path/to/deepmd-kit/lib/python3.14/site-packages/deepmd/tf/utils/init.py", line 9, in
from .learning_rate import (
LearningRateSchedule,
)
File "/path/to/Source/deepmd-kit/lib/python3.14/site-packages/deepmd/tf/utils/learning_rate.py", line 15, in
from deepmd.tf.env import (
tf,
)
File "/path/to/deepmd-kit/lib/python3.14/site-packages/deepmd/tf/env.py", line 95, in
import tensorflow.compat.v1 as tf
ModuleNotFoundError: No module named 'tensorflow'
Thank you for your help.
Maïa
DeePMD-kit Version
3.1.3
Backend and its version
Pytorch 2.10.0
Python Version, CUDA Version, GCC Version, LAMMPS Version, etc
No response
Details
No response
Reproducible Example, Input Files, and Commands
No response
Further Information, Files, and Links
No response
Beta Was this translation helpful? Give feedback.
All reactions