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

Uploading of notebook and data does not work #5

Closed
Chiil opened this issue Oct 2, 2020 · 26 comments
Closed

Uploading of notebook and data does not work #5

Chiil opened this issue Oct 2, 2020 · 26 comments

Comments

@Chiil
Copy link

Chiil commented Oct 2, 2020

I am trying to upload one of my notebooks and the data to the pilot hub, but there seems to be no file transfer.

@choldgraf
Copy link
Member

@choldgraf
Copy link
Member

also you should have an upload button here:

image

@Chiil
Copy link
Author

Chiil commented Oct 2, 2020

I used the upload button, I see that the transfer has started but after that I do not see the bar filling as usual:

image

@choldgraf
Copy link
Member

Hmm weird, it just worked for me. Try an nbgitpuller link and we can debug this later?

@Chiil
Copy link
Author

Chiil commented Oct 2, 2020

The nbgitpuller works great. I have a notebook now, and the notebook can load or install the required packages. To test my full notebook, I need the upload function to work, because I cannot put our data files on GitHub.

@choldgraf
Copy link
Member

Makes sense. I guess you could try restarting your server and see if it works after doing so. Is the dataset particular large or anything?

@Chiil
Copy link
Author

Chiil commented Oct 2, 2020 via email

@choldgraf
Copy link
Member

That's bizarre, I will try to look into it though am on baby duty right now!

@choldgraf
Copy link
Member

choldgraf commented Oct 2, 2020

I just tried starting a server as your user and the upload worked fine as well...so I wonder if this could be some kind of oversees usage issue? Either way, perhaps we can find a time to debug together tomorrow morning, or perhaps @yuvipanda has ideas for what's up

another thing you could try is to use jupyterlab (just replace /tree with /lab in the URL). You should be able to upload folders/files there by dragging and dropping the files into the UI.

@Chiil
Copy link
Author

Chiil commented Oct 3, 2020

The lab gives me the same error.
image

There seems to be a file size limit (~ 1 MB) in the upload function that is not there for the nbgitpuller I have made a really tiny notebook and that one I can upload.

@choldgraf
Copy link
Member

ahh yeah I bet you're right that the file size is a bottleneck here. I just tried uploading a larger file and it didn't work as well 👍 . It sounds like a 413 error suggests this too: https://confluence.atlassian.com/jirakb/http-error-413-request-entity-too-large-failure-when-attaching-files-693900009.html#:~:text=A%20413%20error%20indicates%20that,willing%20or%20able%20to%20process.

Probably something configurable on the Jupyter server side.

In the meantime as a short-term solution to keep demo-ing, you could try to add a cell at the top of the notebook session that downloads this. e.g.:

!wget https://my-large-file

since persistent storage isn't turned on yet, you may wanna do something like this anyway to avoid having to manually upload each time.

@Chiil
Copy link
Author

Chiil commented Oct 4, 2020

This works. My notebook runs fine and ends up with 997 MB of memory usage :). Experience has been good. Missing packages install well without trouble. I have one notebook, which is currently running, that requires ffmpeg to create movies. Would it be possible to install that? I use this, based on matplotlib:

# Call the animator. Keyword blit=True means only re-draw the parts that have changed.
anim = animation.FuncAnimation(fig1, animate, init_func=init,
                               frames=h_prime_out.shape[0], interval=40, blit=True)

HTML(anim.to_html5_video())

@yuvipanda
Copy link
Member

The upload limit should be fixed now! I'm working on getting ffmpeg installed.

Excited to put this into production! \o/

@Chiil
Copy link
Author

Chiil commented Oct 5, 2020

It still does not work here? I am trying to upload a 3.6 MB notebook and 50 MB of data and the same thing as before happens.

@yuvipanda
Copy link
Member

@Chiil hmm, am investigating again now.

@yuvipanda
Copy link
Member

@Chiil try now?

@Chiil
Copy link
Author

Chiil commented Oct 5, 2020

Now it works! Great.

yuvipanda added a commit to 2i2c-org/infrastructure that referenced this issue Oct 5, 2020
@yuvipanda
Copy link
Member

Great! ffmpeg should also be there now.

@Chiil
Copy link
Author

Chiil commented Oct 5, 2020

It doesn't work, maybe the script cannot find the executable.

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-10-590854a5f902> in <module>
     13                                frames=h_prime_out.shape[0], interval=40, blit=True)
     14 
---> 15 HTML(anim.to_html5_video())

/opt/conda/lib/python3.8/site-packages/matplotlib/animation.py in to_html5_video(self, embed_limit)
   1314                 # We create a writer manually so that we can get the
   1315                 # appropriate size for the tag
-> 1316                 Writer = writers[mpl.rcParams['animation.writer']]
   1317                 writer = Writer(codec='h264',
   1318                                 bitrate=mpl.rcParams['animation.bitrate'],

/opt/conda/lib/python3.8/site-packages/matplotlib/animation.py in __getitem__(self, name)
    164         if self.is_available(name):
    165             return self._registered[name]
--> 166         raise RuntimeError(f"Requested MovieWriter ({name}) not available")
    167 
    168 

RuntimeError: Requested MovieWriter (ffmpeg) not available

@choldgraf
Copy link
Member

I wonder if you could try installing ffmpeg from conda until we get it installed on the base image:

conda install -c conda-forge ffmpeg

@yuvipanda
Copy link
Member

yuvipanda commented Oct 5, 2020

I think it should be present, you might have to try starting / stopping your server. I can see it in my server

image

@choldgraf
Copy link
Member

ah yes - stopping/starting made it work for me

@choldgraf
Copy link
Member

also @Chiil - persistent storage should now be enabled, so give it a whirl if you like!

@Chiil
Copy link
Author

Chiil commented Oct 5, 2020

It all works. My three notebooks that I tested all work out fine, and the data is persistent. Great 👍.

@choldgraf
Copy link
Member

@choldgraf
Copy link
Member

gonna close this one as I think it's finished 👍

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