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

🐞 Fix Rich Progress with Patchcore Training #2062

Conversation

ashwinvaidya17
Copy link
Collaborator

πŸ“ Description

  • Since coreset subsampling uses track from rich, it breaks when we use any other progress bar. This caches the LiveDisplay before using track in subsampling.

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

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
@@ -406,7 +406,7 @@ def _setup_transform(

def _setup_anomalib_callbacks(self) -> None:
"""Set up callbacks for the trainer."""
_callbacks: list[Callback] = []
_callbacks: list[Callback] = [RichProgressBar(), RichModelSummary()]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This change is not directly related to the bug but I am now using RichProgressBar in the trainer. I don't mind if we drop this as it is not necessary

@ashwinvaidya17
Copy link
Collaborator Author

@blaz-r I can't reproduce the error with Padim but maybe the fix in this PR might work for you.

@blaz-r
Copy link
Contributor

blaz-r commented May 15, 2024

I'll check it out now.

@blaz-r
Copy link
Contributor

blaz-r commented May 15, 2024

I tried to run it on ubuntu through wsl and on windows directly. While I didn't manage to get it working on ubuntu, It work on windows now. The only problem is with filename, that is not valid on windows. I left a comment with a suggestion on how it can be addressed on #2060 .

@ashwinvaidya17
Copy link
Collaborator Author

What's the error on ubuntu?

@blaz-r
Copy link
Contributor

blaz-r commented May 15, 2024

Same as before, I think it's a wsl, not an ubuntu problem but I'm not sure.

@ashwinvaidya17
Copy link
Collaborator Author

Alright in that case I'll merge it as is as I am using Ubuntu and I can't reproduce it. We can always revisit this in-case more people face this issue.

@blaz-r
Copy link
Contributor

blaz-r commented May 15, 2024

Okay

@ashwinvaidya17 ashwinvaidya17 merged commit 849de79 into openvinotoolkit:feature/pipelines May 15, 2024
5 of 7 checks passed
ashwinvaidya17 added a commit that referenced this pull request May 24, 2024
* πŸš€ Anomalib Pipelines  (#2005)

* Add initial design

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Refactor + add to CLI

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Support grid search on class path

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* redirect outputs

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* design v2

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* remove commented code

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* add dummy experiment

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* add config

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Refactor

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Add tests

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Apply suggestions from code review

Co-authored-by: Samet Akcay <samet.akcay@intel.com>

* address pr comments

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Apply suggestions from code review

Co-authored-by: Samet Akcay <samet.akcay@intel.com>

* refactor

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Simplify argparse

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* modify logger redirect

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* update docstrings

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

---------

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>

* 🐞 Fix Rich Progress with Patchcore Training (#2062)

Add safe track

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* [Pipelines] πŸ”¨ Intra-stage result passing (#2061)

* Add initial design

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Refactor + add to CLI

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Support grid search on class path

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* redirect outputs

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* design v2

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* remove commented code

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* add dummy experiment

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* add config

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Refactor

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Add tests

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Apply suggestions from code review

Co-authored-by: Samet Akcay <samet.akcay@intel.com>

* address pr comments

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Apply suggestions from code review

Co-authored-by: Samet Akcay <samet.akcay@intel.com>

* refactor

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Simplify argparse

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* modify logger redirect

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* update docstrings

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

* Add proposal

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>

---------

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>

* Update src/anomalib/pipelines/benchmark/job.py

---------

Signed-off-by: Ashwin Vaidya <ashwinnitinvaidya@gmail.com>
Co-authored-by: Samet Akcay <samet.akcay@intel.com>
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.

3 participants