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

Reduced Output and Improved Progress Handling in CleanVision #257

Open
saskra opened this issue Feb 6, 2025 · 1 comment
Open

Reduced Output and Improved Progress Handling in CleanVision #257

saskra opened this issue Feb 6, 2025 · 1 comment

Comments

@saskra
Copy link

saskra commented Feb 6, 2025

Summary

Even with verbose=False, CleanVision still prints two progress bars and the line "Reading images from DIRECTORY". I would like to suppress these outputs. A possible solution would be to move the current directory path into the desc description of tqdm and set leave=False so that the progress bars disappear after completion.

Details

Problem Statement

imagelab = Imagelab(data_path=folder)
imagelab.find_issues(issue_types=issue_types, verbose=False)

CleanVision is part of an inner loop in a larger script that processes hundreds of subfolders. The current progress bars clutter the overall output, making it harder to track the main progress. I’d like to adjust the progress display so that it disappears after each iteration and reduces unnecessary outputs.

Benefits of the Proposed Solution

  • Less visual clutter from unnecessary progress bars
  • Improved clarity of overall progress in large workflows
  • Reducing redundant outputs despite verbose=False

Possible Implementation

  • Move the directory path to the desc description in tqdm
  • Set leave=False so that progress bars disappear after completion
  • Optionally suppress the "Reading images from DIRECTORY" message

Alternatives

  • Add an additional option in CleanVision to control progress display (e.g., progress_mode='minimal')
  • Allow passing a custom tqdm instance for more flexible progress bar configuration

Current Workarounds

At the moment, there is no direct way to suppress these outputs. I could try:

  • Redirecting sys.stdout
  • Globally modifying tqdm behavior

…but these would be hacks rather than proper solutions.

Request

Would it be possible to integrate such an adjustment into CleanVision?
Could there be a configuration option for fine-tuning progress handling?

Thanks in advance for considering this!

@jwmueller
Copy link
Member

Thank you for the suggestion. Might you be able to help open a first PR with your idea? That would accelerate getting this in.

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

No branches or pull requests

2 participants