Skip to content

Conversation

@TillHae
Copy link
Contributor

@TillHae TillHae commented Dec 15, 2025

Description

  • Replaced repeat with expand to create the full scatter index with broadcasting in the [EmbeddingEngine](https://github.com/ecmwf/WeatherGenerator/blob/develop/src/weathergen/model/engines.py#L110) for efficiency.
  • Reopened as small refactoring for EmbeddingEngine #1542

Issue Number

Fixes #1466

Is this PR a draft? Mark it as draft.

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

clessig and others added 30 commits November 12, 2025 09:38
…andom and healpix masking. Open issues with _coords_local, centroids and probably other things.
TODO:
- Forecast still needs to be adapted
- Some more cleanup of variable naming, return values etc
…enizer_masking. generate the mask, otherwise using batchify_source and batchify_target as before, with the capacity to remember what mask we have now when it comes to generating the targets. Update to inputs_metadata structure but not put in to practice
…eatherGenerator into shmh40/dev/1270-idx-global-local
* Add to device to ModelBatch, etc & adapt model

TODO adapt validate and inference
TODO test forecasting and multiple stream because predict changed
substantially

* Rename view to sample and fix validate

* Revert predict function and fix inference

* Fix invalid access with mask

* Linting

* Fixed handling of target_idxs and other minor issues

* Remove duplicate to_device

* move loss history into loss calculator

* handle loss_avg and unflatten loss dict

* fixing train_logger

* update validate logging, failing - need to merge data branch

* rm additional log files and log_vals variable, and collapse to single add_logs fct for train and val

* rm comment

* fix validation

* move prepare losses fct to train_logger script, fix terminal logging for val

* fix ctr_loss_fcts normalization; calculate per stream, per lfct average across channels and fsteps for logging

* Fixed linting

* fix bug in emptying history after logging

---------

Co-authored-by: sophiex <[email protected]>
Co-authored-by: Christian Lessig <[email protected]>
@clessig
Copy link
Collaborator

clessig commented Dec 15, 2025

Can we do this against this branch: shmh40/dev/1270-idx-global-local, see #1283

@clessig clessig self-requested a review December 15, 2025 21:06
@TillHae TillHae changed the base branch from main to shmh40/dev/1270-idx-global-local December 16, 2025 13:20
@TillHae
Copy link
Contributor Author

TillHae commented Dec 16, 2025

Can we do this against this branch: shmh40/dev/1270-idx-global-local, see #1283

I hope everything worked out. This made most of my changes obsolete.

@tjhunter
Copy link
Collaborator

Can we do this against this branch: shmh40/dev/1270-idx-global-local, see #1283

shmh40/dev/1270-idx-global-local has been merged, we can keep develop as a target now.

@TillHae TillHae changed the base branch from shmh40/dev/1270-idx-global-local to develop December 31, 2025 12:07
@TillHae TillHae marked this pull request as draft December 31, 2025 12:16
@TillHae
Copy link
Contributor Author

TillHae commented Dec 31, 2025

Closing this PR and doing a new cleaner one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Proper error handling and efficient broadcasting in EmbeddingEngine Forward pass

6 participants