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

ENV variable to disable progress bar is not working #8782

Open
1 task done
ArcticXWolf opened this issue Jan 28, 2025 · 3 comments
Open
1 task done

ENV variable to disable progress bar is not working #8782

ArcticXWolf opened this issue Jan 28, 2025 · 3 comments
Labels
type:feature New feature or request

Comments

@ArcticXWolf
Copy link

Describe the bug
This might be a regression of #5207 . The env variable HAYSTACK_PROGRESS_BARS has no effect anymore. Progress bars are still visible.

Expected behavior
The env variable hides all progress bars.

To Reproduce
Create any pipeline and execute with the env variable. The progress bars are still shown.

FAQ Check

  • Have you had a look at our new FAQ page?
    Yes. But you removed the relevant question from haystack 1.0 to haystack 2.0.

System:

  • OS: WSL with Ubuntu 24.04
  • GPU/CPU: not relevant
  • Haystack version (commit or version number): 2.9.0
@anakin87
Copy link
Member

Hello!

The PR you are referring to is related to Haystack 1.x.

Haystack 2.x is a complete rewrite and we have not migrated this functionality.

I believe several advances have been made on tqdm in the meantime.
You should be able to control the behavior of progress bars using environment variables like TQDM_DISABLE, TQDM_MININTERVAL, ... which correspond to tqdm.tqdm parameters.

Let us know if this helps or you still encounter problems.

@ArcticXWolf
Copy link
Author

ArcticXWolf commented Jan 29, 2025

Sadly this does not work, because those ENVs only change the defaults of TQDM and you are forcefully overwriting those with your own variables, for example here:

for i in tqdm(
range(0, len(texts_to_embed), batch_size), disable=not self.progress_bar, desc="Calculating embeddings"
):

Sure, I can add the progress_bar parameter to every single node in my pipelines, but I would rather have a way to surpress output completely.

But thanks for your help!

@anakin87
Copy link
Member

Ah, I see...
I will label this as a feature request.

@anakin87 anakin87 added type:feature New feature or request and removed community-triage labels Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants