executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
installation-backendsInstall, build, verify, select, and troubleshoot DeePMD-kit backend variants safely.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this sub-skill when the task is about installing DeePMD-kit, choosing a package variant, selecting a runtime backend, validating the dp command, or diagnosing backend/build failures before training or inference work begins.
This sub-skill covers:
--tf, --pt, --jax, --pd, --pt-expt, and --backend ....DP_VARIANT, backend enable flags, framework roots, CUDA/ROCM roots, LAMMPS, and i-PI toggles.dp -h, dp --version, backend help, Python imports, and bundled environment checks.Do not use this sub-skill for:
../training-models/SKILL.md.../data-config/SKILL.md.dp test, model conversion, compression, or model deviation workflows; route to ../inference-model-ops/SKILL.md.../integrations-development/SKILL.md.dp, LAMMPS, and MPI tools, prefer conda-forge unless they explicitly need pip wheels.dp, and backend modules before recommending a reinstall.Read references/install-backend-reference.md for the full decision tree, backend matrix, source-build environment variables, and command examples.
deepmd; the distribution name is deepmd-kit.dp CLI defaults to the TensorFlow backend unless DP_BACKEND or a backend flag overrides it.tensorflow/tf, pytorch/pt, jax, paddle/pd, and pytorch-exportable/pt-expt.dp --backend <name> -h or aliases such as dp --pt -h to confirm the CLI recognizes a backend before deeper debugging.Typical backend choices:
.pb frozen models and TensorFlow checkpoints; install tensorflow or tensorflow-cpu as appropriate.dp --pt; .pth frozen models and .pt checkpoints; install torch; custom C++ OPs require source-build opt-in.dp --jax; install JAX stack; exported .savedmodel usage also needs TensorFlow support.dp --pd; install paddlepaddle or paddlepaddle-gpu; frozen model output uses paired graph/parameter files.--pt-expt or --backend pytorch-exportable only for workflows that explicitly target exportable/AOT PyTorch behavior.When a user asks whether an install is usable, run the least invasive checks first:
python --version
python -c "import deepmd; print('deepmd import ok')"
dp --version
dp -h
dp --tf -h
dp --pt -h
Then run the bundled helper from this sub-skill, choosing backend checks that match the user's intended model family:
python scripts/check_deepmd_environment.py --backend tensorflow
python scripts/check_deepmd_environment.py --backend pytorch --check-backend-help
python scripts/check_deepmd_environment.py --backend all --strict
Use --module <python-module> for a direct module availability check when the backend package has a nonstandard import name or the user is debugging optional dependencies.
Use pip when the user wants a Python environment and accepts backend-specific wheels:
deepmd-kit[cpu].deepmd-kit[gpu,cu12] when CUDA toolkit/cuDNN wheels are needed.torch first from the PyTorch CPU wheel index, then install deepmd-kit.deepmd-kit.deepmd-kit[jax].deepmd-kit[jax] plus a CUDA-enabled JAX wheel matching the machine.deepmd-kit.../integrations-development/SKILL.md.Keep backend installs minimal. Do not install every heavy backend unless the user explicitly needs multi-backend compatibility.
Choose conda-forge when the user wants solver-managed binary compatibility across Python, MPI, LAMMPS, and backend libraries. It is often the safest route for maintainers who need command-line tools plus compiled integrations.
Choose Docker when the user wants to avoid mutating host environments or needs a quick CPU/GPU runtime image.
Choose offline installers when the user has restricted network access and can satisfy runtime platform requirements. Offline and conda packages require GNU C Library 2.17 or newer; pip wheels may require newer glibc on some Linux variants.
For GPU packages, confirm the NVIDIA driver supports the package CUDA minor version. A toolkit installed in the environment does not replace the need for a compatible driver at runtime.
Use source builds only when prebuilt packages do not meet the user's target:
Common Python-package source-build controls:
DP_VARIANT=cpu|cuda|rocm chooses CPU, CUDA, or ROCM build mode.DP_ENABLE_TENSORFLOW=1|0 enables or disables TensorFlow build support; default is enabled.DP_ENABLE_PYTORCH=1|0 enables or disables custom PyTorch C++ OPs; default is disabled.TENSORFLOW_ROOT points to a TensorFlow Python-library root when isolated build discovery is insufficient.PYTORCH_ROOT points to a PyTorch Python-library root when isolated build discovery is insufficient.CUDAToolkit_ROOT points to CUDA toolkit discovery for CUDA source builds.ROCM_ROOT or ROCM_PATH points to ROCM discovery for ROCM source builds.DP_ENABLE_IPI=1 requests i-PI entry point support.DP_LAMMPS_VERSION=<version> requests LAMMPS-version-aware C++ interface build behavior.For CPU-only development installs that avoid heavy custom OPs, install the chosen Python backend first, keep DP_VARIANT=cpu, disable backend C++ OPs that are not needed, and validate deepmd import plus dp -h before attempting training or inference.
Read references/troubleshooting.md when any of these appear:
ModuleNotFoundError for tensorflow, torch, jax, or paddle.dp --pt fails while dp --tf works, or a .pth model is opened in a TensorFlow-only environment.Before routing onward to training, data, inference, or integrations, report:
import deepmd passes.dp --version and dp -h pass.