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

Use anemoi-graphs HeteroData #8

Merged
merged 15 commits into from
Jul 26, 2024
Merged

Use anemoi-graphs HeteroData #8

merged 15 commits into from
Jul 26, 2024

Conversation

JPXKQX
Copy link
Member

@JPXKQX JPXKQX commented Jul 2, 2024

This code implements the use of the new HeteroData object generated with anemoi-graphs package.

Checklist before requesting a review

  • I have performed a self-review of my code
  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation and docstrings to reflect the changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have ensured that the code is still pip-installable after the changes and runs
  • I have ran this on single GPU
  • I have ran this on multi-GPU or multi-node

Issue ticket number and link

This work would not have been possible without @theissenhelen and @JesperDramsch and the rest of the AIFS team!

@floriankrb
Copy link
Member

From a style point of view, these changes definitely make the code easier to read.

Copy link
Member

@JesperDramsch JesperDramsch left a comment

Choose a reason for hiding this comment

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

Thanks for the PR.

This seems to modify parts of the edge registration on mapper components, but doesn't modify edge registration on processors at all. Were these tested? I doubt they would work if the mappers needed a change.

src/anemoi/models/models/encoder_processor_decoder.py Outdated Show resolved Hide resolved
src/anemoi/models/layers/mapper.py Outdated Show resolved Hide resolved
tests/layers/mapper/test_graphconv_mapper.py Outdated Show resolved Hide resolved
tests/layers/processor/test_graphconv_processor.py Outdated Show resolved Hide resolved
@JPXKQX
Copy link
Member Author

JPXKQX commented Jul 18, 2024

Thanks for the PR.

This seems to modify parts of the edge registration on mapper components, but doesn't modify edge registration on processors at all. Were these tested? I doubt they would work if the mappers needed a change.

Yes, edge registration is modified in the GraphEdgeMixin class defined in mapper.py but used in both mappers and processors.

Copy link
Member

@JesperDramsch JesperDramsch left a comment

Choose a reason for hiding this comment

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

This re-introduces graph instantiation to non-graph components to define "which graph attributes should be defined" globally, when really this should not be the case.

src/anemoi/models/models/encoder_processor_decoder.py Outdated Show resolved Hide resolved
src/anemoi/models/layers/mapper.py Show resolved Hide resolved
@mchantry
Copy link
Member

Can you tag anemoi-graphs as 0.2 and then specify anemoi-graphs>=0.2 in the toml please.

@JPXKQX
Copy link
Member Author

JPXKQX commented Jul 26, 2024

Can you tag anemoi-graphs as 0.2 and then specify anemoi-graphs>=0.2 in the toml please.

anemoi-graphs is not a direct dependency of anemoi-model.s

@JPXKQX JPXKQX force-pushed the feature/use-anemoi-graphs branch from 62cefe8 to 8e80998 Compare July 26, 2024 13:54
JPXKQX and others added 2 commits July 26, 2024 14:07
Co-authored-by: Helen Theissen <[email protected]>
Co-authored-by: Jesper Dramsch <[email protected]>
Copy link
Member

@mchantry mchantry left a comment

Choose a reason for hiding this comment

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

LGTM, great work, please merge.

@JPXKQX JPXKQX dismissed JesperDramsch’s stale review July 26, 2024 15:09

Requested changes already addressed by Jesper

@JPXKQX JPXKQX merged commit a34cb8b into develop Jul 26, 2024
6 checks passed
@JPXKQX JPXKQX deleted the feature/use-anemoi-graphs branch July 26, 2024 15:11
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.

5 participants