Skip to content

Commit bb03e87

Browse files
authored
Merge pull request #56 from foundation-model-stack/fix_seed_expectations
updated with manual seed in each test to ensure repeatability
2 parents 3d520f4 + 5c3116d commit bb03e87

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/models/test_model_expectations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121
GRANITE_3p2_8B_INSTRUCT = "ibm-granite/granite-3.2-8b-instruct"
2222
GRANITE_GUARDIAN_3p1_8B = "ibm-granite/granite-guardian-3.1-8b"
2323
ROBERTA_SQUAD_v2 = "deepset/roberta-base-squad2"
24-
torch.manual_seed(42)
2524

2625
micro_models = {LLAMA_3p1_8B_INSTRUCT, GRANITE_3p2_8B_INSTRUCT, GRANITE_GUARDIAN_3p1_8B}
2726

2827

2928
class AIUModelFixtureMixin(ModelFixtureMixin):
3029
@pytest.fixture(scope="class", autouse=True)
3130
def uninitialized_model(self, model_id):
31+
torch.manual_seed(42)
3232
if model_id in micro_models:
3333
get_model_kwargs = {"architecture": "hf_configured", "nlayers": 3}
3434
else:

0 commit comments

Comments
 (0)