Implement mta_format_metadata#253
Open
GardevoirX wants to merge 2 commits into
Open
Conversation
6c502e1 to
b40009c
Compare
Luthaf
reviewed
Jun 1, 2026
| fn validate(&self) { | ||
| for author in &self.authors { | ||
| if author.is_empty() { | ||
| panic!("author can not be empty string in ModelMetadata"); |
Member
There was a problem hiding this comment.
Do not panic, instead return Result::Err
Member
There was a problem hiding this comment.
Also, please do validation during deserialization, and not as a separate step.
To make the models authors live easier, I might make sense to skip empty values instead of erroring, but no strong feeling on this.
Contributor
Author
There was a problem hiding this comment.
hm throwing an error for empty values is our current behavior
metatomic/metatomic-torch/src/model.cpp
Lines 659 to 663 in 79b94aa
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.
Contributor (creator of pull-request) checklist
Reviewer checklist
📚 Download documentation for this pull-request