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

No output from show_graph from 0.14.11 #5570

Closed
2 tasks done
braaannigan opened this issue Nov 21, 2022 · 2 comments · Fixed by #5624
Closed
2 tasks done

No output from show_graph from 0.14.11 #5570

braaannigan opened this issue Nov 21, 2022 · 2 comments · Fixed by #5624
Labels
bug Something isn't working python Related to Python Polars

Comments

@braaannigan
Copy link
Collaborator

Polars version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of Polars.

Issue description

In Jupyterlab I don't get any output from show_graph from version 0.14.11 onwards. Works fine with many versions before that.

Note: if I just output a LazyFrame (i.e. comment out show_graph in the example below) in version 0.14.11+ then I do get a graph with the unoptimised plan.

Reproducible example

pl.DataFrame(
    [{'VendorID': 'id1', 'pickup': '2022-01-01T00:04:14.000000'},
     {'VendorID': 'id2', 'pickup': '2022-01-01T00:32:17.000000'}]
).write_csv("sample.csv")
(
    pl.scan_csv("sample.csv",parse_dates = True)
    .filter(pl.col("VendorID") == 1)
    .show_graph()
)

Expected behavior

Expected to output a graph

Installed versions

---Version info---
Polars: 0.14.11
Index type: UInt32
Platform: Linux-5.10.104-linuxkit-x86_64-with-glibc2.28
Python: 3.10.1 (main, Dec 21 2021, 09:50:13) [GCC 8.3.0]
---Optional dependencies---
pyarrow: 10.0.0
pandas: 1.5.1
numpy: 1.23.4
fsspec: <not installed>
connectorx: 0.3.1
xlsx2csv: 0.8
@braaannigan braaannigan added bug Something isn't working python Related to Python Polars labels Nov 21, 2022
@braaannigan
Copy link
Collaborator Author

More info:
in version 0.14.10 we get:

df = pl.DataFrame(
    [{'VendorID': 'id1', 'pickup': '2022-01-01T00:04:14.000000'},
     {'VendorID': 'id2', 'pickup': '2022-01-01T00:32:17.000000'}]
).lazy()
optimized = True
df._ldf.to_dot(optimized)
'graph  polars_query {\n"TABLE\nπ */2;\nσ -\n[(0, 0)]"\n}'

but in version 0.14.11 we get:

df = pl.DataFrame(
    [{'VendorID': 'id1', 'pickup': '2022-01-01T00:04:14.000000'},
     {'VendorID': 'id2', 'pickup': '2022-01-01T00:32:17.000000'}]
).lazy()
optimized = True
df._ldf.to_dot(optimized)
'graph  polars_query {\n\n\n}'

So it seems like the issue is in to_dot.

I'll keep looking into it

@braaannigan
Copy link
Collaborator Author

There were a few changes to to_dot between 8th (0.14.10) and 13th (0.14.11) September to the Rust code:
https://github.com/pola-rs/polars/commits/2b81197d6b7c0c82640d125b48142604b890d717/polars/polars-lazy/src/dot.rs

This is probably as far as I can take this at this point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python Related to Python Polars
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant