Skip to content

Add GenDA diffusion model with sensor conditioning#216

Draft
CodeVishal-17 wants to merge 2 commits intoopenclimatefix:mainfrom
CodeVishal-17:feature/genda-model
Draft

Add GenDA diffusion model with sensor conditioning#216
CodeVishal-17 wants to merge 2 commits intoopenclimatefix:mainfrom
CodeVishal-17:feature/genda-model

Conversation

@CodeVishal-17
Copy link
Copy Markdown

Pull Request

Description

Implemented a new GenDA diffusion-based model with sensor conditioning support using the existing GenCast graph infrastructure.

Changes made

  • Added GenDA model implementation in graph_weather/models/genda/

  • Added sensor conditioning support using:

    • sensor_mask
    • sensor_values
  • Added classifier-free guidance style conditioning dropout during training

  • Added guided forward support for conditional inference

  • Integrated graph processing pipeline using existing GenCast graph builder and processor layers

  • Added tensor shape validation for conditioning inputs

  • Added package exports through __init__.py

  • Added unit test for forward-pass validation

Testing

A lightweight test configuration was used to validate:

  • model initialization
  • graph construction
  • conditioning integration
  • processor execution
  • successful forward pass
  • correct output tensor shape

Fixes #214

How Has This Been Tested?

  • Ran forward-pass unit tests using pytest
  • Verified successful model execution with small debug configuration
  • Confirmed conditioning pathway works correctly
  • Confirmed output tensor shapes match target tensor shapes

Test command used:

python -m pytest tests/test_genda.py
  • Yes

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

  • Yes

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@CodeVishal-17
Copy link
Copy Markdown
Author

The failing pre-commit checks appear to come from existing Ruff/docstring violations in unrelated modules (aurora/cafa/anemoi) rather than the new GenDA implementation itself.

The new GenDA test passes locally with:

python -m pytest tests/test_genda.py

Please let me know if you'd like me to additionally help clean up the existing lint/docstring issues.

@jacobbieker
Copy link
Copy Markdown
Collaborator

If you have time, cleaning up those ruff issues would be fantastic, but no worries if not

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.

[Paper] GenDA: Generative Data Assimilation On Complex Urban Areas via Classifier-free Diffusion Guidance

2 participants