From b77e8796e9eb7bc81fbda84cec3f499e0580a6fb Mon Sep 17 00:00:00 2001 From: davidshukhin Date: Thu, 11 Jun 2026 16:47:32 -0400 Subject: [PATCH] Seed test_spike_hdc to kill CI flake Unseeded torch.rand inputs occasionally correlate by chance and push HV similarity past the 0.5 bound (failed on the 3.9 job of run 27376134434 while passing 3.10/3.11). Seed makes it deterministic. --- isildur/tests/test_isildur.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/isildur/tests/test_isildur.py b/isildur/tests/test_isildur.py index b62283b..2080502 100644 --- a/isildur/tests/test_isildur.py +++ b/isildur/tests/test_isildur.py @@ -309,6 +309,10 @@ def test_assoc_memory(): def test_spike_hdc(): """Test SpikeHDC encoding.""" + # Seeded: with unseeded 10-dim random inputs, the two spike vectors + # occasionally correlate by chance and their HVs exceed the 0.5 + # similarity bound (flaked on CI 2026-06-11). + torch.manual_seed(42) input_size = 10 dim = 500 encoder = SpikeHDC(input_size, dim)