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

Kernel restarting #35

Open
siljeci opened this issue Oct 17, 2019 · 18 comments
Open

Kernel restarting #35

siljeci opened this issue Oct 17, 2019 · 18 comments
Labels
notebook_example question Further information is requested

Comments

@siljeci
Copy link
Contributor

siljeci commented Oct 17, 2019

When I try to run a code by using JupyterHub I get the message:

"Kernel restarting:
The kernel for Untitled1.ipynb appears to have died. It will restart automatically."

It seems like this happens when I use large arrays. Is this a "normal" message, such that the only fix is to slice every dataset before using them?

@annefou
Copy link
Collaborator

annefou commented Oct 17, 2019

It depends how you manipulate your xarray and what kind of data processing you perform. We can increase resources but before can we look at what you do? Do you want to look at here now? Where are you?

@siljeci
Copy link
Contributor Author

siljeci commented Oct 17, 2019

It happens when I calculate weighted averages by using groupby().sum() on arrays which are large(!). We don't have to fix this tonight - I figured that the code works if I slice the datasets. So if I run into this problem again (and don't figure out what to do), I'll ask again!

@annefou
Copy link
Collaborator

annefou commented Oct 17, 2019

Yes. Slicing is the right approach and actually you can use dask cluster to run your computation in parallel.

@annefou annefou added the question Further information is requested label Oct 17, 2019
@daliagachc
Copy link
Contributor

Hi! i'll write an example notebook on using xarray with dask so we can circumvent this problem.
@annefou can you point me how to profile how much ram im using in the notebook?

@jrieksta
Copy link
Contributor

jrieksta commented Oct 18, 2019

Hei! Has this been fixed? I cannot plot any of my data as kernel crashes.

@annefou
Copy link
Collaborator

annefou commented Oct 18, 2019

Do you use dask cluster?

@jrieksta
Copy link
Contributor

jrieksta commented Oct 18, 2019

No! @daliagachc earlier in the comments mentioned he will make a notebook for that, can we find it somewhere?

@annefou
Copy link
Collaborator

annefou commented Oct 18, 2019

I put a very simple example at https://nordicesmhub.github.io/NEGI-Abisko-2019/training/CMIP6_dask.html
Will add some more on how to profile and optimize.

@daliagachc
Copy link
Contributor

Hi! @jrieksta here is another example
notebook
location

@sarambl
Copy link
Collaborator

sarambl commented Oct 19, 2019

Hey, @daliagachc! Maybe you can add the client thing here? https://nordicesmhub.github.io/NEGI-Abisko-2019/training/gridded_model_data_dask_rolling_mean.html
Might be misleading if people go here

@daliagachc
Copy link
Contributor

@sarambl agreed! how? :)

@sarambl
Copy link
Collaborator

sarambl commented Oct 19, 2019

Are you telling me I should do it, @daliagachc ?!
image

@daliagachc
Copy link
Contributor

lets see.... i forked, modified and pull requested.

@sarambl
Copy link
Collaborator

sarambl commented Oct 19, 2019

Ahhh, now I get the question! Yes, if you don't already have a fork (in which case u sync it )
https://nordicesmhub.github.io/NEGI-Abisko-2019/training/github/synchronise_github.html

@jrieksta
Copy link
Contributor

Is this error also related to dask? Worker exceeded 95% memory budget. Restarting
I have chunks 10 and kernel still sometimes dies, would a suggestion would be to decrease chunks?

@annefou
Copy link
Collaborator

annefou commented Oct 19, 2019

@jrieksta can you point to your notebook?

@daliagachc
Copy link
Contributor

Hi @jrieksta!
can you post the path to your notebook? (right click on the notebook in the file browser of jupyterhub and select 'copy shareable link')

@annefou
Copy link
Collaborator

annefou commented Oct 21, 2019

@siljeci got it work. my visio finishes in few minutes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notebook_example question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants