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

Update sanity checks for training data consistency #120

Open
wants to merge 12 commits into
base: develop
Choose a base branch
from

Conversation

JesperDramsch
Copy link
Member

@JesperDramsch JesperDramsch commented Nov 1, 2024

This PR implements a callback that tries to ensure that the variable in the training are in order.

The following scenarios are checked:

Model Scenarios

There are two scenarios for the model:

New Model

A fresh model will get the name_to_index from the training dataset and compare to validation and test on epoch start.

From Checkpoint

A model that is restored from a checkpoint will retrieve the name_to_index in existing data_indices and compare them to instantiated data_indices.

Error Scenarios

There are valid, warning, and error scenarios:

Valid Scenario

The name_to_index is identical

Warnings

When variables are renamed but in the same locations, a warning is issued but training will not be blocked.

Errors

Values are renamed in different locations, which will result in an error.

Values are permuted, will result in an error

Removes the Resolution Check

Currently there is a resolution check, which I was told gets in the way of training with merged datasets et al.

Upon consideration of factoring this into another Callback, I decided to get rid of the check instead, as it would be flaky at best and breaking at the worst.

@HCookie pointed out this was also flagged now in #68

src/anemoi/training/data/datamodule.py Outdated Show resolved Hide resolved
src/anemoi/training/diagnostics/callbacks/sanity.py Outdated Show resolved Hide resolved
tests/diagnostics/callbacks/test_variable_order.py Outdated Show resolved Hide resolved
@JesperDramsch JesperDramsch changed the title Check Variable Sorting during Training Update sanity checks for training data consistency Nov 5, 2024
HCookie
HCookie previously approved these changes Nov 11, 2024
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