Skip to content

Commit

Permalink
Merge pull request #389 from ACEsuit/develop
Browse files Browse the repository at this point in the history
add GitPython to deps
  • Loading branch information
ilyes319 authored Apr 23, 2024
2 parents 64d8b35 + e6d1630 commit ea296c6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
20 changes: 10 additions & 10 deletions mace/tools/scripts_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def print_git_commit():
return commit
except Exception as e: # pylint: disable=W0703
logging.info(f"Error accessing Git repository: {e}")
return None
return "None"


def extract_config_mace_model(model: torch.nn.Module) -> Dict[str, Any]:
Expand Down Expand Up @@ -211,9 +211,9 @@ def convert_from_json_format(dict_input):
dict_input["interaction_cls"]
== "<class 'mace.modules.blocks.RealAgnosticResidualInteractionBlock'>"
):
dict_output[
"interaction_cls"
] = modules.blocks.RealAgnosticResidualInteractionBlock
dict_output["interaction_cls"] = (
modules.blocks.RealAgnosticResidualInteractionBlock
)
if (
dict_input["interaction_cls"]
== "<class 'mace.modules.blocks.RealAgnosticInteractionBlock'>"
Expand All @@ -223,16 +223,16 @@ def convert_from_json_format(dict_input):
dict_input["interaction_cls_first"]
== "<class 'mace.modules.blocks.RealAgnosticResidualInteractionBlock'>"
):
dict_output[
"interaction_cls_first"
] = modules.blocks.RealAgnosticResidualInteractionBlock
dict_output["interaction_cls_first"] = (
modules.blocks.RealAgnosticResidualInteractionBlock
)
if (
dict_input["interaction_cls_first"]
== "<class 'mace.modules.blocks.RealAgnosticInteractionBlock'>"
):
dict_output[
"interaction_cls_first"
] = modules.blocks.RealAgnosticInteractionBlock
dict_output["interaction_cls_first"] = (
modules.blocks.RealAgnosticInteractionBlock
)
dict_output["r_max"] = float(dict_input["r_max"])
dict_output["num_bessel"] = int(dict_input["num_bessel"])
dict_output["num_polynomial_cutoff"] = float(dict_input["num_polynomial_cutoff"])
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ install_requires =
torchmetrics
python-hostlist
configargparse
GitPython
# for plotting:
matplotlib
pandas
Expand Down

0 comments on commit ea296c6

Please sign in to comment.