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

Trouble exporting notebooks with otter-grader: Notebook is empty #4477

Closed
NSagan271 opened this issue Apr 13, 2023 · 8 comments
Closed

Trouble exporting notebooks with otter-grader: Notebook is empty #4477

NSagan271 opened this issue Apr 13, 2023 · 8 comments
Assignees
Labels

Comments

@NSagan271
Copy link

Bug description

Hi! Some EE 120 students are experiencing trouble exporting their notebooks with otter-grader; they're getting "AssertionError: Notebook lab4.ipynb is empty. Please save and checkpoint your notebook and rerun this cell" even after saving and checkpointing, restarting the page, restarting their server, etc.

Here's the lab in question, it's one of our more compute-heavy ones.

According to one student, it worked after "some combination of server restarts, kernel restarts, and refreshing the page."

It could be a problem on our end, or maybe the students are having network connectivity issues, but I'm bringing it up here in case it's something that you all can help with.

Environment & setup

  • Hub: EECS Hub
  • Language: Python

How to reproduce

  1. Go to https://eecs.datahub.berkeley.edu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2FEE120-Course-Staff%2Flab-fft-heart-rate-analysis&urlpath=tree%2Flab-fft-heart-rate-analysis%2Flab4.ipynb&branch=main
  2. Run the first two cells, save and checkpoint, and run the last cell.

It definitely doesn't happen all the time, so I'm not sure how easy it is to reproduce this behavior.

@balajialg
Copy link
Contributor

balajialg commented Apr 13, 2023

@NSagan271 Seems like issue was reported in Otter grader repo - ucbds-infra/otter-grader#444
@chrispyles Do you have any suggestions for handling this error now?

@NSagan271
Copy link
Author

@balajialg Could increased CPU resources help? If so, I can make a Github issue for that.

I'm asking because I haven't encountered this issue at all locally, but most/all of the students are having issues exporting their submissions.

@balajialg
Copy link
Contributor

balajialg commented Apr 17, 2023

Tagging @shaneknapp @ryanlovett if they have input on whether increasing CPU would have any effect. EECS hub has a CPU limit of 2 and a guarantee of 0.1. Should we increase the limit and/or guarantee further to test whether it reduces the save time of notebooks?

@NSagan271 Can you take a look at this code snippet used by Data 8 when a similar error happened to their students - #2107 (comment)

@NSagan271
Copy link
Author

NSagan271 commented Apr 17, 2023

BTW might be helpful: it seems to be happening because the lab involves processing a video file. The lab deadline has passed, but we had students do the following and it seemed to work:

  1. Download the .ipynb file.
  2. Go to datahub.berkeley.edu and make a new folder.
  3. Upload the lab4.ipynb to this new folder and open it. Run only the first two cells (otter-grader and imports).
  4. Add a cell with grader.export(force_save=True, run_tests=False). Run it.

Since the lab deadline has passed, no changes need to be made at the moment (as long as our next lab doesn't have the same issue).

@balajialg
Copy link
Contributor

@NSagan271 That's an interesting hack. Thanks for sharing it. I will add it to the FAQ documentation

I will close the issue for now but feel free to reopen if this issue persists during the next lab. Thanks!

@chrispyles
Copy link
Collaborator

@NSagan271 @balajialg it looks like the EECS hub is using Otter v3.1.4. Otter's force-save functionality was updated to be a bit more robust in ucbds-infra/otter-grader#476, which was included in v3.3.0. Is it possible to upgrade the version of Otter being used on this hub?

@balajialg
Copy link
Contributor

@chrispyles Thanks for the info! Yes - that should not be a problem. Is the version upgrade backward compatible or will that result in instructors rewriting their existing test cases?

@chrispyles
Copy link
Collaborator

I don’t think there are any breaking changes

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

No branches or pull requests

5 participants