C1_W4_Assignment - "UNQ_C11 takes forever to complete"

I am experiencing an issue with executing the cell UNQ_C11, apparently it takes forever to complete the execution of it and my browser gets a session timeout if I leave it running. Rest of the cells in this assignment ran successfully. If I submit the assignment without running this cell but all other cells, my assignment is not accepted for a passing grade.

Please advise.


1 Like

Just to parse the symptoms with slightly more detail, note that the grader does not need to see your generated output. It simply calls your functions with potentially different inputs than are used in the notebook and checks the answers. So you can do this:

  1. Kernel → Restart and Clear Output
  2. Save
  3. Submit

And you should get full marks if your code is correct.

So I believe the evidence suggests that your UNQ_C11 implementation is not correct. E.g. perhaps you have either an infinite loop or you’ve added debugging print statements that generate a lot of output and are causing your memory footprint to expand to the point where you hit a performance penalty from swapping or the like.

1 Like

Hi Paul,

Thanks for the quick response. I am going to follow the steps you suggested and resubmit it. Btw, when I downloaded the entire code directory for this assignment and ran locally, it completed successfully. Though the cell I mentioned took longer to execute, but it did complete successfully reporting the desired accuracy.

Update to follow soon.


1 Like

Interesting. Ok, that may indicate that you just got unlucky and the servers were slow at the point that you ran it online.

But the real piece of evidence we need next is what you see when you submit the notebook after the “Restart”. That will give you the real grader output.

Also note as a general matter that just passing one set of tests in the notebook does not prove your code is fully correct. There are lots of ways to “hard-code” assumptions that happen to match the single test cases in the notebook. Code that is not general will fail the grader if it uses different test cases.

1 Like

I resubmitted and the grader reported 0%. Not sure whats wrong with my code. Is there a way the code can be validated manually on your end? Just thinking about ways to isolate the issue without asking you to debug my code.

1 Like

We cannot see your code directly. Only the course staff has that “superpower”. But there are ways to share code privately using Direct Message threads. I will send you a DM about how to proceed with that if you don’t find the solution on your own power.