Skip to content

Commit

Permalink
[CI] flaky unit test fix (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
blefaudeux authored Jun 1, 2022
1 parent cbf4526 commit 9e27c8f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_global_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
def test_global_attention():
b, s, d = 2, 90, 40

torch.cuda.manual_seed(42)
torch.manual_seed(42)

def test_ratio(global_attention_ratio: float):
# Make sure that Global and Normal attention get the same results for the corresponding tokens
a = torch.rand(b, s, d)
Expand Down

0 comments on commit 9e27c8f

Please sign in to comment.