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

Remove scikit learn #1854

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Remove scikit learn #1854

merged 2 commits into from
Jul 23, 2024

Conversation

ternaus
Copy link
Collaborator

@ternaus ternaus commented Jul 23, 2024

Fixes #1736

and

#1425

Summary by Sourcery

Replaced scikit-learn dependency with custom implementations of MinMaxScaler, StandardScaler, and PCA. Removed scikit-learn from the project dependencies and updated pre-commit hooks for ruff and mypy.

  • Enhancements:
    • Implemented custom MinMaxScaler, StandardScaler, and PCA classes to replace scikit-learn functionality.
  • Chores:
    • Removed scikit-learn from the list of dependencies in setup.py.
    • Updated pre-commit hooks for ruff and mypy to newer versions in .pre-commit-config.yaml.

Copy link
Contributor

sourcery-ai bot commented Jul 23, 2024

Reviewer's Guide by Sourcery

This pull request removes the dependency on scikit-learn by implementing custom versions of MinMaxScaler, StandardScaler, and PCA. Additionally, it updates the pre-commit configuration and the setup.py file to reflect the removal of scikit-learn.

File-Level Changes

Files Changes
albumentations/augmentations/domain_adaptation_functional.py Implemented custom MinMaxScaler, StandardScaler, and PCA classes to replace scikit-learn functionality.
.pre-commit-config.yaml
setup.py
Updated pre-commit hooks and removed scikit-learn from dependencies.

Tips
  • Trigger a new Sourcery review by commenting @sourcery-ai review on the pull request.
  • Continue your discussion with Sourcery by replying directly to review comments.
  • You can change your review settings at any time by accessing your dashboard:
    • Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
    • Change the review language;
  • You can always contact us if you have any questions or feedback.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @ternaus - I've reviewed your changes - here's some feedback:

Overall Comments:

  • Consider explaining the rationale for using cv2 for PCA calculations instead of a pure NumPy implementation, especially if OpenCV is not a dependency elsewhere in the project.
Here's what I looked at during the review
  • 🟡 General issues: 4 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟡 Documentation: 1 issue found

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.

@ternaus ternaus merged commit ccfccd7 into main Jul 23, 2024
17 checks passed
@ternaus ternaus deleted the remove_scikit_learn branch July 23, 2024 23:59
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.

[Tech debt] Remove scikit-learn as depencency
1 participant