From 97b614d3de39ea2adf91bf94908a03a875bec3da Mon Sep 17 00:00:00 2001 From: bkleyn Date: Mon, 5 Feb 2024 16:39:36 -0500 Subject: [PATCH 1/2] fix tests after scikit-learn=1.4 release Signed-off-by: bkleyn --- tests/test_parallel.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/test_parallel.py b/tests/test_parallel.py index 88df076..a43e985 100755 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -236,7 +236,7 @@ def test_UCB1_c2(self): is_predict=True, n_jobs=1) - self.assertEqual(arm, [[3, 3, 1, 1, 1, 1, 3, 1, 3, 3] for _ in range(5)]) + self.assertEqual(arm, [[1, 3, 1, 1, 1, 1, 1, 3, 3, 1] for _ in range(5)]) arm, mab = self.predict(arms=[1, 2, 3, 4], decisions=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4], @@ -250,7 +250,7 @@ def test_UCB1_c2(self): is_predict=True, n_jobs=2) - self.assertEqual(arm, [[3, 3, 1, 1, 1, 1, 3, 1, 3, 3] for _ in range(5)]) + self.assertEqual(arm, [[1, 3, 1, 1, 1, 1, 1, 3, 3, 1] for _ in range(5)]) arm, mab = self.predict(arms=[1, 2, 3, 4], decisions=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4], @@ -264,7 +264,7 @@ def test_UCB1_c2(self): is_predict=True, n_jobs=100) - self.assertEqual(arm, [[3, 3, 1, 1, 1, 1, 3, 1, 3, 3] for _ in range(5)]) + self.assertEqual(arm, [[1, 3, 1, 1, 1, 1, 1, 3, 3, 1]for _ in range(5)]) def test_greedy1_k2(self): rng = np.random.RandomState(seed=7) @@ -562,7 +562,7 @@ def test_thompson_n3(self): is_predict=True, n_jobs=2) - self.assertListEqual(arms, [3, 2, 1, 1, 1, 1, 2, 1, 3, 1]) + self.assertListEqual(arms, [1, 1, 1, 1, 1, 1, 1, 3, 1, 1]) arms, mab = self.predict(arms=[1, 2, 3], decisions=[1, 2, 1, 2, 1, 2, 1, 2, 1, 2], @@ -576,7 +576,7 @@ def test_thompson_n3(self): is_predict=True, n_jobs=-1) - self.assertListEqual(arms, [3, 2, 3, 2, 2, 2, 3, 3, 2, 3]) + self.assertListEqual(arms, [2, 2, 2, 2, 3, 2, 2, 2, 3, 1]) def test_thompson_a2(self): @@ -879,7 +879,7 @@ def test_UCB1_c2_backend(self): n_jobs=2, backend=None) - self.assertEqual(arm, [[3, 3, 1, 1, 1, 1, 3, 1, 3, 3] for _ in range(5)]) + self.assertEqual(arm, [[1, 3, 1, 1, 1, 1, 1, 3, 3, 1] for _ in range(5)]) arm, mab = self.predict(arms=[1, 2, 3, 4], decisions=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4], @@ -894,7 +894,7 @@ def test_UCB1_c2_backend(self): n_jobs=2, backend='loky') - self.assertEqual(arm, [[3, 3, 1, 1, 1, 1, 3, 1, 3, 3] for _ in range(5)]) + self.assertEqual(arm, [[1, 3, 1, 1, 1, 1, 1, 3, 3, 1] for _ in range(5)]) arm, mab = self.predict(arms=[1, 2, 3, 4], decisions=[1, 1, 1, 2, 2, 2, 3, 3, 3, 4], @@ -909,7 +909,7 @@ def test_UCB1_c2_backend(self): n_jobs=2, backend='threading') - self.assertEqual(arm, [[3, 3, 1, 1, 1, 1, 3, 1, 3, 3] for _ in range(5)]) + self.assertEqual(arm, [[1, 3, 1, 1, 1, 1, 1, 3, 3, 1] for _ in range(5)]) def test_greedy1_k2_backend(self): rng = np.random.RandomState(seed=7) From 281ed71bee3844abd7d055bc391172656f4e363d Mon Sep 17 00:00:00 2001 From: bkleyn Date: Mon, 5 Feb 2024 16:40:50 -0500 Subject: [PATCH 2/2] drop python 3.8 and add 3.11 from ci Signed-off-by: bkleyn --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b1e41b..fec1c04 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10", "3.11"] os: [ubuntu-latest, macos-latest, windows-latest] fail-fast: false steps: