Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 22, 2024
1 parent e445372 commit f4c9198
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion source/api_cc/src/DeepPotPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ void DeepPotPT::init(const std::string& model,
std::unordered_map<std::string, std::string> metadata = {{"type", ""}};
module = torch::jit::load(model, device, metadata);
module.eval();
const std::vector<std::string>& 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<std::string>& 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;
Expand Down
5 changes: 4 additions & 1 deletion source/api_cc/src/DeepSpinPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ void DeepSpinPT::init(const std::string& model,
std::unordered_map<std::string, std::string> metadata = {{"type", ""}};
module = torch::jit::load(model, device, metadata);
module.eval();
const std::vector<std::string>& 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<std::string>& 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;
Expand Down

0 comments on commit f4c9198

Please sign in to comment.