From c5b121bcd5ef9a0abd80bd89981c784250153eb5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 03:02:02 +0000 Subject: [PATCH 1/2] Bump actions/checkout from 5 to 6 Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ff53bd6..0d4351ee 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: python-version: ["3.11"] steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v6 with: From b7d1ed69377f859a1c4649f74fc586004767e8e7 Mon Sep 17 00:00:00 2001 From: Andrei Paleyes Date: Thu, 5 Feb 2026 00:00:46 +0000 Subject: [PATCH 2/2] Maybe fix for new numpy --- .../optimization/multi_source_acquisition_optimizer.py | 7 +++++-- tests/emukit/core/test_multi_source_optimizer.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/emukit/core/optimization/multi_source_acquisition_optimizer.py b/emukit/core/optimization/multi_source_acquisition_optimizer.py index 0b95a6ba..8bf19250 100644 --- a/emukit/core/optimization/multi_source_acquisition_optimizer.py +++ b/emukit/core/optimization/multi_source_acquisition_optimizer.py @@ -61,8 +61,8 @@ def optimize(self, acquisition: Acquisition, context: Optional[Context] = None) the parameter name and the value is the value to fix the parameter to. :return: A tuple of (location of maximum, acquisition value at maximum) """ - f_maxs = np.zeros((len(self.source_parameter.domain))) x_opts = [] + f_maxs = [] if context is None: context = dict() @@ -75,7 +75,10 @@ def optimize(self, acquisition: Acquisition, context: Optional[Context] = None) # Fix the source using a dictionary, the key is the name of the parameter to fix and the value is the # value to which the parameter is fixed context[self.source_parameter.name] = self.source_parameter.domain[i] - x, f_maxs[i] = self.acquisition_optimizer.optimize(acquisition, context) + x, f = self.acquisition_optimizer.optimize(acquisition, context) x_opts.append(x) + f_maxs.append(f) + + f_maxs = np.concatenate(f_maxs) best_source = np.argmax(f_maxs) return x_opts[best_source], np.max(f_maxs) diff --git a/tests/emukit/core/test_multi_source_optimizer.py b/tests/emukit/core/test_multi_source_optimizer.py index 99b4bba0..477b68a1 100644 --- a/tests/emukit/core/test_multi_source_optimizer.py +++ b/tests/emukit/core/test_multi_source_optimizer.py @@ -19,7 +19,7 @@ @pytest.fixture def multi_source_optimizer(): mock_acquisition_optimizer = mock.create_autospec(GradientAcquisitionOptimizer) - mock_acquisition_optimizer.optimize.return_value = (np.array([[0.0]]), None) + mock_acquisition_optimizer.optimize.return_value = (np.array([[0.0]]), np.array([[0.0]])) space = ParameterSpace([ContinuousParameter("x", 0, 1), InformationSourceParameter(2)]) return MultiSourceAcquisitionOptimizer(mock_acquisition_optimizer, space)