"...git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "77382e918d717a91472ba634b9163aacaeaded38"
Unverified Commit 7941769e authored by Sven Schultze's avatar Sven Schultze Committed by GitHub
Browse files

Fix grad_norm unserializable tensor log failure (#29212)

* Fix grad_norm unserializable tensor log failure

* Fix origin of grad_norm logs to be in deepspeed get_global_grad_norm()
parent 1681a6d4
......@@ -2011,7 +2011,7 @@ class Trainer:
is_accelerate_available()
and self.accelerator.distributed_type == DistributedType.DEEPSPEED
):
grad_norm = model.get_global_grad_norm()
grad_norm = model.get_global_grad_norm().item()
else:
grad_norm = _grad_norm.item() if _grad_norm is not None else None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment