diff --git a/ax/modelbridge/base.py b/ax/modelbridge/base.py index 7eb50551e28..69084cff682 100644 --- a/ax/modelbridge/base.py +++ b/ax/modelbridge/base.py @@ -904,7 +904,7 @@ def cross_validate( # users with this warning, we filter it out. warnings.filterwarnings( "ignore", - message="Data is not standardized", + message=r"Data \(outcome observations\) not standardized", category=InputDataWarning, ) cv_predictions = self._cross_validate( diff --git a/ax/modelbridge/cross_validation.py b/ax/modelbridge/cross_validation.py index e853316a0ae..4293ba8203e 100644 --- a/ax/modelbridge/cross_validation.py +++ b/ax/modelbridge/cross_validation.py @@ -184,7 +184,7 @@ def cross_validate( # To avoid confusing users with this warning, we filter it out. warnings.filterwarnings( "ignore", - message="Data is not standardized", + message=r"Data \(outcome observations\) not standardized", category=InputDataWarning, ) cv_test_predictions = model._cross_validate( diff --git a/ax/modelbridge/tests/test_base_modelbridge.py b/ax/modelbridge/tests/test_base_modelbridge.py index 84eae4b30d9..f0a2ed499fd 100644 --- a/ax/modelbridge/tests/test_base_modelbridge.py +++ b/ax/modelbridge/tests/test_base_modelbridge.py @@ -225,7 +225,7 @@ def warn_and_return_mock_obs( nonlocal called called = True warnings.warn( - "Data is not standardized", + "Data (outcome observations) not standardized", InputDataWarning, stacklevel=2, )