From 0c9466363bb612e1eee969e57d8129352e139c98 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 21 Aug 2025 10:02:34 +0000
Subject: [PATCH 1/3] Initial plan
From 18ec156daca9358c5fbe1b42d690674839329a36 Mon Sep 17 00:00:00 2001
From: "pre-commit-ci[bot]"
<66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Thu, 21 Aug 2025 10:04:39 +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 | 7 -------
doc/train/multi-task-training.md | 1 -
2 files changed, 8 deletions(-)
diff --git a/doc/model/show-model-info.md b/doc/model/show-model-info.md
index 48aa41385d..cdc15ddf04 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.
@@ -33,31 +32,25 @@ 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.
## Example Output
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 7f9af3c7dcfe4f27e84c9d3e52e505097c8ec2e7 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Thu, 21 Aug 2025 10:10:09 +0000
Subject: [PATCH 3/3] Add GitHub Discussion templates with emphasis on
reproducible examples
Co-authored-by: njzjz <9496702+njzjz@users.noreply.github.com>
---
.github/DISCUSSION_TEMPLATE/README.md | 44 +++++
.../DISCUSSION_TEMPLATE/general-question.yml | 80 +++++++++
.../DISCUSSION_TEMPLATE/ideas-suggestions.yml | 100 +++++++++++
.github/DISCUSSION_TEMPLATE/potential-bug.yml | 148 +++++++++++++++
.github/DISCUSSION_TEMPLATE/show-and-tell.yml | 125 +++++++++++++
.github/DISCUSSION_TEMPLATE/usage-help.yml | 170 ++++++++++++++++++
6 files changed, 667 insertions(+)
create mode 100644 .github/DISCUSSION_TEMPLATE/README.md
create mode 100644 .github/DISCUSSION_TEMPLATE/general-question.yml
create mode 100644 .github/DISCUSSION_TEMPLATE/ideas-suggestions.yml
create mode 100644 .github/DISCUSSION_TEMPLATE/potential-bug.yml
create mode 100644 .github/DISCUSSION_TEMPLATE/show-and-tell.yml
create mode 100644 .github/DISCUSSION_TEMPLATE/usage-help.yml
diff --git a/.github/DISCUSSION_TEMPLATE/README.md b/.github/DISCUSSION_TEMPLATE/README.md
new file mode 100644
index 0000000000..b521e7d7f2
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/README.md
@@ -0,0 +1,44 @@
+# Discussion Templates
+
+This directory contains GitHub Discussion templates for the DeePMD-kit repository. These templates help guide users to provide comprehensive information when starting discussions, particularly emphasizing the importance of reproducible examples.
+
+## Available Templates
+
+### 1. General Question (`general-question.yml`)
+For general questions about DeePMD-kit usage, features, or concepts. Use this when you have a straightforward question that doesn't require extensive troubleshooting.
+
+### 2. Usage Help (`usage-help.yml`)
+For detailed help with specific DeePMD-kit usage scenarios. **This template strongly emphasizes providing reproducible examples** to help community members provide effective assistance.
+
+### 3. Ideas and Suggestions (`ideas-suggestions.yml`)
+For proposing new features, improvements, or enhancements to DeePMD-kit. Includes sections for use cases, related work, and implementation thoughts.
+
+### 4. Show and Tell (`show-and-tell.yml`)
+For sharing projects, research, or achievements using DeePMD-kit. Encourages sharing reproducible information and lessons learned.
+
+### 5. Potential Bug Discussion (`potential-bug.yml`)
+For discussing behavior that might be a bug before creating a formal issue. **Emphasizes providing complete reproducible examples** to help confirm whether the behavior is indeed a bug.
+
+## Key Features
+
+All templates are designed to:
+- **Encourage reproducible examples**: Each template emphasizes the importance of providing complete, minimal examples that others can reproduce
+- Follow the repository's existing style and conventions
+- Include appropriate labels for categorization
+- Provide clear guidance on what information to include
+- Help users structure their discussions effectively
+
+## Usage
+
+When users start a new discussion, they will be presented with these template options. The templates guide them to provide:
+
+- Clear problem descriptions
+- Version information
+- Reproducible examples with:
+ - Input files
+ - Configuration files
+ - Commands run
+ - Expected vs actual behavior
+ - Complete error messages
+
+This addresses the issue mentioned in #4506 where "many discussions do not give reproduced examples."
\ No newline at end of file
diff --git a/.github/DISCUSSION_TEMPLATE/general-question.yml b/.github/DISCUSSION_TEMPLATE/general-question.yml
new file mode 100644
index 0000000000..90bffa74ac
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/general-question.yml
@@ -0,0 +1,80 @@
+name: General Question
+description: Ask a general question about DeePMD-kit usage, features, or concepts
+labels: ["question"]
+body:
+ - type: textarea
+ id: summary
+ attributes:
+ label: Summary
+ description: Please provide a clear and concise description of your question.
+ placeholder: What would you like to know about DeePMD-kit?
+ value:
+ validations:
+ required: true
+ - type: input
+ id: version
+ attributes:
+ label: DeePMD-kit Version
+ description: "What version of DeePMD-kit are you using? Run `dp --version` to check."
+ placeholder: "e.g., 2.2.7"
+ validations:
+ required: false
+ - type: input
+ id: backend-version
+ attributes:
+ label: Backend and Version
+ description: "Which backend are you using and what version? (e.g., TensorFlow v2.15.0, PyTorch v2.0.1)"
+ placeholder: "e.g., TensorFlow v2.15.0"
+ validations:
+ required: false
+ - type: textarea
+ id: details
+ attributes:
+ label: Detailed Description
+ description: |
+ Please provide more details about your question. If you're having trouble with specific functionality, please include:
+ - What you're trying to achieve
+ - What you've tried so far
+ - Any relevant configuration or setup details
+ placeholder: Provide additional context that would help others understand and answer your question.
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: reproducible-example
+ attributes:
+ label: Reproducible Example (if applicable)
+ description: |
+ If your question relates to specific code, input files, or commands, please provide a minimal reproducible example.
+ This helps others understand your issue and provide better assistance.
+
+ **Please include:**
+ - Input files (minimal example)
+ - Commands you're running
+ - Configuration files
+ - Expected vs actual behavior
+ placeholder: |
+ ```bash
+ # Your commands here
+ dp train input.json
+ ```
+
+ ```json
+ // Your configuration here
+ {
+ "model": {...}
+ }
+ ```
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: additional-info
+ attributes:
+ label: Additional Information
+ description: |
+ Any additional information, links to documentation you've consulted, or other relevant details.
+ placeholder: Links, references, or other context that might be helpful.
+ value:
+ validations:
+ required: false
\ No newline at end of file
diff --git a/.github/DISCUSSION_TEMPLATE/ideas-suggestions.yml b/.github/DISCUSSION_TEMPLATE/ideas-suggestions.yml
new file mode 100644
index 0000000000..39e63ef06f
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/ideas-suggestions.yml
@@ -0,0 +1,100 @@
+name: Ideas and Suggestions
+description: Share ideas for new features, improvements, or enhancements to DeePMD-kit
+labels: ["idea", "enhancement"]
+body:
+ - type: textarea
+ id: summary
+ attributes:
+ label: Summary
+ description: Brief summary of your idea or suggestion
+ placeholder: What's your idea for improving DeePMD-kit?
+ value:
+ validations:
+ required: true
+ - type: dropdown
+ id: category
+ attributes:
+ label: Category
+ description: What area does your suggestion relate to?
+ options:
+ - New feature
+ - Performance improvement
+ - User experience enhancement
+ - Documentation improvement
+ - API/Interface improvement
+ - Integration with other tools
+ - Other (specify in description)
+ validations:
+ required: true
+ - type: textarea
+ id: detailed-description
+ attributes:
+ label: Detailed Description
+ description: |
+ Provide a detailed description of your idea or suggestion.
+ Include:
+ - What problem does this solve?
+ - How would this benefit users?
+ - Are there any alternatives you've considered?
+ placeholder: Describe your idea in detail...
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: use-case
+ attributes:
+ label: Use Case / Example
+ description: |
+ Provide a concrete use case or example of how this feature would be used.
+ If applicable, include:
+ - Example code or configuration
+ - Workflow description
+ - Expected input/output
+ placeholder: |
+ **Example usage:**
+ ```python
+ # How users might use this feature
+ ```
+
+ **Use case:**
+ This would help users who...
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: related-work
+ attributes:
+ label: Related Work / References
+ description: |
+ Are there similar features in other tools, papers, or projects that inspired this idea?
+ Include links to relevant resources, publications, or implementations.
+ placeholder: |
+ - Similar feature in [other tool]: [link]
+ - Relevant paper: [citation/link]
+ - Related discussion: [link]
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: implementation-thoughts
+ attributes:
+ label: Implementation Thoughts
+ description: |
+ If you have ideas about how this might be implemented, share them here.
+ This could include:
+ - Potential approaches
+ - Technical considerations
+ - Whether you'd be interested in contributing to the implementation
+ placeholder: Any thoughts on how this could be implemented...
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: Any other information that would be helpful for understanding or evaluating this suggestion.
+ placeholder: Additional details, context, or considerations...
+ value:
+ validations:
+ required: false
\ No newline at end of file
diff --git a/.github/DISCUSSION_TEMPLATE/potential-bug.yml b/.github/DISCUSSION_TEMPLATE/potential-bug.yml
new file mode 100644
index 0000000000..0e75012225
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/potential-bug.yml
@@ -0,0 +1,148 @@
+name: Potential Bug Discussion
+description: Discuss behavior that might be a bug before creating a formal issue - include reproducible examples
+labels: ["potential bug", "question"]
+body:
+ - type: textarea
+ id: summary
+ attributes:
+ label: What seems to be wrong?
+ description: |
+ Describe the behavior you think might be a bug.
+ Use this template when you're not sure if something is a bug or if you need help confirming the issue before creating a formal bug report.
+ placeholder: Describe what you think might be wrong...
+ value:
+ validations:
+ required: true
+ - type: input
+ id: version
+ attributes:
+ label: DeePMD-kit Version
+ description: "Run `dp --version` to check."
+ placeholder: "e.g., 2.2.7"
+ validations:
+ required: true
+ - type: input
+ id: backend-version
+ attributes:
+ label: Backend and Version
+ description: "Which backend version? (shown when running DeePMD-kit)"
+ placeholder: "e.g., TensorFlow v2.15.0"
+ validations:
+ required: true
+ - type: dropdown
+ id: installation-method
+ attributes:
+ label: How did you install DeePMD-kit?
+ options:
+ - conda
+ - pip
+ - docker
+ - Built from source
+ - Offline packages
+ - Others (specify below)
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: What did you expect to happen?
+ description: Describe what you think should happen.
+ placeholder: I expected...
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: actual-behavior
+ attributes:
+ label: What actually happened?
+ description: Describe what you observed instead.
+ placeholder: Instead, what happened was...
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: reproducible-example
+ attributes:
+ label: Reproducible Example
+ description: |
+ **This is crucial for confirming if this is a bug!**
+
+ Please provide a complete, minimal example that reproduces the issue:
+ - Input files (attach small files or paste relevant content)
+ - Exact commands you ran
+ - Configuration files
+ - Complete error messages or unexpected output
+ - System information if relevant
+
+ The goal is to provide enough information that others can reproduce the exact same behavior.
+ placeholder: |
+ **Files and setup:**
+ ```
+ # Directory structure
+ myproject/
+ ├── input.json
+ ├── data/
+ │ ├── type_map.raw
+ │ └── set.000/
+ │ ├── coord.npy
+ │ └── energy.npy
+ ```
+
+ **Configuration (input.json):**
+ ```json
+ {
+ "model": {
+ // your configuration
+ }
+ }
+ ```
+
+ **Commands:**
+ ```bash
+ dp train input.json
+ ```
+
+ **Output/Error:**
+ ```
+ # Complete error message or unexpected output
+ ```
+
+ **System info:**
+ - OS: Ubuntu 20.04
+ - Python: 3.9.7
+ - Hardware: [relevant specs]
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: investigation
+ attributes:
+ label: What have you tried?
+ description: |
+ What steps have you taken to investigate or work around this issue?
+ - Different configurations you've tested
+ - Workarounds you've attempted
+ - Similar issues you've found online
+ - Other versions you've tested
+ placeholder: |
+ I tried:
+ 1. Changing the configuration to...
+ 2. Testing with a different dataset...
+ 3. Searching for similar issues...
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: |
+ Any other information that might be relevant:
+ - When did this behavior start?
+ - Does it happen consistently?
+ - Any relevant environmental factors?
+ - Links to related discussions or issues?
+ placeholder: Additional context that might be helpful...
+ value:
+ validations:
+ required: false
\ No newline at end of file
diff --git a/.github/DISCUSSION_TEMPLATE/show-and-tell.yml b/.github/DISCUSSION_TEMPLATE/show-and-tell.yml
new file mode 100644
index 0000000000..6e6a554869
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/show-and-tell.yml
@@ -0,0 +1,125 @@
+name: Show and Tell
+description: Share your projects, research, or achievements using DeePMD-kit
+labels: ["show and tell"]
+body:
+ - type: textarea
+ id: what-did-you-build
+ attributes:
+ label: What did you build or achieve?
+ description: Tell us about your project, research, or achievement using DeePMD-kit!
+ placeholder: Share what you've created or accomplished...
+ value:
+ validations:
+ required: true
+ - type: dropdown
+ id: project-type
+ attributes:
+ label: Project Type
+ description: What type of project or work is this?
+ options:
+ - Research project
+ - Educational/tutorial content
+ - Integration with other tools
+ - Performance optimization
+ - Application to new domain
+ - Methodology development
+ - Other (specify in description)
+ validations:
+ required: true
+ - type: textarea
+ id: technical-details
+ attributes:
+ label: Technical Details
+ description: |
+ Share the technical details of your work:
+ - What methods or features of DeePMD-kit did you use?
+ - Any interesting technical approaches or optimizations?
+ - System specifications or scale of your work?
+ placeholder: |
+ **DeePMD-kit features used:**
+ - Descriptor: se_e2_a
+ - Backend: TensorFlow
+ - Integration: LAMMPS
+
+ **Technical approach:**
+ - Training dataset: [description]
+ - Model architecture: [details]
+ - Performance: [metrics]
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: results-achievements
+ attributes:
+ label: Results and Achievements
+ description: |
+ What results did you achieve? What makes this work interesting or notable?
+ Include:
+ - Key findings or outcomes
+ - Performance metrics or improvements
+ - Novel applications or insights
+ placeholder: Share your key results and achievements...
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: reproducible-info
+ attributes:
+ label: Reproducible Information
+ description: |
+ If others want to reproduce your work or learn from it, what information can you share?
+ - Links to code repositories
+ - Configuration files
+ - Dataset information (if shareable)
+ - Step-by-step instructions
+ placeholder: |
+ **Code repository:** [link]
+ **Key configurations:**
+ ```json
+ {
+ "model": {...}
+ }
+ ```
+ **Instructions:** [brief steps to reproduce]
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: lessons-learned
+ attributes:
+ label: Lessons Learned
+ description: |
+ What did you learn during this project? Any tips, tricks, or insights that might help others?
+ - Challenges you overcame
+ - Best practices you discovered
+ - Things you'd do differently next time
+ placeholder: Share insights that might help others...
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: links-and-resources
+ attributes:
+ label: Links and Resources
+ description: |
+ Share relevant links:
+ - Publications or preprints
+ - Code repositories
+ - Demo videos or visualizations
+ - Related projects or collaborations
+ placeholder: |
+ **Publication:** [link]
+ **Code:** [link]
+ **Demo:** [link]
+ value:
+ validations:
+ required: false
+ - type: textarea
+ id: acknowledgments
+ attributes:
+ label: Acknowledgments
+ description: Any acknowledgments or thanks to the community, collaborators, or DeePMD-kit developers?
+ placeholder: Thank you to...
+ value:
+ validations:
+ required: false
\ No newline at end of file
diff --git a/.github/DISCUSSION_TEMPLATE/usage-help.yml b/.github/DISCUSSION_TEMPLATE/usage-help.yml
new file mode 100644
index 0000000000..27355d80fe
--- /dev/null
+++ b/.github/DISCUSSION_TEMPLATE/usage-help.yml
@@ -0,0 +1,170 @@
+name: Usage Help
+description: Get help with using DeePMD-kit - provide reproducible examples for the best assistance
+labels: ["help wanted", "usage"]
+body:
+ - type: textarea
+ id: summary
+ attributes:
+ label: What are you trying to accomplish?
+ description: Please provide a clear description of what you're trying to do with DeePMD-kit.
+ placeholder: "e.g., Training a neural network potential for water molecules, running molecular dynamics with LAMMPS, etc."
+ value:
+ validations:
+ required: true
+ - type: input
+ id: version
+ attributes:
+ label: DeePMD-kit Version
+ description: "Run `dp --version` to check your version."
+ placeholder: "e.g., 2.2.7"
+ validations:
+ required: true
+ - type: input
+ id: backend-version
+ attributes:
+ label: Backend and Version
+ description: "Which backend and version? (The backend version is shown when running DeePMD-kit)"
+ placeholder: "e.g., TensorFlow v2.15.0"
+ validations:
+ required: true
+ - type: dropdown
+ id: installation-method
+ attributes:
+ label: Installation Method
+ options:
+ - conda
+ - pip
+ - docker
+ - Built from source
+ - Offline packages
+ - Others (specify in details)
+ validations:
+ required: true
+ - type: textarea
+ id: problem-description
+ attributes:
+ label: Problem Description
+ description: |
+ Describe the specific issue you're encountering or what you need help with.
+ Be as specific as possible about what's not working or what you're unsure about.
+ placeholder: "Describe your specific problem or question..."
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: reproducible-example
+ attributes:
+ label: Reproducible Example
+ description: |
+ **This section is crucial for getting effective help!**
+
+ Please provide a complete, minimal example that others can use to reproduce your issue or understand your question.
+ Include:
+ - Input files (you can attach small files or paste content)
+ - Command(s) you're running
+ - Configuration files (input.json, etc.)
+ - Directory structure if relevant
+ - Full error messages or unexpected output
+
+ **Tip:** The more complete and minimal your example, the easier it is for others to help you!
+ placeholder: |
+ **Input files:**
+ ```
+ # system directory structure
+ data/
+ ├── type_map.raw
+ ├── type.raw
+ └── set.000/
+ ├── coord.npy
+ ├── energy.npy
+ └── force.npy
+ ```
+
+ **Configuration (input.json):**
+ ```json
+ {
+ "model": {
+ "type_map": ["H", "O"],
+ "descriptor": {
+ "type": "se_e2_a",
+ "rcut": 6.0,
+ "rcut_smth": 0.5,
+ "sel": [46, 92]
+ },
+ "fitting_net": {
+ "neuron": [25, 50, 100],
+ "resnet_dt": false
+ }
+ },
+ "learning_rate": {
+ "type": "exp",
+ "start_lr": 0.001,
+ "stop_lr": 3.51e-8,
+ "decay_steps": 5000
+ },
+ "loss": {
+ "start_pref_e": 0.02,
+ "limit_pref_e": 1,
+ "start_pref_f": 1000,
+ "limit_pref_f": 1,
+ "start_pref_v": 0,
+ "limit_pref_v": 0
+ },
+ "training": {
+ "numb_steps": 1000000,
+ "seed": 1,
+ "batch_size": 1,
+ "disp_file": "lcurve.out",
+ "disp_freq": 100,
+ "numb_test": 1,
+ "save_freq": 1000,
+ "save_ckpt": "model.ckpt",
+ "disp_training": true,
+ "time_training": true,
+ "profiling": false,
+ "profiling_file": "timeline.json"
+ }
+ }
+ ```
+
+ **Commands:**
+ ```bash
+ dp train input.json
+ ```
+
+ **Error message:**
+ ```
+ # Paste your complete error message here
+ ```
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: expected-behavior
+ attributes:
+ label: Expected Behavior
+ description: What did you expect to happen?
+ placeholder: Describe what you expected to occur...
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: actual-behavior
+ attributes:
+ label: Actual Behavior
+ description: What actually happened? Include any error messages, unexpected output, or describe the difference from expected behavior.
+ placeholder: Describe what actually happened...
+ value:
+ validations:
+ required: true
+ - type: textarea
+ id: additional-context
+ attributes:
+ label: Additional Context
+ description: |
+ Add any other context, screenshots, or information that might be helpful.
+ You can also mention if you've found any workarounds or partial solutions.
+ placeholder: Any other relevant information...
+ value:
+ validations:
+ required: false
\ No newline at end of file