datahub icon indicating copy to clipboard operation
datahub copied to clipboard

Otter-grader's export function fails if a warning is raised for code in a manually-graded section

Open NSagan271 opened this issue 1 year ago • 0 comments

Bug description

We have a lab where some plotting code in a manually-graded section raises a warning. When we then run grader.export(run_tests=True), the cell throws a RuntimeError and doesn't generate the submission .zip file.

The line that it's failing on is:

if results.stderr:
    raise RuntimeError(results.stderr)

which makes it seem like this is expected behavior. However, when I search online, I keep on seeing that otter-grader is supposed to ignore warnings.

Also, when I tried locally (running otter version 4.2.1), I didn't have this issue. So maybe it's an issue with the version that the EECS hub is using (and will be fixed by https://github.com/berkeley-dsep-infra/datahub/issues/4495, hopefully) but I'm not sure.

We suppressed the warning with warnings.filterwarnings("ignore", message="Badly conditioned filter coefficients") for now, but I'm putting this here so it's on your radar.

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-controls&urlpath=tree%2Flab-controls%2Flab5-controls.ipynb&branch=main
  2. Comment out warnings.filterwarnings("ignore", message="Badly conditioned filter coefficients")
  3. Ask me for the solutions on slack, and copy them over to the notebook. Run all cells.
  4. grader.export should fail.

NSagan271 avatar Apr 18 '23 21:04 NSagan271