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

movie.save just hangs after a while with a large amount of frames #1

Open
guidov opened this issue Mar 31, 2019 · 8 comments
Open

movie.save just hangs after a while with a large amount of frames #1

guidov opened this issue Mar 31, 2019 · 8 comments
Assignees

Comments

@guidov
Copy link

guidov commented Mar 31, 2019

Hi Julius, Thanks for sharing this nice little package btw!

My jupyterlab is running on a docker image on a cloud based service (I think through jupyterhub at the University)
I have about 500 x 1920x1080xdpi100 frames. When I use this command:

mov.save("/home/jovyan/work/movie_frames/")

After a while it just stops saving frames, but I when I try to interupt the kernel , the notebook just hangs and I have to restart the kernel to get control back.

I've found a work around where I import frame_save and do the output in batches i.e. this works:

for i in range(300,400):
frame_save(mov.preview(i), i, odir="/home/jovyan/work/movie_frames/", frame_name="frame_",dpi=100)

Anyway, just thought I would mention this , to see if anyone else encounters this in the future, or if its specific to my environment.
I can't diagnose any errors, but you might have a suggestion how to do this

I don't think its a memory or cpu issue as the docker image has 256GB of memory and 64 vCPUs, and the memory doesn't get used up.

@jbusecke
Copy link
Owner

jbusecke commented Apr 3, 2019

Thanks for raising the issue! That is indeed concerning.
It might have something to do with the figures not being closed properly. I will definitely check on that.

Could you paste your full code to work around the problem? That would be greatly appreciated.

@guidov
Copy link
Author

guidov commented Apr 3, 2019 via email

@guidov
Copy link
Author

guidov commented Apr 5, 2019

Hi,
The movie.save command seems to work ok on my desktop fine with many frames. I think the problem has to do with running the notebook in the cloud based docker image

@guidov guidov closed this as completed Apr 5, 2019
@jbusecke
Copy link
Owner

jbusecke commented Apr 5, 2019

Ok. Glad that things worked out.

@jbusecke
Copy link
Owner

jbusecke commented Jul 3, 2019

I have experienced a similar problem on the GFDL analysis machine. I am not sure what could cause this. But Ill reopen this for now.

@jbusecke jbusecke reopened this Jul 3, 2019
@dhruvbalwada
Copy link

I have been experiencing the same problem on the pangeo cloud. The kernel crashes after about 30 frames when using the 4-8GB server, and after about 60 frames when using the 8-16GB server. I assume that suggests that it is some sort of memory issue.

For now I have added an option to specify the starting frame number when calling save. This allows me to just restart where things crashed before. However, this is very annoying because I am right now trying to make a movie with over 350 frames, and it will take me over 10 manual restarts.

@dhruvbalwada
Copy link

dhruvbalwada commented Jul 25, 2020

Some more digging around makes me think that the problem is related to #imatplotlib/ipympl/issues/4 matplotlib/ipympl#4 . And might only be occurring when using jupyterlab. As a temporary fix, I ensure that the notebook I am using to make the figures does not call %matplotlib inline magic.

I tried plt.close('all') to close all the open figures, and that option did not work either. In the frame_save function, but even that did not help.

@jbusecke
Copy link
Owner

Thanks for reporting! This seems like a more substantial problem than I first thought. I currently don't have the bandwidth to investigate in detail, but will def turn my attention to this in the future.

@jbusecke jbusecke self-assigned this Jul 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants