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

Fix warning filters in TestCase, introduce AxParameterWarning #2389

Closed
wants to merge 2 commits into from

Conversation

saitcakmak
Copy link
Contributor

These filters were not filtering out warning as expected, due to some regex issues and unnecessary warnings.resetwarnings() within unit tests. warnings.catch_warnings resets the filters by default, so such calls were unnecessary.

Note: The BoTorch dtype warnings are produced both as InputDataWarning & UserWarning. This is only filtering for InputDataWarning. We can reduce the warnings further by updating it on BoTorch to use InputDataWarning.

Test Plan:
Ran some tests locally and checked what warnings are produced. pytest -ra ax/core now produces ~250 warnings, down from ~700. test_fully_bayesian now produces 68 warnings, down from 576.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Apr 22, 2024
@facebook-github-bot
Copy link
Contributor

@saitcakmak has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

saitcakmak added a commit to saitcakmak/botorch that referenced this pull request Apr 22, 2024
Summary:
This was previously using `UserWarning` since `BoTorchWarning` were being ignored when `settings.debug` was off. This has since been updated and `BoTorchWarning`s are not ignored by default. All other use cases for this warning already use `InputDataWarning`.

Related to facebook/Ax#2389

Differential Revision: D56443417
facebook-github-bot pushed a commit to pytorch/botorch that referenced this pull request Apr 23, 2024
Summary:
Pull Request resolved: #2304

This was previously using `UserWarning` since `BoTorchWarning` were being ignored when `settings.debug` was off. This has since been updated and `BoTorchWarning`s are not ignored by default. All other use cases for this warning already use `InputDataWarning`.

Related to facebook/Ax#2389

Reviewed By: Balandat

Differential Revision: D56443417

fbshipit-source-id: 4b3bc1fc9169734d4b708d0c6b214452fc044d72
@facebook-github-bot
Copy link
Contributor

@saitcakmak merged this pull request in 0ea8ef8.

@saitcakmak saitcakmak deleted the warnings branch August 22, 2024 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants