Skip to content

Implementation CRPS decoder - #2623

Open
clessig wants to merge 14 commits into
developfrom
clessig/saibr/crps_decoder_v2
Open

Implementation CRPS decoder#2623
clessig wants to merge 14 commits into
developfrom
clessig/saibr/crps_decoder_v2

Conversation

@clessig

@clessig clessig commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

Description

Small cleanup of #2578 by @saibr

Usage:

decoder_ens_latent_perturbation : 
  num_members: 2    # 0 / 1 = disabled; >1 = number of ensemble members
  sigma_init: 0.2  # initial noise standard deviation
  sigma_learnable: True  # true = nn.Parameter; false = fixed buffer

Issue Number

Closes #2622

Checklist before asking for review

  • I have performed a self-review of my code
  • My changes comply with basic sanity checks:
    • I have fixed formatting issues with ./scripts/actions.sh lint
    • I have run unit tests with ./scripts/actions.sh unit-test
    • I have documented my code and I have updated the docstrings.
    • I have added unit tests, if relevant
  • I have tried my changes with data and code:
    • I have run the integration tests with ./scripts/actions.sh integration-test
    • (bigger changes) I have run a full training and I have written in the comment the run_id(s): launch-slurm.py --time 60
    • (bigger changes and experiments) I have shared a hegdedoc in the github issue with all the configurations and runs for this experiments
  • I have informed and aligned with people impacted by my change:
    • for config changes: the MatterMost channels and/or a design doc
    • for changes of dependencies: the MatterMost software development channel

@github-actions github-actions Bot added model Related to model training or definition (not generic infra) eval anything related to the model evaluation pipeline labels Jul 13, 2026
@clessig

clessig commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator Author

@shmh40 : this is a slight cleanup of #2578 . Can you please have a look.

@shmh40

shmh40 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor
decoder_ens_latent_perturbation : 
  num_members: 2    **# 0 / 1 = disabled;** >1 = number of ensemble members
  sigma_init: 0.2  # initial noise standard deviation
  sigma_learnable: True  # true = nn.Parameter; false = fixed buffer

1 is not actually disabled right? I think this is what you want, but just checking.

Predict outputs at the specific target coordinates based on the input weather state and
pre-training task and projects the latent space representation back to physical space.

If `latent_perturbation_num_members` > 1 (and `latent_perturbation_log_sigma` is set),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This latent_perturbation_num_members no longer exists. It has been replaced by decoder_ens_latent_perturbation.num_members

if self.use_latent_perturbation:
sigma_learnable = self.ens_latent_perturb.get("sigma_learnable", True)
self.latent_perturbation_log_sigma = nn.Parameter(
torch.zeros(1), requires_grad=sigma_learnable

@shmh40 shmh40 Jul 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So here we initialise this as 0, hence sigma is 1? And then it only takes a sensible value in reset_parameters? Is reset_parameters always called? What happens when we continue or finetune a run? Why don't we just read sigma_init here?

self.latent_perturbation_log_sigma = None
if self.use_latent_perturbation:
sigma_learnable = self.ens_latent_perturb.get("sigma_learnable", True)
self.latent_perturbation_log_sigma = nn.Parameter(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is nn.Parameter, is this also subject to weight decay on all parameters? Do we want this?

@shmh40 shmh40 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see comments.

@shmh40
shmh40 self-requested a review July 13, 2026 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

eval anything related to the model evaluation pipeline model Related to model training or definition (not generic infra)

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Implement CRPS decoder

3 participants