Skip to content

Commit

Permalink
Move manual_seed() into setUp
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
  • Loading branch information
larryliu0820 committed Nov 13, 2024
1 parent dfedb78 commit 9bb40cf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions extension/llm/modules/test/test_attention.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,10 @@
from torchtune.modules.attention import MultiHeadAttention as TTMultiHeadAttention


torch.manual_seed(0)


class AttentionTest(unittest.TestCase):
def setUp(self):
super().setUp()

torch.manual_seed(0)
# Constants
self.embed_dim = 2048
self.num_heads = 32
Expand Down

0 comments on commit 9bb40cf

Please sign in to comment.