Week 2 autograder submission issue

Hi!
When submitting my W2 assignment I receive score 0/100 even though all my tests work, so that shouldn’t be the issue.

However the last cat plot fails for some reason, so that may be the reason:

Here is my Lab ID: rytnwsusaodc

Grader output:

[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] Timeout waiting for execute reply (30s).
[ValidateApp | ERROR] Interrupting kernel
[ValidateApp | ERROR] Timeout waiting for execute reply (30s).
[ValidateApp | ERROR] Interrupting kernel
[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*
    
  • _queue.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*
    
  •    self._check_alive()*
    
  •  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*
    
  •    validator.validate_and_print(filename)*
    
  •  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()*
    
  • nbgrader.preprocessors.execute.UnresponsiveKernelError*

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

Passing the tests in the notebook does not prove your code is perfect. The grader uses different tests.

Initial questions:

  • It’s important to fix that “cannot reshape array…” error in the last cell of the notebook, before you submit it for grading. That error is telling you there is a problem with your model.

  • Did you re-define the num_px variable anywhere in the code?

  • Did you modify the value assigned to test_set_x?

  • Is your code that sets the test_set_x_flatten variable correct?

Also:

  • Did you add any cells to the notebook?
  • Did you delete any cells from the notebook?
  • Did you rename the notebook?
  • Did you add any print() statements to the notebook which might be displaying a lot of information for debugging?
1 Like

Right, I see that I messed up that variable definition. Thanks for the quick help!

1 Like