Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

polars pyo3_runtime.PanicException makes notebook unresponsive #1711

Closed
ggggggggg opened this issue Jul 2, 2024 · 2 comments · Fixed by #1713
Closed

polars pyo3_runtime.PanicException makes notebook unresponsive #1711

ggggggggg opened this issue Jul 2, 2024 · 2 comments · Fixed by #1713
Assignees
Labels
bug Something isn't working

Comments

@ggggggggg
Copy link
Contributor

Describe the bug

I create a new notebook, and paste the following into the first cell, and execute the code. The notebook is now unresponsive. As in when I enter 4 in the next cell, and hit shift-enter no output appears showing the result 4.
In all other cases of exceptions, the notebook remains responsive, so I expect it to do so for this exception.
Also I ran the same code in an ipython REPL. I get the same exception, but the REPL remains responsive. This leads me to believe the bug lies within Marimo rather than polars.

Environment

{
"marimo": "0.6.25",
"OS": "Windows",
"OS Version": "10",
"Processor": "Intel64 Family 6 Model 85 Stepping 4, GenuineIntel",
"Python Version": "3.10.11",
"Binaries": {
"Browser": "126.0.6478.127",
"Node": "--"
},
"Requirements": {
"click": "8.1.7",
"importlib-resources": "missing",
"jedi": "0.19.0",
"markdown": "3.6",
"pymdown-extensions": "10.8.1",
"pygments": "2.16.1",
"tomlkit": "0.12.5",
"uvicorn": "0.30.1",
"starlette": "0.37.2",
"websockets": "12.0",
"typing-extensions": "4.7.1",
"black": "23.7.0"
}
}

Code to reproduce

import polars as pl
import numpy as np
d = pl.DataFrame({"a": [np.arange(5) + i for i in range(5)]})
res = d.select(
    pl.col("a").map_batches(
        lambda x: {"filt_value": np.dot(x, x), "filt_phase": 5.0},
        is_elementwise=True),
    )
@ggggggggg ggggggggg added the bug Something isn't working label Jul 2, 2024
@mscolnick
Copy link
Contributor

thanks for sharing this issue. this looks like a bug in marimo trying to stringify the variable for the variable explorerer

@akshayka
Copy link
Contributor

akshayka commented Jul 2, 2024

@ggggggggg just cut version 0.6.26, which contains a fix. Should be on PyPI momentarily.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants