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

Add torch.clamp to trainers + add drop_path in FuXi + bugfix FuXi when use_spectral_norm: False + minor updates on credit.parser #130

Merged
merged 8 commits into from
Nov 18, 2024

Conversation

yingkaisha
Copy link
Collaborator

@yingkaisha yingkaisha commented Nov 7, 2024

New feature

  • data_clamp keyword is added to the data section (e.g., data_clamp: [-16, 16]). CREDIT will perform:
x = torch.clamp(x, min=clamp_min, max=clamp_max)
y = torch.clamp(y, min=clamp_min, max=clamp_max)

During its training and rollout. This will reduce the dmg caused by outliers

  • Added proj_drop, attn_drop, and drop_path in FuXi
  • A few lines were added in credit.parser to create separated entries for pressure-level and model-level inputs. It does not interrupt any existing functionality on pressure-level datasets.

Bugfix

  • Fixed device error on loading FuXi when use_spectral_norm: False

  • This PR can be verified as follows:
python applications/train.py -c config/example_physics_single.yml
python applications/rollout_to_netcdf.py -c config/example_physics_single.yml

@yingkaisha yingkaisha changed the title Add torch.clamp to training batches to reduce the impact of outliers Add torch.clamp to training batches to reduce the impact of outliers + minor updates on credit.parser Nov 7, 2024
@yingkaisha yingkaisha requested a review from jsschreck November 7, 2024 16:02
@yingkaisha yingkaisha changed the title Add torch.clamp to training batches to reduce the impact of outliers + minor updates on credit.parser Add torch.clamp to trainers + add drop_path in FuXi + bugfix FuXi when use_spectral_norm: False + minor updates on credit.parser Nov 10, 2024
@djgagne djgagne self-requested a review November 18, 2024 20:18
Copy link
Collaborator

@djgagne djgagne left a comment

Choose a reason for hiding this comment

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

The changes look good to me.

@djgagne djgagne merged commit 6fe8c7b into main Nov 18, 2024
1 check passed
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