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

Grad norm tensor fix #938

Merged
merged 3 commits into from
May 1, 2024
Merged

Grad norm tensor fix #938

merged 3 commits into from
May 1, 2024

Conversation

yeonsily
Copy link
Collaborator

@yeonsily yeonsily commented Apr 30, 2024

What does this PR do?

Fixes #933

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@yeonsily yeonsily requested a review from libinta April 30, 2024 22:44
@yeonsily yeonsily requested a review from regisss as a code owner April 30, 2024 22:44
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@libinta libinta added the run-test Run CI for PRs from external contributors label Apr 30, 2024
@regisss
Copy link
Collaborator

regisss commented May 1, 2024

@yeonsily I pushed a new commit because _grad_norm.size() == 1 will always return False as we have _grad_norm.size() == torch.Size([1]) in lazy mode.
I also prefer not logging the grad norm if it is a list to not pollute the logs with a very big tensor.

@regisss regisss merged commit 051e5e5 into main May 1, 2024
9 checks passed
@regisss regisss deleted the grad_norm_tensor_fix branch May 1, 2024 18:36
ccrhx4 pushed a commit to ccrhx4/ccrhx4.optimum-habana that referenced this pull request May 11, 2024
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
astachowiczhabana pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request May 15, 2024
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
astachowiczhabana added a commit to HabanaAI/optimum-habana-fork that referenced this pull request May 15, 2024
Co-authored-by: Yeonsil Yoon <yyoon@habana.ai>
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
astachowiczhabana added a commit to HabanaAI/optimum-habana-fork that referenced this pull request Jun 13, 2024
Co-authored-by: Yeonsil Yoon <yyoon@habana.ai>
Co-authored-by: regisss <15324346+regisss@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-test Run CI for PRs from external contributors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RuntimeError: a Tensor with 32768 elements cannot be converted to Scalar
4 participants