-
Notifications
You must be signed in to change notification settings - Fork 60
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
Can't select kernel in jupyter notebook in a way that is visible to autograder #706
Comments
@champoll you send the output of Also: do students need to run a kernel with the same name as the one you're using to write assignments (the |
I don't have the rights to install otter-grader (and its dependencies) into the default python3 kernel, so I use conda to prepare a kernel. So far I've always provided students with the same kernel I use to write assignments, by selecting that kernel in Jupyter Notebook using ipykernel and the dropdown menu. |
Just to add to this, if it's helpful, I can ask whether packages could be installed on my behalf into my server's default environment-- let me know |
@champoll can you trying installing my fork and let me know if this is fixed? |
@champoll forgot to mention: after you run otter assign with my fork, you'll need to edit the environment.yml file in the autograder zip file to replace |
Unfortunately it didn't work (even after editing environment.yml). The autograder timed out on gradescope and returned the error message below. In case this can't be fixed quickly, could you recommend a workaround? I can't test or deploy any assignments as long as it persists. Also, would it be possible to increase the version number or use another way to make sure that I can see if the autograder is running on the correct version?
|
Can you send me the autograder zip and a submission notebook so I can debug locally? feel free to send in slack if you don't want it posted publicly. For a workaround, try adding the line |
I'm running into this as well on otter 5.2.2 and 5.1.1. Trying |
@joelostblom are you seeing this error when running otter assign or on Gradesocpe/with otter grade/otter run? |
Hey @chrispyles It is when I am running |
@joelostblom can you send the output of |
It's odd, I'm using the sample env from https://otter-grader.readthedocs.io/en/latest/workflow/otter_generate/container_image.html#environment-yml with the sample notebook from https://github.com/ucbds-infra/otter-grader/tree/master/examples/env-validation. It was working a couple of days ago, so I'm thinking I might have modified something unintentionally. I have recreated the env several times, tried updating and rebooting the system. Maybe I will try a conda re-installation next... The output from
But again, if I open jupyterlab in the same environment, then it does see all the kernels.
|
I followed the steps here and it works again! 🎉 anaconda/nb_conda_kernels#112 (comment) Somehow it seems like either my |
Describe the bug
I don't know how to tell the autograder which kernel to use.
To Reproduce
My setup requires me to install otter-grader and the other packages I use into a conda environment, e.g. "aug14". This requires me to configure my .ipynb files by setting the kernel that corresponds to this environment. Since the same kernel needs to be used while running otter assign, autograding, and solving the assignment as a student, this needs to be done once centrally per assignment. I used to be able to do this in the Kernel dropdown menu of the Jupyter notebook graphical interface, by selecting "Change Kernel" and then selecting the name of the kernel, e.g. "Python [conda env:aug 14]", all of this before running otter assign.
This no longer works. Instead, an error is thrown "jupyter_client.kernelspec.NoSuchKernel: No such kernel named conda-env-aug14-py" when I try to run otter assign. A temporary workaround was to run
ipython kernel install --user --name=aug14
. This however just delays the error: Otter assign then compiles without problems but the autograder throws the same NoSuchKernel error.Expected behavior
otter assign should transmit correct information about which kernel to use to the autograder even when the kernel is set using the ipython kernel install command.
Versions
Python version: 3.10.12
Otter-Grader version: 5.1.1
Selected Jupyter core packages...
IPython : 8.14.0
ipykernel : 6.25.1
ipywidgets : 8.1.0
jupyter_client : 8.3.0
jupyter_core : 5.3.1
jupyter_server : 2.7.0
jupyterlab : 4.0.5
nbclient : 0.8.0
nbconvert : 7.7.3
nbformat : 5.9.2
notebook : 7.0.2
qtconsole : 5.4.3
traitlets : 5.9.0
Additional context
Error while running otter assign if one doesn't use the ipython kernel install workaround:
If one uses the ipython kernel install workaround, otter assign compiles without error but the autograder produces this error:
The text was updated successfully, but these errors were encountered: