Skip to content
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

Training GenCast #123

Merged
merged 32 commits into from
Aug 26, 2024
Merged

Training GenCast #123

merged 32 commits into from
Aug 26, 2024

Conversation

gbruno16
Copy link
Contributor

@gbruno16 gbruno16 commented Jul 22, 2024

Training Gencast

Description

This PR is currently a draft and implements several modifications:

  1. Registering Graph Tensors as Buffers:

    • The graph's tensors are registered as buffers during initialization. This allows them to move along with the model in a multi-device setting.
    • Since persistent=False, these tensors will not be part of the state_dict.
  2. Wrapping the Model with PyTorch Lightning:

    • The model is wrapped using PyTorch Lightning to facilitate easier training with various strategies (e.g., DDP, fp16).
    • This includes support for different schedulers (e.g., cosine annealing), loggers (e.g., wandb) and callbacks.
  3. Normalize first in sparse transformers:

    • The flag norm_first in sparse transformers move the conditional layer normalization before the multi-head attention. This seems to improve training performance.
  4. Noise generation with torch_harmonics

    • torch_harmonics supports noise generation on gpu with torch backend.

@gbruno16 gbruno16 self-assigned this Jul 22, 2024
@gbruno16 gbruno16 marked this pull request as ready for review August 14, 2024 12:49
Copy link
Member

@jacobbieker jacobbieker left a comment

Choose a reason for hiding this comment

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

Really good work here! This looks great.

graph_weather/models/gencast/denoiser.py Outdated Show resolved Hide resolved
tests/test_model.py Outdated Show resolved Hide resolved
@gbruno16 gbruno16 merged commit f702ae9 into openclimatefix:main Aug 26, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants