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

Rename SKLearnPredictor to Predictor #524

Merged
merged 5 commits into from
Jan 6, 2020

Conversation

JovanVeljanoski
Copy link
Member

@JovanVeljanoski JovanVeljanoski commented Dec 24, 2019

This PR renames vaex.ml.sklearn.SKLearnPredictor to vaex.ml.sklearn.Predictor

  • "new" class vaex.ml.sklearn.Predictor. Implementation is identical, only the class name is changed.
  • Issue a deprecation warning in the vaex.ml.sklearn.SKLearnPredictor class and update the docstring to mention that the class is being deprecated.
  • Update the unit-tests to use vaex.ml.sklearn.Predictor
  • Update the CHANGELOG

Copy link
Member

@maartenbreddels maartenbreddels left a comment

Choose a reason for hiding this comment

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

I agree with this plan.

2 6.6 2.9 4.6 1.3 1 1.44276
'''

warnings.warn(message='''This class is deprecated and it wil will be removed in vaex-ml 0.8.
Copy link
Member

Choose a reason for hiding this comment

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

If you put this at the classlevel, it will always be executed (at import time). Put this in the constructor, and remove all the docstrings, and pass arguments to super.

from vaex.ml.state import serialize_pickle


@vaex.serialize.register
@generate.register
class SKLearnPredictor(state.HasState):
class Predictor(state.HasState):
'''This class wraps any scikit-learn estimator (a.k.a predictor) making it a vaex pipeline object.

By wrapping any scikit-learn estimators with this class, it becoes a vaex
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
By wrapping any scikit-learn estimators with this class, it becoes a vaex
By wrapping any scikit-learn estimators with this class, it becomes a vaex

@maartenbreddels maartenbreddels merged commit 0425f8f into master Jan 6, 2020
@JovanVeljanoski JovanVeljanoski deleted the rename_sklearn_predictor branch January 10, 2020 01:16
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.

2 participants