-
Notifications
You must be signed in to change notification settings - Fork 0
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
add functionality to return a zero_field for optional fields on the serializer #450
add functionality to return a zero_field for optional fields on the serializer #450
Conversation
…erializer (works for non sparse fields)
cscs-ci run default |
launch jenkins spack |
cscs-ci run default |
launch jenkins spack |
@@ -566,7 +574,7 @@ def ddxn_z_full(self): | |||
def ddxt_z_full(self): | |||
return self._get_field("ddxt_z_full", EdgeDim, KDim) | |||
|
|||
@optionally_registered | |||
@IconSavepoint.optionally_registered(CellDim, KDim) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing that same input argument dims
has to be in both the optionally_registered
and 'get_field' does not look super nice to me. But I can't think of a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree. I first wanted to get those args from the decorated function, but that is not so easy because it is pass to the get_field
and not the decorated function.
cscs-ci run default |
Mandatory Tests Please make sure you run these tests via comment before you merge!
Optional Tests To run benchmarks you can use:
To run tests and benchmarks with the DaCe backend you can use:
In case your change might affect downstream icon-exclaim, please consider running
For more detailed information please look at CI in the EXCLAIM universe. |
launch jenkins spack |
Return a field initialized with zero for fields not present in the serializer:
if dimensions are passed to the decorator
optionally_registered
a zero field will be allocated of that dimensions size.Restrictions
IconSavepoint.sizes
dict.