This repository was archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Feature/tendency scaler #186
Draft
pinnstorm
wants to merge
4
commits into
develop
Choose a base branch
from
feature/tendency-scaler
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mc4117
reviewed
Dec 5, 2024
split = key.split("_") | ||
if len(split) > 1 and split[-1].isdigit(): | ||
# Apply pressure level scaling | ||
if split[0] in config.training.variable_loss_scaling.pl: | ||
variable_loss_scaling[idx] = config.training.variable_loss_scaling.pl[ | ||
variable_loss_scaling[idx] *= config.training.variable_loss_scaling.pl[ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if with the tendency scaling, the variable scaling factor set by the user should be ignored?
mc4117
reviewed
Dec 5, 2024
mc4117
reviewed
Dec 5, 2024
self.statistics_tendencies["stdev"][prog_idx] if self.statistics_tendencies else 1 | ||
) | ||
scaling = tendency_scaler.scaler(variable_stdev, variable_tendency_stdev) | ||
LOGGER.debug("Parameter %(key)s is being scaled by statistic_tendencies by %(scaling).2f") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't work for me but the following did:
LOGGER.debug(f"Parameter {key} is being scaled by statistic_tendencies by {scaling:.2f}")
mchantry
reviewed
Dec 10, 2024
@@ -117,3 +117,7 @@ pressure_level_scaler: | |||
_target_: anemoi.training.data.scaling.ReluPressureLevelScaler | |||
minimum: 0.2 | |||
slope: 0.001 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have a comment explaining briefly what tendency scaler does.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Draft PR for tendency-scaler following PressureLevelScaler example