Skip to content

Conversation

@djdameln
Copy link
Contributor

@djdameln djdameln commented Dec 4, 2024

📝 Description

  • This PR removes the task_type parameter from the library. In V2, we no longer explicitly need to set the task type. Instead, the task type is determined by the availability of the ground truth data and the choice of evaluation metrics.
  • The engine and model are now agnostic wrt the task type. The model just generates whatever type of predictions it was designed to generate, and adds them to the output batch. During evaluation, the predictions may or may not be used, depending on the choice of metrics.
  • The AnomalibDataset class still requires a notion of task_type to determine if it should include an empty mask in the dataset item for normal samples. Instead of passing an explicit task_type parameter to the class instance, we now infer the task type from the availability of ground truth masks on the file system, and store the inferred task type as metadata in the samples dataframe. A new task property was added to both AnomalibDatamodule and AnomalibDataset to easily retrieve the inferred task type when needed.

✨ 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.

@djdameln djdameln marked this pull request as draft December 4, 2024 19:40
@djdameln djdameln marked this pull request as ready for review December 4, 2024 19:46
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@codecov
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 78.26087% with 10 lines in your changes missing coverage. Please review.

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

Files with missing lines Patch % Lines
src/anomalib/data/datamodules/base/image.py 27.27% 8 Missing ⚠️
src/anomalib/data/datasets/base/image.py 85.71% 1 Missing ⚠️
...rc/anomalib/models/components/base/export_mixin.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             feature/v2    #2450   +/-   ##
=============================================
  Coverage              ?   78.16%           
=============================================
  Files                 ?      307           
  Lines                 ?    13076           
  Branches              ?        0           
=============================================
  Hits                  ?    10221           
  Misses                ?     2855           
  Partials              ?        0           

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

Copy link
Contributor

@samet-akcay samet-akcay left a comment

Choose a reason for hiding this comment

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

massive trimming, thanks!

@samet-akcay samet-akcay merged commit 00b01b1 into open-edge-platform:feature/v2 Dec 5, 2024
7 checks passed
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