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

R kernel slow/freeze then dies with large R object - using R alone works fine #15923

Open
kklot opened this issue Mar 5, 2024 · 7 comments
Open

Comments

@kklot
Copy link

kklot commented Mar 5, 2024

Description

Using R with large object (model output RDS file size ~600Mb). Loading in to R everything is fine, no lag, no freezing.

Screenshot 2024-03-05 at 22 20 23

Running the same code in ipynb, even running a simple str(x, 1) cause it to freeze. Happened in both mac OS M1 (16GB RAM) as well as AlmaLinux server with 128GB RAM.

Reproduce

I don't know if I should share my large object for this report.

Expected behavior

Same performance as in R's terminal.

@kklot kklot added the bug label Mar 5, 2024
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Mar 5, 2024
@krassowski
Copy link
Member

This is likely a problem with the specific R kernel that you are using, not JupyterLab. Do you use irkernel, xeus-r, juniper, or yet another R kernel?

@kklot
Copy link
Author

kklot commented Mar 6, 2024

I have only irkernel currently, thanks for pointing to others. Do you have a recommendation for one over the others regarding performance?

@krassowski
Copy link
Member

I would suggest trying out https://github.com/jupyter-xeus/xeus-r

@JasonWeill
Copy link
Contributor

@kklot Any update on the performance when using xeus-r?

@kklot
Copy link
Author

kklot commented Mar 12, 2024

Summarise: changing the kernel did not help, freezing after running a few cells similar to IRKernel.

Other problems came, bunches of installation issues as xeus-r is not in conda channels, then vscode xeus-r can not render figure (just showed plot without title) while jupyterlab can --> something not right between vscode and xeus-r.

I ended up download the files locally (which I was avoiding due to their large size), and worked on it with R in terminal, which run smoothly.

@JasonWeill
Copy link
Contributor

@kklot Thanks for the update! To help people reproduce and fix this, could you provide an example very large dataset, or code that would generate a synthetic example similar to the one with which you observed this bug?

@kklot
Copy link
Author

kklot commented Mar 24, 2024

Hi, I can't share the file, it is just a huge list of embeded list of matrices (R-INLA model output with full posterior, marginal distribution,...) of a ~2 million observation).

It seems that uncheck kernel completion helps so far, but now there is no autocomplete at all.

Screenshot 2024-03-24 at 11 01 06

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants