Deprecate plural outputs, unify inputs and outputs#210
Open
Luthaf wants to merge 3 commits intometatensor:mainfrom
Open
Deprecate plural outputs, unify inputs and outputs#210Luthaf wants to merge 3 commits intometatensor:mainfrom
Luthaf wants to merge 3 commits intometatensor:mainfrom
Conversation
| heat_flux | ||
| spin_multiplicity | ||
| feature | ||
| variants |
Contributor
There was a problem hiding this comment.
Suggested change
| variants | |
| variant |
?
Member
Author
There was a problem hiding this comment.
no, there are multiple variants of the same quantity
Comment on lines
+820
to
+829
| } else if (base == "position") { | ||
| check_position(value, systems, request); | ||
| } else if (base == "momentum") { | ||
| check_momentum(value, systems, request); | ||
| } else if (base == "mass") { | ||
| check_mass(value, systems, request); | ||
| } else if (base == "velocity") { | ||
| check_velocity(value, systems, request); | ||
| } else if (base == "charge") { | ||
| check_charge(value, systems, request); |
Contributor
There was a problem hiding this comment.
Do we really need functions for all of them independently? I would say the logic is very similar for most of them, no?
Member
Author
There was a problem hiding this comment.
Yes, but IMO having them as individual functions make it a lot easier to only modify one of them. We already share multiple sub-utility functions to check parts of the TensorMap
4 tasks
They are now named "standard quantities", and the previous name is deprecated. For backward compatibility, AtomisticModel will automatically transform between the engine requested outputs and the model capabilties, sending warnings if any of them uses deprecated names. For inputs, the engine must opt-in using the new names (since we don't want to duplicate inputs in the systems), and AtomisticModel will transform the provided inputs back to what the model wants internally.
2935384 to
9d82dcf
Compare
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.
Standard inputs and outputs are now named "standard quantities"; and all names use the singular version of the word (
massinstead ofmasses)Most of the code in this PR is handling backward compatibility. For outputs, AtomisticModel will automatically transform between the engine requested outputs and the model capabilties, sending warnings if any of them uses deprecated names.
For inputs, the engine must opt-in using the new names (since we don't want to duplicate inputs in the systems), and AtomisticModel will transform the provided inputs back to what the model wants internally.
Contributor (creator of pull-request) checklist
Issue referenced (for PRs that solve an issue)?Reviewer checklist