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

Adding flags to expose gradient clipping args in Trainer #361

Merged
merged 10 commits into from
Aug 3, 2023

Conversation

prabhuteja12
Copy link
Contributor

This change is to expose gradient_clip_val and gradient_clip_algorithm flags of Trainer object.

Gradient clipping is used for L2P training.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@prabhuteja12 prabhuteja12 changed the base branch from main to dev August 3, 2023 11:41
@prabhuteja12 prabhuteja12 marked this pull request as ready for review August 3, 2023 13:12
@github-actions
Copy link

github-actions bot commented Aug 3, 2023

Coverage report

The coverage rate went from 85.68% to 85.68% ⬇️

100% of new lines are covered.

Diff Coverage details (click to unfold)

src/renate/training/training.py

100% of new lines are covered (85% of the complete file).

src/renate/defaults.py

100% of new lines are covered (99.02% of the complete file).

src/renate/updaters/model_updater.py

100% of new lines are covered (95.32% of the complete file).

wistuba
wistuba previously approved these changes Aug 3, 2023
@@ -629,6 +633,8 @@ def __init__(
precision: str = defaults.PRECISION,
seed: int = defaults.SEED,
deterministic_trainer: bool = defaults.DETERMINISTIC_TRAINER,
gradient_clip_val: Union[int, float, None] = defaults.GRADIENT_CLIP_VAL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it fair to assume this is Optional[float]?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

@wistuba wistuba self-assigned this Aug 3, 2023
wistuba
wistuba previously approved these changes Aug 3, 2023
@prabhuteja12 prabhuteja12 merged commit df054f9 into dev Aug 3, 2023
18 checks passed
@prabhuteja12 prabhuteja12 deleted the pt_expose_grad_clip branch August 3, 2023 14:50
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.

None yet

2 participants