DLSC1 Week 2 programming assign. error

I have a problem lasting for several days for week 2. I cannot submit the progr. exercises for grading. Every single code snippet runs fine, all tests pass and when I submit it for grading it says every time that the grader ran out of memory.

Any suggestions? I triple checked the code and it runs just fine. Maybe not 100/100, but still a passing grade.



Filename: nbgrader-part

0/100Score: 0 of 100

Show grader output

We encountered the following warnings when grading this part:

  • The grader ran out of memory while grading your submission. Please try submitting an optimized solution. If you think your solution is correct, please visit the Discussion forum to see if your peers are experiencing similar errors. If the issue isn’t resolved in 24 hours, please reach out to Coursera through our Help Center

PS. I contacted support and they said they will come back in a day or two after checking any technical problem.
PS2. Maybe there is a problem from my side. Not 100% sure.

@andreitulburet check if there is any infinite loop in your code.

1 Like

Checking for infinite loops (as @nero says) or recursion (calling the function from inside the same function) is a good idea. But if you’re sure everything runs fine inside the notebook, that’s probably not the problem.

One other thing to try is doing “Kernel → Restart and Clear Output” first and then immediately click “Submit Assignment”. When you run the training it increases the memory footprint of your notebook and perhaps that causes issues for the grader.

If that doesn’t help, let us know.

1 Like


I did not work. I checked for infinite loops and there are none. Also, when I run every single snippet separately, it works.

Any suggestions?

_____________________error message
[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W2A2/Logistic_Regression_with_a_Neural_Network_mindset.ipynb’
[ValidateApp | INFO] Executing notebook with kernel: python3
[ValidateApp | ERROR] Kernel died while waiting for execute reply.
[ValidateApp | ERROR] Traceback (most recent call last):
File “/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py”, line 478, in _poll_for_reply
msg = self.kc.shell_channel.get_msg(timeout=timeout)
File “/opt/conda/lib/python3.7/site-packages/jupyter_client/blocking/channels.py”, line 57, in get_msg
raise Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/preprocessors/execute.py", line 41, in preprocess
    output = super(Execute, self).preprocess(nb, resources)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 405, in preprocess
    nb, resources = super(ExecutePreprocessor, self).preprocess(nb, resources)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/base.py", line 69, in preprocess
    nb.cells[index], resources = self.preprocess_cell(cell, resources, index)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 438, in preprocess_cell
    reply, outputs = self.run_cell(cell, cell_index, store_history)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 578, in run_cell
    exec_reply = self._poll_for_reply(parent_msg_id, cell, timeout)
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 483, in _poll_for_reply
  File "/opt/conda/lib/python3.7/site-packages/nbconvert/preprocessors/execute.py", line 510, in _check_alive
    raise DeadKernelError("Kernel died")
nbconvert.preprocessors.execute.DeadKernelError: Kernel died

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/apps/validateapp.py", line 72, in start
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/validator.py", line 340, in validate_and_print
    results = self.validate(filename)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/validator.py", line 311, in validate
    nb = self._preprocess(nb)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/validator.py", line 290, in _preprocess
    nb, resources = pp.preprocess(nb, resources)
  File "/opt/conda/lib/python3.7/site-packages/nbgrader/preprocessors/execute.py", line 44, in preprocess
    raise UnresponsiveKernelError()

[ValidateApp | ERROR] nbgrader encountered a fatal error while trying to validate ‘submitted/courseraLearner/W2A2/Logistic_Regression_with_a_Neural_Network_mindset.ipynb’

Hmmm, that looks like some kind of internal error with the grader. FWIW I just tried submitting my version of that notebook and it worked fine for me, so there is not some kind of “server side” problem in general. I’m wondering if maybe there is something damaged about your notebook. The other thing to try would be to get a fresh copy using the procedure on the FAQ Thread and then carefully “copy/paste” over just your completed work and then try again.