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

Add a _update_multi_column_transformer method #758

Merged
merged 6 commits into from
Feb 5, 2024

Conversation

R-Palazzo
Copy link
Contributor

CU-86az7g4wc
Resolve #757

@R-Palazzo R-Palazzo requested a review from a team as a code owner February 1, 2024 13:42
@sdv-team
Copy link
Contributor

sdv-team commented Feb 1, 2024

@R-Palazzo R-Palazzo removed the request for review from a team February 1, 2024 13:42
@R-Palazzo R-Palazzo changed the title Issue 757 update transformer multi column Add a _update_multi_column_transformer method Feb 1, 2024
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.

This looks good, mostly minor comments!

}

@pytest.mark.parametrize('method_name', methods_to_inputs.keys())
def test_unvalid_multi_column(self, method_name):
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: invalid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes thanks, done in e6083f7


@pytest.mark.parametrize('method_name', methods_to_inputs.keys())
def test_unvalid_multi_column(self, method_name):
"""Test that the Hypertransformer handles invalid multi column transformers."""
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can be more specific here and add a couple sentences after saying that this tests the case where the update/remove call leaves the transformer as invalid

Comment on lines 1911 to 1917
expected_dict_config['transformers'] = {
'A': UniformEncoder(),
'E': UniformEncoder(),
'C': UniformEncoder(),
'B': UniformEncoder(),
'D': UniformEncoder()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

you could parametrize this part as well. Basically instead of method_to_inputs being a dict, make it a list of tuples where each tuple has the structure (method_name, input, expected), and then just use those variables here accordingly

Copy link
Contributor Author

@R-Palazzo R-Palazzo Feb 2, 2024

Choose a reason for hiding this comment

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

That's a good point, thanks, done in e6083f7

@codecov-commenter
Copy link

codecov-commenter commented Feb 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (deb0f74) 100.00% compared to head (e6083f7) 100.00%.

❗ Current head e6083f7 differs from pull request most recent head e15e9d3. Consider uploading reports for the commit e15e9d3 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      #758   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines         2007      2030   +23     
=========================================
+ Hits          2007      2030   +23     

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

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.

:shipit:

@R-Palazzo R-Palazzo merged commit 4265b4d into main Feb 5, 2024
45 checks passed
@R-Palazzo R-Palazzo deleted the issue-757-update_transformer_multi_column branch February 5, 2024 12:46
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.

Add a _update_multi_column_transformer method
5 participants