Skip to content

Refactor: Remove the ML training code#7167

Merged
mohanchen merged 1 commit intodeepmodeling:developfrom
sunliang98:rm_ml_tools
Mar 28, 2026
Merged

Refactor: Remove the ML training code#7167
mohanchen merged 1 commit intodeepmodeling:developfrom
sunliang98:rm_ml_tools

Conversation

@sunliang98
Copy link
Copy Markdown
Collaborator

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Fix #7091

Unit Tests and/or Case Tests for my changes

  • A unit test is added for each new feature or bug fix.

What's changed?

  • Example: My changes might affect the performance of the application under certain conditions, and I have tested the impact on various scenarios...

Any changes of core modules? (ignore if not applicable)

  • Example: I have added a new virtual function in the esolver base class in order to ...

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes the standalone ML training toolchain under module_ofdft/ml_tools (issue #7091) while keeping the runtime NN model used by ML-KEDF/ML-EXX, relocating it to module_ofdft/nn_of.{h,cpp} and updating includes/build wiring accordingly.

Changes:

  • Deleted ML training executable sources and helper modules (train_kedf, data, input, kernel, grid, pauli_potential, and ml_tools/CMakeLists.txt).
  • Added/relocated the libtorch NN module implementation to source_pw/module_ofdft/nn_of.{h,cpp}.
  • Updated include paths and CMake source lists to reference the new NN module location.

Reviewed changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated no comments.

Show a summary per file
File Description
source/source_pw/module_ofdft/nn_of.h Adds NN module header (now used by runtime ML code).
source/source_pw/module_ofdft/nn_of.cpp Adds NN module implementation (forward pass, layer registration).
source/source_pw/module_ofdft/ml_tools/train_kedf.h Removes training driver API.
source/source_pw/module_ofdft/ml_tools/train_kedf.cpp Removes training loop implementation.
source/source_pw/module_ofdft/ml_tools/pauli_potential.h Removes training-time Pauli potential implementation.
source/source_pw/module_ofdft/ml_tools/pauli_potential.cpp Removes training-time Pauli potential implementation.
source/source_pw/module_ofdft/ml_tools/main.cpp Removes standalone training executable entrypoint.
source/source_pw/module_ofdft/ml_tools/kernel.h Removes training-time kernel utilities.
source/source_pw/module_ofdft/ml_tools/kernel.cpp Removes training-time kernel utilities.
source/source_pw/module_ofdft/ml_tools/input.h Removes training input parser/config.
source/source_pw/module_ofdft/ml_tools/input.cpp Removes training input parser/config.
source/source_pw/module_ofdft/ml_tools/grid.h Removes training-time FFT grid utilities.
source/source_pw/module_ofdft/ml_tools/grid.cpp Removes training-time FFT grid utilities.
source/source_pw/module_ofdft/ml_tools/data.h Removes training dataset loader.
source/source_pw/module_ofdft/ml_tools/data.cpp Removes training dataset loader.
source/source_pw/module_ofdft/ml_tools/CMakeLists.txt Removes separate nnof training build.
source/source_pw/module_ofdft/ml_base.h Updates NN include path to new location.
source/source_pw/module_ofdft/CMakeLists.txt Updates ML-KEDF object sources to compile nn_of.cpp from new location.
source/source_estate/module_pot/pot_ml_exx.h Updates NN include path to new location for ML-EXX.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Collaborator

@mohanchen mohanchen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mohanchen mohanchen added the Refactor Refactor ABACUS codes label Mar 28, 2026
@mohanchen mohanchen merged commit 579656d into deepmodeling:develop Mar 28, 2026
19 checks passed
@sunliang98 sunliang98 deleted the rm_ml_tools branch March 28, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

remove the ML training code from the develop branch

3 participants