Skip to content

Commit

Permalink
Revert "[pre-commit.ci] auto fixes from pre-commit.com hooks"
Browse files Browse the repository at this point in the history
This reverts commit f4c9198.
  • Loading branch information
njzjz committed Nov 22, 2024
1 parent f4c9198 commit a4fc9c8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions source/api_cc/src/DeepPotPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ 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: 1 addition & 4 deletions source/api_cc/src/DeepSpinPT.cc
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,7 @@ 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 a4fc9c8

Please sign in to comment.