Eventual-Inc / Daft

Distributed DataFrame for Python designed for the cloud, powered by Rust
https://getdaft.io
Apache License 2.0
1.79k stars 108 forks source link

[BUG] Fix red line in Jupyter notebook #2267

Closed kevinzwang closed 2 weeks ago

kevinzwang commented 3 weeks ago

Finally figured out the issue! When using tqdm.auto, the library does correctly fall back to regular tqdm if the ipywidgets library is not present, but the thing is that tqdm by default actually writes to STDERR instead of STDOUT, which shows up in a notebook but no the command line.

This fix changes the default file from sys.stderr to sys.stdout for tqdm when we are in an IPython environment.

Resolves #2083

codecov[bot] commented 3 weeks ago

Codecov Report

Attention: Patch coverage is 50.00000% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 79.16%. Comparing base (984631c) to head (178c875). Report is 3 commits behind head on main.

:exclamation: Current head 178c875 differs from pull request most recent head 16410e4. Consider uploading reports for the commit 16410e4 to get more accurate results

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2267/graphs/tree.svg?width=650&height=150&src=pr&token=J430QVFE89&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc)](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2267?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc) ```diff @@ Coverage Diff @@ ## main #2267 +/- ## ========================================== - Coverage 79.17% 79.16% -0.02% ========================================== Files 459 459 Lines 53206 53216 +10 ========================================== + Hits 42128 42129 +1 - Misses 11078 11087 +9 ``` | [Files](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2267?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc) | Coverage Δ | | |---|---|---| | [daft/runners/progress\_bar.py](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2267?src=pr&el=tree&filepath=daft%2Frunners%2Fprogress_bar.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc#diff-ZGFmdC9ydW5uZXJzL3Byb2dyZXNzX2Jhci5weQ==) | `72.30% <50.00%> (-6.54%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/Eventual-Inc/Daft/pull/2267/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Eventual-Inc)
jaychia commented 3 weeks ago

A little nasty to test, but maybe a screenshot of the new behavior when the widgets stuff isn't installed will suffice?

kevinzwang commented 2 weeks ago

A little nasty to test, but maybe a screenshot of the new behavior when the widgets stuff isn't installed will suffice?

@jaychia

What it looks like before: image

What it looks like with changes: image