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

Raise all warnings in _catch_warnings #2765

Merged
merged 12 commits into from
Sep 13, 2021
Merged

Raise all warnings in _catch_warnings #2765

merged 12 commits into from
Sep 13, 2021

Conversation

eccabay
Copy link
Contributor

@eccabay eccabay commented Sep 10, 2021

Closes #2761

@codecov
Copy link

codecov bot commented Sep 10, 2021

Codecov Report

Merging #2765 (fa1e4ee) into main (9a5ca7a) will increase coverage by 0.1%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##            main   #2765     +/-   ##
=======================================
+ Coverage   99.8%   99.8%   +0.1%     
=======================================
  Files        301     301             
  Lines      27889   27904     +15     
=======================================
+ Hits       27826   27841     +15     
  Misses        63      63             
Impacted Files Coverage Δ
evalml/automl/automl_search.py 99.9% <100.0%> (+0.1%) ⬆️
evalml/tests/automl_tests/test_automl.py 99.7% <100.0%> (+0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9a5ca7a...fa1e4ee. Read the comment docs.

@eccabay eccabay marked this pull request as ready for review September 10, 2021 17:24
@eccabay eccabay requested a review from a team September 10, 2021 17:24
Copy link
Contributor

@jeremyliweishih jeremyliweishih left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me!

Copy link
Contributor

@bchen1116 bchen1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! I left a few nits and a few questions, plus a suggestion to improve and fix tests. Looks good otherwise!

docs/source/release_notes.rst Outdated Show resolved Hide resolved
evalml/automl/automl_search.py Outdated Show resolved Hide resolved
@@ -5102,6 +5102,25 @@ def test_pipeline_parameter_warnings_only_parameternotused(
assert str(warning) == "Big bad warning"


def test_pipeline_parameter_warnings_with_other_types():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there test coverage on if we get multiple warnings with the same message? ie coverage for

elif str(msg.message) not in raised_messages:
                warnings.warn(msg.message)
                raised_messages.append(str(msg.message))

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this test covers that! The TargetLeakage warning actually throws the same warning for each generated pipeline, just like the ParameterNotUsed warnings come up. This test is actually how I discovered we needed to filter duplicate warnings.

evalml/tests/automl_tests/test_automl.py Show resolved Hide resolved
evalml/tests/automl_tests/test_automl.py Show resolved Hide resolved
Copy link
Contributor

@bchen1116 bchen1116 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once all tests pass! Thanks for clarifying!

@eccabay eccabay merged commit b5d50b0 into main Sep 13, 2021
@eccabay eccabay deleted the 2761_raise_all_warnings branch September 13, 2021 19:20
@chukarsten chukarsten mentioned this pull request Sep 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

_catch_warnings suppresses non-ParameterNotUsed warnings
3 participants