DLS/Course 4/Week 3/PA2 grader fails

Filename: ex-w3a2
0/100Score: 0 of 100
Grader output
Cell #3. Can’t compile the student’s code. Error: IndexError(‘list index out of range’)

How do I begin to debug this? Where is Cell #3. If it is simply the third cell in the project, that’s written by the instructors, so it should be correct. Once I know what cell is wrong, how do I know which line fails?

This all runs correctly interactively, Why is it different when grading?

Most likely this means that you have hard-coded something to match the tests in the notebook, but the non-general code fails when the grader uses a different test case. Count only the code cells and that should work. Or maybe count only the code cells that have a UNQ_ grader tag in them.

Oh, wait a minute, C4 W3 A2 is the U-net assignment, right? Have a look at this comment in the instructions before literally the third code cell:

After you are done exploring, revert back to N=2. Otherwise the autograder will throw alist index out of range error.

Hmmmmmm. Seems pretty “on point” don’t you think? “Saving time” by not reading the instructions carefully often ends up not being a net savings of time. :laughing:


Thank you very much. That fixed my problem. I clearly have a bit of a reading comprehension problem.

You’re definitely not the first person to have missed that comment in the instructions! Glad to hear that it wasn’t something trickier to find.