From 7be24ec66cd84b384eaabf3e6ad7719ed641b162 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 15 Jul 2025 13:58:31 +0800 Subject: [PATCH 1/3] fix: fix pytorch in the cuda11 image As reported by https://github.com/deepmodeling/deepmd-kit/issues/4837#issuecomment-3068217334, the pytorch in the cuda 11 image is currently cuda12. Signed-off-by: Jinzhe Zeng --- source/install/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/install/docker/Dockerfile b/source/install/docker/Dockerfile index 1e0f46eec6..5cf86bcbda 100644 --- a/source/install/docker/Dockerfile +++ b/source/install/docker/Dockerfile @@ -8,7 +8,7 @@ ENV PATH="/opt/deepmd-kit/bin:$PATH" ENV VIRTUAL_ENV="/opt/deepmd-kit" # Install package COPY dist /dist -RUN if [ "${CUDA_VERSION}" = 11 ]; then uv pip install torch --index-url https://download.pytorch.org/whl/cu118; fi \ +RUN if [ "${CUDA_VERSION}" = 11 ]; then uv pip install 'torch==2.3.1.*' --index-url https://download.pytorch.org/whl/cu118; fi \ && uv pip install "$(ls /dist/deepmd_kit${VARIANT}-*manylinux*_x86_64.whl)[gpu,cu${CUDA_VERSION},lmp,ipi,torch]" \ && dp -h \ && lmp -h \ From 2b213f0a7294b5f06358216398099e5a663cbafa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 15 Jul 2025 06:00:27 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- doc/model/show-model-info.md | 8 -------- doc/train/multi-task-training.md | 1 - 2 files changed, 9 deletions(-) diff --git a/doc/model/show-model-info.md b/doc/model/show-model-info.md index 133e9e4f76..67d82610de 100644 --- a/doc/model/show-model-info.md +++ b/doc/model/show-model-info.md @@ -11,7 +11,6 @@ dp --pt show - ``: Path to the model checkpoint file or frozen model file. - ``: One or more information categories to display. Supported values are: - - `model-branch`: Shows available branches for multi-task models. - `type-map`: Shows the type mapping used by the model. - `descriptor`: Displays the model descriptor parameters. @@ -34,35 +33,28 @@ dp show frozen_model.pth type-map descriptor fitting-net size Depending on the provided attributes and the model type, the output includes: - **Model Type** - - Logs whether the loaded model is a _singletask_ or _multitask_ model. - **model-branch** - - _Only available for multitask models._ - Lists all available model branches and the special `"RANDOM"` branch, which refers to a randomly initialized fitting net. - **type-map** - - For multitask models: Shows the type map for each branch. - For singletask models: Shows the model's type map. - **descriptor** - - For multitask models: Displays the descriptor parameter for each branch. - For singletask models: Displays the descriptor parameter. - **fitting-net** - - For multitask models: Shows the fitting network parameters for each branch. - For singletask models: Shows the fitting network parameters. - **size** - - Prints the number of parameters for each component (`descriptor`, `fitting-net`, etc.), as well as the total parameter count. - **observed-type** - - Displays the count and list of observed element types of the model during data statistics. - For multitask models, it shows the observed types for each branch. - Note: This info shows the types observed during training data statistics, which may differ from the type map. diff --git a/doc/train/multi-task-training.md b/doc/train/multi-task-training.md index 16f6c0e05c..115c463cc2 100644 --- a/doc/train/multi-task-training.md +++ b/doc/train/multi-task-training.md @@ -48,7 +48,6 @@ Specifically, there are several parts that need to be modified: - {ref}`model/model_dict `: The core definition of the model part and the explanation of sharing rules, starting with user-defined model name keys `model_key`, such as `my_model_1`. Each model part needs to align with the components of the single-task training {ref}`model `, but with the following sharing rules: - - If you want to share the current model component with other tasks, which should be part of the {ref}`model/shared_dict `, you can directly fill in the corresponding `part_key`, such as `"descriptor": "my_descriptor", ` From 196e2028748d4b13dcd738ab5db1fe7916ebcc5f Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 15 Jul 2025 14:08:22 +0800 Subject: [PATCH 3/3] use the uv new feature Signed-off-by: Jinzhe Zeng --- source/install/docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/install/docker/Dockerfile b/source/install/docker/Dockerfile index 5cf86bcbda..a8cf698102 100644 --- a/source/install/docker/Dockerfile +++ b/source/install/docker/Dockerfile @@ -8,7 +8,7 @@ ENV PATH="/opt/deepmd-kit/bin:$PATH" ENV VIRTUAL_ENV="/opt/deepmd-kit" # Install package COPY dist /dist -RUN if [ "${CUDA_VERSION}" = 11 ]; then uv pip install 'torch==2.3.1.*' --index-url https://download.pytorch.org/whl/cu118; fi \ +RUN if [ "${CUDA_VERSION}" = 11 ]; then export UV_TORCH_BACKEND=cu118; fi \ && uv pip install "$(ls /dist/deepmd_kit${VARIANT}-*manylinux*_x86_64.whl)[gpu,cu${CUDA_VERSION},lmp,ipi,torch]" \ && dp -h \ && lmp -h \