Closed kenko911 closed 1 month ago
The updates involve enhancing the robustness and functionality of tensor operations in a Python library. Changes include modifying tensor cloning methods for better memory management in _basis.py
and expanding unit tests in test_atom_ref.py
and test_graph_conv.py
to cover new functionalities and scenarios. These adjustments ensure more reliable and versatile modules, supporting varied computational graph operations and interaction models.
File | Summary |
---|---|
.../_basis.py |
Modified tensor operations for improved cloning efficiency. |
.../test_atom_ref.py |
Added tests for different scenarios of AtomRef object property offsets. |
.../test_graph_conv.py |
Introduced new declarations to enhance testing of graph convolution functionalities. |
tests/layers/test_graph_conv.py (3)
`213-223`: LGTM! The addition of `interaction_so3` in `test_tensornet_interaction` is consistent with the existing tensor operations. --- `271-278`: LGTM! The addition of `gc` in `test_chgnet_graph_conv` is consistent with the existing graph convolution operations. --- `292-307`: LGTM! The addition of `gc` with normalization in `test_chgnet_graph_conv` is consistent with the existing graph convolution operations.src/matgl/layers/_basis.py (1)
`121-121`: LGTM! The change to use `clone()` for the `root` variable in `_call_sbf` enhances data integrity and avoids potential bugs.
Summary
Fixed the warning in _basis.py and increased code coverage
Checklist
ruff
.mypy
.duecredit
@due.dcite
decorators to reference relevant papers by DOI (example)Tip: Install
pre-commit
hooks to auto-check types and linting before every commit: