-
Notifications
You must be signed in to change notification settings - Fork 206
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
nbgrader + ipywidgets causes timeouts #6137
Comments
Some magics also cause nbgrader to timeout:
One can install qiskit as follows: try:
import qiskit
except ImportError:
import sys
!{sys.executable} -m pip install --user qiskit[visualization]
print("Restart your kernel and try again") |
I wonder if I should add some sort of way to add metadata to the instructor notebook that has the impact: "do not include this cell in any way when grading?" That seems easy to implement. Doing something specific to ipywidgets or qiskit, etc., seems impossibly hard overall, since things like this will keep popping up. Alternatively, changing the instructor notebook slightly could -- at any point, even after assigning and collecting -- change how grading happens. And it would be easy to implement something to keep cells from being included in the grading process. Thoughts? |
Excepting a way to fix the underlying issues, the real problem for me is that there is no easy way as an instructor to figure out which cells might be problematic. Running Validate works fine, and it is only after collecting and grading assignments that the instructor finds out there is a problem. Is there some way for "Validate" to be run properly through the nbgrader machinery? (Maybe create a "Test Student" account for doing this... of course with a unique ID that does not send poor Mr. Student to Null Island). Some way of retroactively excluding or modifying cells would help though. |
That's a very good point. I should just fix the underlying issue. I wonder precisely how these things cause a hang. |
Is there a way to simulate how nbgrader is run? I don't have a very good idea what it does under the hood. |
I'll try to fix this bug this week. I'm very intrigued by why there is any hang at all -- it doesn't make sense, so I want to understand it. |
Good news -- I found what I think was the bug and fixed it in 5b0883f Basically some code (especially widgets) accessed the "_actions" field of some class, which isn't set when using nbgrader. The fix should be live within an hour, if all the building/testing works fine. The fix requires the project that will actually be running the code to be restarted if it is currently running. Of course, any project that starts after the fix is deployed is updated to have the fix. |
- if a notebook used a ipywidgets this would cause an error, which made the grading timeout. I fixed that.
In comments on #5276 it was reported that combining ipywidgets with nbgrader causes timeouts/hangs/resets. Fix this.
The text was updated successfully, but these errors were encountered: