From 4ad71d2ecf8431d2b3fafeb15ec4bfdfa752b9f9 Mon Sep 17 00:00:00 2001 From: Gregory Comer Date: Mon, 18 May 2026 12:02:25 -0700 Subject: [PATCH] Set torch seed for pytest --- conftest.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/conftest.py b/conftest.py index 6c9df86a1ce..19d777a74e0 100644 --- a/conftest.py +++ b/conftest.py @@ -1,5 +1,7 @@ import sys +import torch + collect_ignore_glob: list[str] = [] # Skip Apple tests on Windows. Note that some Core ML tests can run on Linux, as the AOT flow @@ -10,3 +12,6 @@ collect_ignore_glob += [ "backends/apple/**", ] + +# Seed the run +torch.manual_seed(42)