-
Notifications
You must be signed in to change notification settings - Fork 68
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
variables not in the scope of grader #890
Comments
@evaneill can you please run otter assign with the |
Sure, here goes:
generates:
|
@evaneill I'm not able to reproduce this issue on my machine. Can you try to reproduce it in a fresh conda/virtual environment? If it persists, please send the notebook to reproduce. |
Hi all - I am running into the exact same problem (or rather, my students are). They are running in Python 3.13; earlier versions of python seem fine. It appears to entirely be a name scope problem (grader can't find any of the jn variables). I can send an example JN, but since the JN works just fine in anything but 3.13, and it works fine when submitted to Gradescope, I'm not sure that will help... |
I also seem to be dealing with similar issue with |
@timothylwarren That version works fine for us, but I do know there was also a change in Gradescope last spring (?) that wasn't missing variables but bad values - because the tests are now all run after the full notebook is executed, instead of in-line like they are when you run the JN yourself. So re-used variables names are a problem (the original value gets overwritten). |
@cindygr @timothylwarren can you share some notebooks that reproduce this error? Feel free to PM them to me on Slack (link in README). |
I’ve attached the JN before running otter assign, after, and the zip file that gets created by otter-assign. I was using
Python version: 3.11.7
Otter-Grader version: 6.0.4
Additional package versions:
dill: 0.3.7
fica: 0.4.1
IPython: 8.20.0
nbconvert: 7.10.0
nbformat: 5.9.2
to make the files.
I tried very hard to install Python 3.13 on my mac book air so I could see if I could replicate the error(s) the students were having (variables not found in the tests) but ipykernel fails to install with that version of python, so I can’t run the JN (installing with Brew, fwiw).
Backing off to 3.12 seems to fix the problem (although a few students had problem with 3.12.7). It just feels like accessing the local variables from the JN via the structure created by otter.Notebook has changed. Sorry, not much help ☹
From: Chris Pyles ***@***.***>
Date: Saturday, January 11, 2025 at 7:32 AM
To: ucbds-infra/otter-grader ***@***.***>
Cc: Grimm, Cindy ***@***.***>, Mention ***@***.***>
Subject: Re: [ucbds-infra/otter-grader] variables not in the scope of grader (Issue #890)
[This email originated from outside of OSU. Use caution with links and attachments.]
@cindygr<https://github.com/cindygr> @timothylwarren<https://github.com/timothylwarren> can you share some notebooks that reproduce this error? Feel free to PM them to me on Slack (link in README).
—
Reply to this email directly, view it on GitHub<#890 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ADDOR546JUS6B53CPQ2YWQL2KE2PXAVCNFSM6AAAAABTQWZEPWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOBVGMYDGOJUGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Sorry for the delay. I have removed the old environment, and started fresh. The tests during I'm attaching:
I'm unable to attach the notebook here in the issue thread - what is the easiest way to send it? |
Describe the bug
The variables referenced in my tests don't seem to be available to the grader, so the tests (both ran during
otter assign
and from the student notebook that is generated) always fail. I get aNameError: name 'var' is not defined. Did you mean: 'vars'?
for the reproduced example below from both tests.To Reproduce
otter assign example.ipynb dist
var
doesn't exist.jupyter notebook dist/student/example.ipynb
to open the student versionExpected behavior
The
otter assign
should result in all tests passing, and the resulting student notebook solution should be able to grade the single student question.Versions
python:
3.12.5
otter:
6.0.4
dill:
0.3.9
fica:
0.4.1
IPython:
8.30.0
nbconvert:
7.16.4
nbformat:
5.10.4
The text was updated successfully, but these errors were encountered: