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 AnomalyModule to AnomalibModule #2423

Conversation

samet-akcay
Copy link
Contributor

@samet-akcay samet-akcay commented Nov 18, 2024

Signed-off-by: Samet Akcay [email protected]

📝 Description

  • This PR renames the base AnomalyModule class to AnomalibModule to better align with the library's naming conventions. The original AnomalyModule class is kept as a deprecated alias that inherits from AnomalibModule to maintain backward compatibility.

  • 🛠️ Fixes 📋 [TASK] Implement Core v2 AnomalibModule #2365

Migration Guide

For users who are currently using AnomalyModule:

# Old usage
from anomalib.models.components import AnomalyModule
class MyModel(AnomalyModule):
...
# New usage
from anomalib.models.components import AnomalibModule
class MyModel(AnomalibModule):
...

The old AnomalyModule will continue to work but will raise a deprecation warning. Users are encouraged to migrate to AnomalibModule.

✨ Changes

Select what type of change your PR is:

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔨 Refactor (non-breaking change which refactors the code base)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔒 Security update

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📋 I have summarized my changes in the CHANGELOG and followed the guidelines for my type of change (skip for minor changes, documentation updates, and test enhancements).
  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).

For more information about code review checklists, see the Code Review Checklist.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@samet-akcay samet-akcay changed the base branch from main to feature/v2 November 18, 2024 13:57
@samet-akcay samet-akcay reopened this Nov 19, 2024
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

Attention: Patch coverage is 89.33333% with 8 lines in your changes missing coverage. Please review.

Please upload report for BASE (feature/v2@1471974). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/anomalib/callbacks/visualizer.py 0.00% 3 Missing ⚠️
.../anomalib/models/components/base/anomaly_module.py 66.66% 3 Missing ⚠️
src/anomalib/callbacks/tiler_configuration.py 50.00% 1 Missing ⚠️
src/anomalib/utils/visualization/metrics.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             feature/v2    #2423   +/-   ##
=============================================
  Coverage              ?   78.00%           
=============================================
  Files                 ?      307           
  Lines                 ?    13153           
  Branches              ?        0           
=============================================
  Hits                  ?    10260           
  Misses                ?     2893           
  Partials              ?        0           

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


🚨 Try these New Features:

raise ValueError(msg)


class AnomalyModule(AnomalibModule):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need this? Since v2 is a breaking change, maybe we can rename already

@samet-akcay samet-akcay merged commit c16f51e into openvinotoolkit:feature/v2 Nov 22, 2024
7 checks passed
@samet-akcay samet-akcay deleted the refactor/rename-anomaly-module-to-anomalib-module branch November 22, 2024 10:45
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.

📋 [TASK] Implement Core v2 AnomalibModule
2 participants