Skip to content

Commit

Permalink
[Fix] Call clip gradients if clip val greater than 0 (#6330)
Browse files Browse the repository at this point in the history
* Call clip gradients if clip val greater than 0

* format

* Format

* Move to top of file
  • Loading branch information
SeanNaren authored and tchaton committed Mar 9, 2021
1 parent d8f90bc commit 4abf247
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/plugins/test_sharded_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def test_ddp_sharded_precision_16_clip_gradients(mock_oss_clip_grad_norm, clip_v
mock_oss_clip_grad_norm.assert_not_called()


<<<<<<< HEAD
=======
@RunIf(fairscale=True)
>>>>>>> d0e7ca36... [Fix] Call clip gradients if clip val greater than 0 (#6330)
@pytest.mark.parametrize(["accelerator"], [("ddp_sharded", ), ("ddp_sharded_spawn", )])
@pytest.mark.skipif(not _FAIRSCALE_AVAILABLE, reason="Fairscale is not available")
def test_sharded_ddp_choice(tmpdir, accelerator):
Expand Down

0 comments on commit 4abf247

Please sign in to comment.