Repository navigation
Conversation
Models with keys that depend on the systems of a call (e.g. one block per atomic type) give empty blocks for the keys of the other systems batched in the same call. The keys of the outputs of one system then changed between calls, and accumulating its moments failed to find the reference block. Each system now only accumulates its blocks with samples. The blocks without samples in a whole call are collected and evaluated once at the end, so the results have the keys returned by the model.
Luthaf
reviewed
Dec 3, 2026
Comment on lines
+1565
to
+1567
| # the model can give empty blocks for the keys (e.g. atomic | ||
| # types) of the other Systems of the call, which change from | ||
| # one call to the next |
Member
There was a problem hiding this comment.
The model could also give no blocks, i.e. return a different set of keys from one system to another. Is this handled as well?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #363,
SymmetrizedModelevaluates several systems in the same model call. If the model's keys include the atomic type (like it can happen for PET in metatrain), systems with different species batched together get empty blocks for missing species that are instead present in other systems within the same batch. The keys can then differ between calls, and averaging fails withcould not find blocks matching the selection.Now each system averages only its own non-empty blocks, and
SymmetrizedModelreturns the same keys as the wrapped model.Contributor (creator of pull-request) checklist
Reviewer checklist