switch for consistently enabling gradient tracking - #2711
Draft
enssow wants to merge 1 commit into
Draft
Conversation
enssow
marked this pull request as draft
August 3, 2026 08:29
clessig
reviewed
Aug 6, 2026
clessig
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution. Minor changes required.
| norm_type: "LayerNorm" | ||
| qk_norm_type: null # if null, defaults to norm_type | ||
|
|
||
| lrp_enabled: False |
Collaborator
There was a problem hiding this comment.
The meaning of config options should be self-explanatory, at least for someone familiar with the model. This is not the case here.
| if self.cf.lrp_enabled: | ||
| tokens_all = tokens_all.scatter(0, scatter_idxs, torch.cat(x_embeds)) | ||
| else: | ||
| # actual scatter operation and apply per cell positional encoding |
Collaborator
There was a problem hiding this comment.
The comment should be above the if-statement, the comment in l126 above l128
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
In the current WeatherGenerator setup when the model does a forward pass, it runs through
_scatterin some instances this does not preserve the autograd graph back to the ERA5 input tokens. I've implemented a switch in the config. Will add some sample runs to show that performance of model doesn't change here.Issue Number
Closes #2661
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