From 9f5116f88b45f8008b4f33decad62c079a1edbb1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 14:38:34 -0400 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate (#3779) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.4.3 → v0.4.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.4.3...v0.4.4) - [github.com/pre-commit/mirrors-clang-format: v18.1.4 → v18.1.5](https://github.com/pre-commit/mirrors-clang-format/compare/v18.1.4...v18.1.5) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- source/api_cc/src/common.cc | 13 ++++++++----- source/ipi/driver.cc | 9 ++++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a265a1312e..0e5671d6c2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,7 +29,7 @@ repos: exclude: ^source/3rdparty - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.4.3 + rev: v0.4.4 hooks: - id: ruff args: ["--fix"] @@ -52,7 +52,7 @@ repos: - id: blacken-docs # C++ - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v18.1.4 + rev: v18.1.5 hooks: - id: clang-format exclude: ^source/3rdparty|source/lib/src/gpu/cudart/.+\.inc diff --git a/source/api_cc/src/common.cc b/source/api_cc/src/common.cc index 8f5e21c933..203e5f9db1 100644 --- a/source/api_cc/src/common.cc +++ b/source/api_cc/src/common.cc @@ -329,8 +329,8 @@ void deepmd::check_status(const tensorflow::Status& status) { void throw_env_not_set_warning(std::string env_name) { std::cerr << "DeePMD-kit WARNING: Environmental variable " << env_name - << " is not set. " << "Tune " << env_name - << " for the best performance. " + << " is not set. " + << "Tune " << env_name << " for the best performance. " << "See https://deepmd.rtfd.io/parallelism/ for more information." << std::endl; } @@ -1347,11 +1347,14 @@ void deepmd::print_summary(const std::string& pre) { std::cout << pre << "source commit at: " + global_git_date << "\n"; std::cout << pre << "support model ver.: " + global_model_version << "\n"; #if defined(GOOGLE_CUDA) - std::cout << pre << "build variant: cuda" << "\n"; + std::cout << pre << "build variant: cuda" + << "\n"; #elif defined(TENSORFLOW_USE_ROCM) - std::cout << pre << "build variant: rocm" << "\n"; + std::cout << pre << "build variant: rocm" + << "\n"; #else - std::cout << pre << "build variant: cpu" << "\n"; + std::cout << pre << "build variant: cpu" + << "\n"; #endif #ifdef BUILD_TENSORFLOW std::cout << pre << "build with tf inc: " + global_tf_include_dir << "\n"; diff --git a/source/ipi/driver.cc b/source/ipi/driver.cc index 977d76011a..9a91a27ad3 100644 --- a/source/ipi/driver.cc +++ b/source/ipi/driver.cc @@ -126,17 +126,20 @@ int main(int argc, char *argv[]) { if (!isinit) { writebuffer_(&socket, msg_needinit, MSGLEN); if (b_verb) { - std::cout << "# send back " << "NEEDINIT" << std::endl; + std::cout << "# send back " + << "NEEDINIT" << std::endl; } } else if (hasdata) { writebuffer_(&socket, msg_havedata, MSGLEN); if (b_verb) { - std::cout << "# send back " << "HAVEDATA" << std::endl; + std::cout << "# send back " + << "HAVEDATA" << std::endl; } } else { writebuffer_(&socket, msg_ready, MSGLEN); if (b_verb) { - std::cout << "# send back " << "READY" << std::endl; + std::cout << "# send back " + << "READY" << std::endl; } } } else if (header_str == "INIT") { From 2bf07698a878e967adcfce858e92e5a3c496e734 Mon Sep 17 00:00:00 2001 From: Lysithea <52808607+CaRoLZhangxy@users.noreply.github.com> Date: Wed, 15 May 2024 03:31:49 +0800 Subject: [PATCH 2/2] doc: update doc for mixed:N batch size (#3780) https://github.com/deepmodeling/deepmd-kit/issues/3474 ## Summary by CodeRabbit - **Documentation** - Updated the description of the "mixed:N" string option in the training data arguments to reflect that the "se_atten" descriptor is now supported only for the Tensorflow backend. --- deepmd/utils/argcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deepmd/utils/argcheck.py b/deepmd/utils/argcheck.py index 6929712eec..6678f62c63 100644 --- a/deepmd/utils/argcheck.py +++ b/deepmd/utils/argcheck.py @@ -2064,7 +2064,7 @@ def training_data_args(): # ! added by Ziyao: new specification style for data - int: all {link_sys} use the same batch size.\n\n\ - string "auto": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than 32.\n\n\ - string "auto:N": automatically determines the batch size so that the batch_size times the number of atoms in the system is no less than N.\n\n\ -- string "mixed:N": the batch data will be sampled from all systems and merged into a mixed system with the batch size N. Only support the se_atten descriptor.\n\n\ +- string "mixed:N": the batch data will be sampled from all systems and merged into a mixed system with the batch size N. Only support the se_atten descriptor for Tensorflow backend.\n\n\ If MPI is used, the value should be considered as the batch size per task.' doc_auto_prob_style = 'Determine the probability of systems automatically. The method is assigned by this key and can be\n\n\ - "prob_uniform" : the probability all the systems are equal, namely 1.0/self.get_nsystems()\n\n\