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

Logs from tqdm python progress bar #7671

Closed
hadim opened this issue Jan 27, 2022 · 3 comments
Closed

Logs from tqdm python progress bar #7671

hadim opened this issue Jan 27, 2022 · 3 comments
Labels
area/executor solution/workaround There's a workaround, might not be great, but exists type/support User support issue - likely not a bug

Comments

@hadim
Copy link

hadim commented Jan 27, 2022

Summary

What happened/what you expected to happen?

Some of my workflows are displaying progress using the Python tqdm library. I have tried to play with various settings of the library without success.

The progress bar only displays itself at the end of the workload when it's at 100%. Which make it quite useless.

What version of Argo Workflows are you running? 3.1.10

Diagnostics

Workflow to reproduce:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: tqdm-test-
spec:
  entrypoint: entrypoint
  templates:
    - name: entrypoint
      script:
        image: python:3.8
        command: [bash]
        source: |

          pip install tqdm

          read -r -d '' PYTHON_CODE << EOM
          from tqdm import tqdm
          from time import sleep

          # the progress bar will only be displayed after 40s when it's at 100%
          for i in tqdm(range(20)):
              sleep(2)
          EOM

          python -c "$PYTHON_CODE"

Message from the maintainers:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

@terrytangyuan
Copy link
Member

terrytangyuan commented Jan 28, 2022

This is a common issue with progress bars with K8s logging. I am not sure if there's anything we can do here. As a workaround for your specific issue, you should be able to log the progress bar periodically in your Python code though.

@sarabala1979 sarabala1979 added solution/workaround There's a workaround, might not be great, but exists and removed triage labels Jan 28, 2022
@alexec alexec added area/sdks area/executor invalid and removed area/sdks solution/workaround There's a workaround, might not be great, but exists invalid labels Feb 4, 2022
@stale
Copy link

stale bot commented Mar 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the problem/stale This has not had a response in some time label Mar 2, 2022
@stale stale bot closed this as completed Apr 16, 2022
@hadim
Copy link
Author

hadim commented Apr 17, 2022

Indeed this is not an argo issue but more related to k8s itself with a potential workaround to be provided by tqdm.

I have opened a ticket about it on the tqdm repo: tqdm/tqdm#1319

@agilgur5 agilgur5 added type/support User support issue - likely not a bug solution/workaround There's a workaround, might not be great, but exists and removed type/bug problem/stale This has not had a response in some time labels Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/executor solution/workaround There's a workaround, might not be great, but exists type/support User support issue - likely not a bug
Projects
None yet
Development

No branches or pull requests

5 participants