From f4c9198b43b4fcbab15acbfa32189c80b1e29b5e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 18:59:50 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- source/api_cc/src/DeepPotPT.cc | 5 ++++- source/api_cc/src/DeepSpinPT.cc | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/api_cc/src/DeepPotPT.cc b/source/api_cc/src/DeepPotPT.cc index 4f17c30e25..68da1cabd2 100644 --- a/source/api_cc/src/DeepPotPT.cc +++ b/source/api_cc/src/DeepPotPT.cc @@ -89,7 +89,10 @@ void DeepPotPT::init(const std::string& model, std::unordered_map metadata = {{"type", ""}}; module = torch::jit::load(model, device, metadata); module.eval(); - const std::vector& preserved_attrs = {"forward_lower", "has_message_passing", "get_rcut", "get_ntypes", "get_dim_fparam", "get_dim_aparam", "is_aparam_nall", "get_type_map"}; + const std::vector& preserved_attrs = { + "forward_lower", "has_message_passing", "get_rcut", + "get_ntypes", "get_dim_fparam", "get_dim_aparam", + "is_aparam_nall", "get_type_map"}; module = torch::jit::freeze(module, preserved_attrs); do_message_passing = module.run_method("has_message_passing").toBool(); torch::jit::FusionStrategy strategy; diff --git a/source/api_cc/src/DeepSpinPT.cc b/source/api_cc/src/DeepSpinPT.cc index fac494772c..1add9a4068 100644 --- a/source/api_cc/src/DeepSpinPT.cc +++ b/source/api_cc/src/DeepSpinPT.cc @@ -89,7 +89,10 @@ void DeepSpinPT::init(const std::string& model, std::unordered_map metadata = {{"type", ""}}; module = torch::jit::load(model, device, metadata); module.eval(); - const std::vector& preserved_attrs = {"forward_lower", "has_message_passing", "get_rcut", "get_ntypes", "get_dim_fparam", "get_dim_aparam", "is_aparam_nall", "get_type_map"}; + const std::vector& preserved_attrs = { + "forward_lower", "has_message_passing", "get_rcut", + "get_ntypes", "get_dim_fparam", "get_dim_aparam", + "is_aparam_nall", "get_type_map"}; module = torch::jit::freeze(module, preserved_attrs); do_message_passing = module.run_method("has_message_passing").toBool(); torch::jit::FusionStrategy strategy;