Hadrien Mary
Hadrien Mary
@noinnion Any news ? Source code release would be awesome !
My setup is the same as yours except I have Python 3.8.10. I think I found the issue. I was testing within a Jupyter notebook while executing the snippet from...
Thanks for looking into it. This is very insightful. I don't see any clean ways to fix it for now. Passing it as an args will probably call a pickle...
> Though, it's very curious that this only happens with Jupyter. Maybe it's worth asking one of the developers. Yup, I feel like my prod scripts have the same issue...
Not yet but if you find something please let me know.
Yeah please merge this !
A naive proposal could be instead of: ```python def fp_write(s): fp.write(_unicode(s)) fp_flush() ``` replace with: ```python def fp_write(s): fp.write(_unicode(s)) fp_flush() if new_arg is True or kubernetes_auto_detected: getattr(sys.stderr, 'write', lambda x:...
For the record here is the original Kubernetes argo I have already opened: https://github.com/argoproj/argo-workflows/issues/7671 (but this is clearly not an argo issue).
Here is a POC monkey patch that works well: ```python import os import tqdm.std import tqdm.utils disp_len = tqdm.utils.disp_len _unicode = tqdm.utils._unicode def _should_printer_print_new_line(): in_kubernetes_env = os.environ.get("KUBERNETES_SERVICE_HOST") is not None...
In the same spirit as https://github.com/tqdm/tqdm/issues/1318 we could also add an env variable to enable globally that feature `TQDM_PRINTER_NEW_LINE=true`