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

Gradescope does tests in a different order than in the jupyter notebook #793

Open
cindygr opened this issue Mar 30, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@cindygr
Copy link

cindygr commented Mar 30, 2024

Describe the bug
The jupyter notebook created for the students has the tests in-line (where you put them). However, when the jn is autograded on Gradescope, I think all of the student's code is run FIRST, then the tests are evaluated at the end. So if, for example you declare a variable t = 3 and check that t = 3 in the grader check, it works fine in both cases UNLESS somewhere later in the file you say t =4, in which case the student's JN will say "test passed" but Gradescope will say 3 does not equal 4.

I am 90% sure this is what's happening (since when I made sure there were no duplicate variable names it got fixed). I am also about 70% sure that this was a recent change in... something.... because it only showed up when I tried to update my class this term. Autograder/tests that worked fine last term (Jan - Mar) worked fine, but when I re-ran them to check them this term, they don't...

To Reproduce
Steps to reproduce the behavior:

  1. Create an otter-grader JN with the first question with a variable t = 3 in it
  2. Create a test in that first question that has t = 3 in it
  3. Somewhere after that test (in a second problem) set t = 4
  4. Run otter assign... etc to generate the student JN and Gradescope autograder .zip file
  5. Submit your "correct" JN
  6. It will fail because in the test t = 4

Expected behavior
The tests should be executed at the same location in the JN as they are in the student version

Versions
Python 3.11, Otter 5.1.1, Gradescope (??) as of March 25

Additional context
The submitted code on gradescope is now formatted differently than it was before - all the grader.check cells have disappeared from the student files. I don't know if the two are related...

@cindygr cindygr added the bug Something isn't working label Mar 30, 2024
@chrispyles
Copy link
Member

@cindygr I'm unable to reproduce this issue with the steps you provided. Can you provide some notebooks that produce this error? Feel free to DM me in slack (link in README) if you don't want to post them publicly.

@cindygr
Copy link
Author

cindygr commented Apr 11, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants