Fix some tests (especially compile with fullgraph=True on Python<3.11) (#38319)

* fix tests

* better fix for python<3.11

* fixes

* style
This commit is contained in:
Cyril Vallez
2025-05-23 17:11:40 +02:00
committed by GitHub
parent a63bc17416
commit 896833c183
7 changed files with 48 additions and 83 deletions

View File

@@ -4461,6 +4461,7 @@ class ModelTesterMixin:
del loss
model = torch.compile(model, fullgraph=True, mode="reduce-overhead")
# forward compilation
set_seed(42)
loss = model(**inputs).loss