Skip to content

Commit

Permalink
Silence some warnings in unit tests (#2628)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #2628

Silences warnings for non-log EI acqfs and deprecated model converter code.This will reduce the noise in test outputs.

Reviewed By: esantorella

Differential Revision: D66004225

fbshipit-source-id: 680057d027e83f78fb4a2a2cc853c96f340383c1
  • Loading branch information
saitcakmak authored and facebook-github-bot committed Nov 15, 2024
1 parent 260f957 commit 9c7521f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion botorch/utils/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@

import torch
from botorch.acquisition.objective import PosteriorTransform
from botorch.exceptions.warnings import BotorchTensorDimensionWarning, InputDataWarning
from botorch.exceptions.warnings import (
BotorchTensorDimensionWarning,
InputDataWarning,
NumericsWarning,
)
from botorch.models.model import FantasizeMixin, Model
from botorch.posteriors.gpytorch import GPyTorchPosterior
from botorch.posteriors.posterior import Posterior
Expand Down Expand Up @@ -68,6 +72,16 @@ def setUp(self, suppress_input_warnings: bool = True) -> None:
message=r"Data \(input features\) is not",
category=InputDataWarning,
)
warnings.filterwarnings(
"ignore",
message="has known numerical issues",
category=NumericsWarning,
)
warnings.filterwarnings(
"ignore",
message="Model converter code is deprecated",
category=DeprecationWarning,
)

def assertAllClose(
self,
Expand Down

0 comments on commit 9c7521f

Please sign in to comment.