Skip to content

Commit

Permalink
Merge pull request #396 from aqlaboratory/deepspeed-mean-test
Browse files Browse the repository at this point in the history
Change test_compare_model in deepspeed test to use mean instead of max
  • Loading branch information
christinaflo committed Jan 17, 2024
2 parents 561333f + 39f9958 commit 9e057b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_deepspeed_evo_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def test_compare_model(self):
Run full model with and without using DeepSpeed Evoformer attention kernel
and compare output coordinates.
"""
eps = 0.5
eps = 0.2
with open("tests/test_data/sample_feats.pickle", "rb") as fp:
batch = pickle.load(fp)

Expand Down Expand Up @@ -316,7 +316,7 @@ def test_compare_model(self):
out_repro = out_repro["sm"]["positions"][-1].squeeze(0)
out_repro_ds = out_repro_ds["sm"]["positions"][-1].squeeze(0)

err = torch.max(torch.abs(out_repro - out_repro_ds))
err = torch.mean(torch.abs(out_repro - out_repro_ds))
self.assertTrue(err < eps, f'Error: {err}')


Expand Down

0 comments on commit 9e057b7

Please sign in to comment.