Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up too verbose logs pt. 2 #2298

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ax/modelbridge/tests/test_model_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_fit(self, wrapped_extract_ssd: Mock) -> None:
# This should skip the model fit.
with mock.patch("ax.modelbridge.torch.logger") as mock_logger:
ms.fit(experiment=self.experiment, data=self.data)
mock_logger.info.assert_called_with(
mock_logger.debug.assert_called_with(
"The observations are identical to the last set of observations "
"used to fit the model. Skipping model fitting."
)
Expand Down
2 changes: 1 addition & 1 deletion ax/modelbridge/tests/test_torch_modelbridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_TorchModelBridge(
self.assertIsNone(model_fit_args["candidate_metadata"])
self.assertEqual(ma._last_observations, observations)

with mock.patch(f"{TorchModelBridge.__module__}.logger.info") as mock_logger:
with mock.patch(f"{TorchModelBridge.__module__}.logger.debug") as mock_logger:
ma._fit(
model=model,
search_space=search_space,
Expand Down
2 changes: 1 addition & 1 deletion ax/modelbridge/torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ def _fit(
**kwargs: Any,
) -> None:
if self.model is not None and observations == self._last_observations:
logger.info(
logger.debug(
"The observations are identical to the last set of observations "
"used to fit the model. Skipping model fitting."
)
Expand Down
Loading