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 resetting warning filters after silencing RDT warning about refit #1619

Merged
merged 3 commits into from
Oct 5, 2023

Conversation

rwedge
Copy link
Contributor

@rwedge rwedge commented Oct 3, 2023

Resolve #1618

@rwedge rwedge requested a review from a team as a code owner October 3, 2023 23:07
@rwedge rwedge requested review from amontanez24 and removed request for a team October 3, 2023 23:07
@codecov-commenter
Copy link

codecov-commenter commented Oct 3, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (9ce7242) 97.13% compared to head (3d68316) 97.13%.
Report is 1 commits behind head on main.

❗ Current head 3d68316 differs from pull request most recent head e63e07c. Consider uploading reports for the commit e63e07c to get more accurate results

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1619   +/-   ##
=======================================
  Coverage   97.13%   97.13%           
=======================================
  Files          48       48           
  Lines        4192     4193    +1     
=======================================
+ Hits         4072     4073    +1     
  Misses        120      120           
Files Coverage Δ
sdv/data_processing/data_processor.py 97.60% <100.00%> (+<0.01%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rwedge rwedge requested a review from R-Palazzo October 3, 2023 23:17
self._hyper_transformer.update_transformers(column_name_to_transformer)
warnings.resetwarnings()
with warnings.catch_warnings():
msg = rdt.HyperTransformer._REFIT_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.

One drawback of pulling the warning message from RDT directly is that if RDT renames the _REFIT_MESSAGE attribute to some other name the code will break. If instead we harcoded msg and the warning message changed from the RDT side, this code would fail to silence the warning but the execution would not fail.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we just filter all warnings from the HyperTransformer? Seems like thats what we were doing before (actually more broad since it filtered all of RDT) and that way we don't have to worry about the message

Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

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

LGTM!

@rwedge rwedge requested a review from frances-h October 5, 2023 17:18
@rwedge rwedge merged commit 7f7044c into main Oct 5, 2023
@rwedge rwedge deleted the issue-1618-warning-filter-reset branch October 5, 2023 17:38
@rwedge rwedge removed the request for review from R-Palazzo October 5, 2023 17:38
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.

Bug: updating transformers in DataProcessor resets warning filters
4 participants