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

Model output validation fix #324

Merged
merged 3 commits into from
Dec 11, 2024

Conversation

laserkelvin
Copy link
Collaborator

This PR fixes the issue where a batch size of 1 will cause the ModelOutput model validation to fail for standardize_total_energy, where a single scalar wrapped in a torch.Tensor returns an ndim != 1 with an empty torch.Size([]) for the shape.

The fix makes it so that the check that particular check is skipped if there is a single element in total_energies after all of the homogenizing work is done. I've also parameterized the corresponding unit test to include a number of different batch sizes, including one.

@laserkelvin laserkelvin added the bug Something isn't working label Dec 11, 2024
@laserkelvin laserkelvin merged commit 47f28b4 into IntelLabs:main Dec 11, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants