From 5ec287c7915625924d1316795e75419bbca77312 Mon Sep 17 00:00:00 2001 From: Alyssa Cote <46540273+AlyssaCote@users.noreply.github.com> Date: Thu, 19 Sep 2024 18:24:07 -0700 Subject: [PATCH] Bug fix (#715) Fixed bug in _validate. [ committed by @AlyssaCote ] [ reviewed by @ankona ] --- doc/changelog.md | 1 + .../_core/mli/infrastructure/control/request_dispatcher.py | 2 +- tests/dragon/test_error_handling.py | 6 ------ 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/doc/changelog.md b/doc/changelog.md index 45f8e4005..7d08c9376 100644 --- a/doc/changelog.md +++ b/doc/changelog.md @@ -13,6 +13,7 @@ Jump to: Description +- Quick bug fix in _validate - Add helper methods to MLI classes - Update error handling for consistency - Parameterize installation of dragon package with `smart build` diff --git a/smartsim/_core/mli/infrastructure/control/request_dispatcher.py b/smartsim/_core/mli/infrastructure/control/request_dispatcher.py index 1c3b0f4c8..67797fe44 100644 --- a/smartsim/_core/mli/infrastructure/control/request_dispatcher.py +++ b/smartsim/_core/mli/infrastructure/control/request_dispatcher.py @@ -280,7 +280,7 @@ def _check_feature_stores(self, request: InferenceRequest) -> bool: fs_actual = {item.descriptor for item in self._feature_stores.values()} fs_missing = fs_desired - fs_actual - if self.has_featurestore_factory: + if not self.has_featurestore_factory: logger.error("No feature store factory configured") return False diff --git a/tests/dragon/test_error_handling.py b/tests/dragon/test_error_handling.py index a5df62954..618b00d87 100644 --- a/tests/dragon/test_error_handling.py +++ b/tests/dragon/test_error_handling.py @@ -460,12 +460,6 @@ def test_dispatcher_pipeline_stage_errors_handled( mock_reply_fn = mock_pipeline_stage(monkeypatch, integrated_worker, stage) - monkeypatch.setattr( - request_dispatcher, - "_validate_request", - MagicMock(return_value=True), - ) - if stage not in ["fetch_inputs"]: monkeypatch.setattr( integrated_worker,