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

GRIB output #17

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open

GRIB output #17

wants to merge 28 commits into from

Conversation

clechartre
Copy link
Collaborator

Purpose

Outputting the inference results as GRIB format.
This integrates the functionality of transforming the .npy array that is originally produced into a GRIB from a template.

Code changes:

  • ar_model: add to the function on_predict_epoch_end a function generate_time_step to generate time steps markers for the grib files and a function that translates the npy output into a grib file.
  • other modifications to the code include adaptation to tsa, imports of new libraries for this functionality, and references to templates in constants

Checklist

Before submitting this PR, please make sure:

  • You have followed the coding standards guidelines established at Code Review Checklist.
  • Docstrings and type hints are added to new and updated routines, as appropriate
  • All relevant documentation has been updated or added (e.g. README)

Review

For the review process follow the guidelines at Checklist

@clechartre clechartre requested review from twicki and sadamov May 1, 2024 14:22
@clechartre clechartre self-assigned this May 1, 2024
Copy link
Collaborator

@sadamov sadamov left a comment

Choose a reason for hiding this comment

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

I requested some small changes to make code more independent of COSMO data. Otherwise all good

neural_lam/constants.py Outdated Show resolved Hide resolved
neural_lam/constants.py Outdated Show resolved Hide resolved
neural_lam/constants.py Outdated Show resolved Hide resolved
neural_lam/models/ar_model.py Outdated Show resolved Hide resolved
neural_lam/models/ar_model.py Outdated Show resolved Hide resolved
neural_lam/models/ar_model.py Show resolved Hide resolved
sadamov added a commit that referenced this pull request May 30, 2024
## Summary
This pull request introduces specific enhancements to the model loading
and optimizer/scheduler state restoration functionalities, improving
flexibility and compatibility with multi-GPU setups.

## Detailed Changes
- **Enhanced Model Loading for Multi-GPU**: Modified the model loading
logic to better support multi-GPU environments by ensuring that
optimizer states are only loaded when necessary and appropriate.
- **Checkpoint Adjustments**: Adjusted how learning rate schedulers are
restored from checkpoints to ensure they align correctly with the
current training state

## Impact
These changes provide users with greater control over how training
states are restored and improve the script's functionality in
distributed training environments.

## Testing
[x] Changes have been tested in both single and multi-GPU setups

## Notes
Further integration testing with different types of training
configurations is recommended to fully validate the new functionalities.

---------

Co-authored-by: Simon Adamov <[email protected]>
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