Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc ASE db bugfixes #965

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Misc ASE db bugfixes #965

merged 2 commits into from
Jan 17, 2025

Conversation

wolearyc
Copy link
Contributor

@wolearyc wolearyc commented Jan 8, 2025

This PR addresses #962 as well as a related bug in which AtomsRow data was not fully copied during dataset splitting.

@lbluque lbluque self-requested a review January 14, 2025 01:09
Copy link
Collaborator

@lbluque lbluque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm thanks a lot @wolearyc! Just a minor question on the stress comment in the unit test

Comment on lines +184 to +186
# There is a possible bug in ASE which makes this test annoying to write.
# AtomsRow.toatoms() has a calculator attached that computes a stress tensor # with the wrong shape: (9,). This makes convert_all fail due to an assertion in
# atoms.get_stress().
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this issue come up?

Is that here?

if self.r_stress:
stress = torch.tensor(
atoms.get_stress(apply_constraint=False, voigt=False),
dtype=torch.float32,
)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, precisely.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/fairchem/core/common/tutorial_utils.py 0.00% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/fairchem/core/preprocessing/atoms_to_graphs.py 90.90% <100.00%> (+1.76%) ⬆️
src/fairchem/core/common/tutorial_utils.py 26.21% <0.00%> (ø)

@lbluque lbluque added bug Something isn't working patch Patch version release labels Jan 16, 2025
@lbluque lbluque added this pull request to the merge queue Jan 16, 2025
Merged via the queue into FAIR-Chem:main with commit b7dc44e Jan 17, 2025
8 of 9 checks passed
misko pushed a commit that referenced this pull request Jan 17, 2025
* fixed bug in which row data was not fully copied during dataset split

* fixed bug in which row data was not fully copied during dataset split

Former-commit-id: 6289401e3e128c8018a7dc76cd12010d9d466310
mshuaibii pushed a commit that referenced this pull request Jan 17, 2025
* fixed bug in which row data was not fully copied during dataset split

* fixed bug in which row data was not fully copied during dataset split

Former-commit-id: 99f064a3d1b2e45842e136913e76e3427ed1f0ab
@wolearyc wolearyc deleted the ase-db-info-fix branch January 20, 2025 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Patch version release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants