Skip to content

Make outliers transforms fail on new segments with understandable error #1139

Merged
merged 3 commits into from Mar 2, 2023

Conversation

Mr-Geekman
Copy link
Contributor

@Mr-Geekman Mr-Geekman commented Feb 28, 2023

Before submitting (must do checklist)

  • Did you read the contribution guide?
  • Did you update the docs? We use Numpy format for all the methods and classes.
  • Did you write any new necessary tests?
  • Did you update the CHANGELOG?

Proposed Changes

Add validation of new segments like in SklearnTransform.

Closing issues

Closes #1112.

@Mr-Geekman Mr-Geekman self-assigned this Feb 28, 2023
@github-actions
Copy link

github-actions bot commented Feb 28, 2023

@github-actions github-actions bot temporarily deployed to pull request February 28, 2023 14:10 Inactive
@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2023

Codecov Report

❗ No coverage uploaded for pull request base (inference-v2.1@0b0a96e). Click here to learn what that means.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@                Coverage Diff                @@
##             inference-v2.1    #1139   +/-   ##
=================================================
  Coverage                  ?   87.01%           
=================================================
  Files                     ?      164           
  Lines                     ?     8986           
  Branches                  ?        0           
=================================================
  Hits                      ?     7819           
  Misses                    ?     1167           
  Partials                  ?        0           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@@ -155,6 +155,46 @@ def test_inverse_transform_raise_error_if_not_fitted(transform, outliers_solid_t
_ = transform.inverse_transform(df=outliers_solid_tsds.df)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Don't we need to add test for _validate_segments ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What kind of test do you expect here? I don't think that testing this private method is necessary. But I test that it works when expected in test_transform_new_segments_fail and test_inverse_transform_new_segments_fail.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants