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

Bugifx on random seed inconsistencies and keyword grad_max_norm #133

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

yingkaisha
Copy link
Collaborator

Bugfix

  • Some places inside credit uses random seed 42 as default and left untouched in train.py and train_multistep.py. This is fixed so that all random seed entries accept the random seed from YAML input.
  • Keyword grad_max_norm did not apply gradient clipping properly. It is now fixed in trainerERA5_v2.py and trainerERA5_multistep_grad_accum.py

@yingkaisha
Copy link
Collaborator Author

ready

@jsschreck
Copy link
Collaborator

This looks good, thanks for finding the seed inconsistency. For grad norm, sometimes I use it, sometimes not (I have found it most useful with LSTMs/GRUs, have not tested extensively with transformers). Do we want to add an option not to use it (for instance maybe 0.0 is the flag to ignore it?)

@yingkaisha
Copy link
Collaborator Author

This looks good, thanks for finding the seed inconsistency. For grad norm, sometimes I use it, sometimes not (I have found it most useful with LSTMs/GRUs, have not tested extensively with transformers). Do we want to add an option not to use it (for instance maybe 0.0 is the flag to ignore it?)

I will add it

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.

Changes look good to me. Thank you for catching the issue with the random seed setting.

@djgagne djgagne merged commit fc2f8d1 into main Dec 4, 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.

3 participants