ENV variable to disable progress bar is not working
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
- [X] 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
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.
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: https://github.com/deepset-ai/haystack/blob/d93932150563ddb270e5c531df56c250ca706c97/haystack/components/embedders/hugging_face_api_document_embedder.py#L244-L246 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!
Ah, I see... I will label this as a feature request.