updating mse_ens and linting#2371
Open
wael-mika wants to merge 2 commits into
Open
Conversation
Collaborator
|
I think 1.) should be the default since it is a well-defined, self-contained loss. 2.) requires another loss term to control the higher order moments. |
clessig
reviewed
May 18, 2026
Collaborator
clessig
left a comment
There was a problem hiding this comment.
Thanks for the implementation. I think we can make the code simpler by using the lp_loss or mse_loss functions.
| weights_channels : shape (num_channels,) or None | ||
| weights_points : shape (num_data_points,) or None | ||
| """ | ||
| mask_nan = ~torch.isnan(target) |
Collaborator
There was a problem hiding this comment.
Please re-use the lp_loss or mse_loss functions below
Contributor
Author
There was a problem hiding this comment.
Sure, I will push an update
Contributor
Author
There was a problem hiding this comment.
what do you think the correct way to control the spread when using option 2?
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.
Description
Implemented mse_ens with the updated signature with 2 options:
1- applying mse on each ensemble member vs target and then take the mean (default)
2- calculating the mean of all ensembles and then calculate the loss (configurable)
The default one to be decided after discussion
Issue Number
Closes #2250
Is this PR a draft? Mark it as draft.
Checklist before asking for review
./scripts/actions.sh lint./scripts/actions.sh unit-test./scripts/actions.sh integration-testlaunch-slurm.py --time 60