-
Notifications
You must be signed in to change notification settings - Fork 709
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
Add validators #2305
Closed
samet-akcay
wants to merge
32
commits into
openvinotoolkit:feature/design-simplifications
from
samet-akcay:add-validators
Closed
Add validators #2305
samet-akcay
wants to merge
32
commits into
openvinotoolkit:feature/design-simplifications
from
samet-akcay:add-validators
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* use dataclass for model in- and outputs * split dataclass in image and video * use dataclass in torch inferencer * use dataclass in openvino inferencer * add post_processor class * remove default metrics from CLI * export post processing * add post processor to patchcore * use named tuple for inference outputs * validate and format inputs of PredictBatch * update torch inference * remove base inferencer inheritance * update openvino inference * fix visualization * PredictBatch -> Batch * post processor as callback * use callback methods to apply post processing * temporary fix for visualization * add DatasetItem class * fix pred_score shape and add __len__ * make batch iterable * add in place replace method * use dataset items in inference * dataset_items -> items * use namedtuple as torch model outputs * formatting * split dataclasses into input/output and image/video * merge input and output classes * use init_subclass for attribute checking * add descriptor class for validation * improve error handling * DataClassDescriptor -> FieldDescriptor * add is_optional method * add input validation for torch image and batch * use image and video dataclasses in library * add more validation * add validation * make postprocessor configurable from engine * fix post processing logic * fix data tests * remove detection task type * fix more tests * use separate normalization stats for image and pixel preds * add sensitivity parameters to one class pp * fix utils tests * fix utils tests * remove metric serialization test * remove normalization and thresholding args * set default post processor in base model * remove manual threshold test * fix remaining unit tests * add post_processor to CLI args * remove old post processing callbacks * remove comment * remove references to old normalization and thresholding callbacks * remove reshape in openvino inferencer * export lightning model directly * make collate accessible from dataset * fix tools integration tests * add update method to dataclasses * allow missing pred_score or anomaly_map in post processor * fix exportable centercrop conversion * fix model tests * test all models * fix efficient_ad * post processor as model arg * disable rkde tests * fix winclip export * add copyright notice * add validation for numpy anomaly map * fix getting started notebook * remove hardcoded path * update dataset notebooks * update model notebooks * fix logging notebooks * fix model notebook
* Reduce rich methods (openvinotoolkit#2283) remove rich Signed-off-by: Ashwin Vaidya <[email protected]> * Refactor BaseThreshold to Threshold (openvinotoolkit#2278) * Refactor BaseThreshold to Threshold * Add relative import and add tests Signed-off-by: Samet Akcay <[email protected]> * Revert threshold.py to base.py Signed-off-by: Samet Akcay <[email protected]> * Revert threshold imports Signed-off-by: Samet Akcay <[email protected]> * Update tests/unit/metrics/threshold/test_threshold.py Co-authored-by: Ashwin Vaidya <[email protected]> --------- Signed-off-by: Samet Akcay <[email protected]> Co-authored-by: Ashwin Vaidya <[email protected]> * Enable Ruff Rules: PLW1514 and PLR6201 (openvinotoolkit#2284) * pre-commit autoupdate Signed-off-by: Samet Akcay <[email protected]> * Enable preview feautures, and disable some of the updated features * Add missing copyrights Signed-off-by: Samet Akcay <[email protected]> * Ignore copyrights in notebooks * "PLW1514", # Add explicit encoding argument Signed-off-by: Samet Akcay <[email protected]> * "PLR6201", # Convert to set Signed-off-by: Samet Akcay <[email protected]> --------- Signed-off-by: Samet Akcay <[email protected]> --------- Signed-off-by: Ashwin Vaidya <[email protected]> Signed-off-by: Samet Akcay <[email protected]> Co-authored-by: Ashwin Vaidya <[email protected]> Co-authored-by: Ashwin Vaidya <[email protected]>
* Reduce rich methods (openvinotoolkit#2283) remove rich Signed-off-by: Ashwin Vaidya <[email protected]> * Refactor BaseThreshold to Threshold (openvinotoolkit#2278) * Refactor BaseThreshold to Threshold * Add relative import and add tests Signed-off-by: Samet Akcay <[email protected]> * Revert threshold.py to base.py Signed-off-by: Samet Akcay <[email protected]> * Revert threshold imports Signed-off-by: Samet Akcay <[email protected]> * Update tests/unit/metrics/threshold/test_threshold.py Co-authored-by: Ashwin Vaidya <[email protected]> --------- Signed-off-by: Samet Akcay <[email protected]> Co-authored-by: Ashwin Vaidya <[email protected]> * Enable Ruff Rules: PLW1514 and PLR6201 (openvinotoolkit#2284) * pre-commit autoupdate Signed-off-by: Samet Akcay <[email protected]> * Enable preview feautures, and disable some of the updated features * Add missing copyrights Signed-off-by: Samet Akcay <[email protected]> * Ignore copyrights in notebooks * "PLW1514", # Add explicit encoding argument Signed-off-by: Samet Akcay <[email protected]> * "PLR6201", # Convert to set Signed-off-by: Samet Akcay <[email protected]> --------- Signed-off-by: Samet Akcay <[email protected]> * Update docstring - FieldDescriptor * Add docstring to generic.py Signed-off-by: Samet Akcay <[email protected]> * Add docstring to numpy.py Signed-off-by: Samet Akcay <[email protected]> * Add docstring to torch.py Signed-off-by: Samet Akcay <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/generic.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Dick Ameln <[email protected]> * Update src/anomalib/dataclasses/torch.py Co-authored-by: Ashwin Vaidya <[email protected]> --------- Signed-off-by: Ashwin Vaidya <[email protected]> Signed-off-by: Samet Akcay <[email protected]> Co-authored-by: Ashwin Vaidya <[email protected]> Co-authored-by: Ashwin Vaidya <[email protected]> Co-authored-by: Dick Ameln <[email protected]>
* Move datamodules to datamodule sub-package * Move datamodules to datamodule sub-package * Split datamodules and datasets * Restructure dataclasses to data * Fix relative imports * Use absolute imports * Add datasets dir * Add relative imports for torch datasets * Update src/anomalib/data/datamodules/base/__init__.py Co-authored-by: Ashwin Vaidya <[email protected]> --------- Co-authored-by: Ashwin Vaidya <[email protected]>
samet-akcay
requested review from
ashwinvaidya17 and
djdameln
as code owners
September 12, 2024 14:37
djdameln
force-pushed
the
feature/design-simplifications
branch
from
September 12, 2024 15:17
897b23b
to
627be88
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
_validate
methods to publicvalidate
methodsanomalib.data
tree, restructure tests.Validator
as a mixin class for each dataclass to not implement the validate methods explicitly.✨ Changes
Select what type of change your PR is:
✅ Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.