Timeout waiting for execute reply (30s) - Programming Assignment: Deep Neural Network - Application

issue :

[ValidateApp | INFO] Validating ‘/home/jovyan/work/submitted/courseraLearner/W4A2/Deep Neural Network - Application.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
Success! Your notebook passes all the tests.

How solved this, because all scripts run fine in jupiter Coursera notebooks

Hello Noer Barrihadianto,

Welcome to the community.

Please try resubmitting the notebook again after saving your work first. If the problem persists then restart the kernel and re-run all the cells from the beginning through shift+enter key.

Hello Rashmi,
Thank you for being accepted into this Community DeepLearning.AI , Noted, I will learn,
I’ve run in a variety of ways

  1. kernel restart
  2. kernel restart & clear output
  3. Restart & Run All
  4. Run cells
  5. Run All

All scripts result test all passed, fixed in my submissions always failed, can be given effective steps

If submission is still failed then please try updating the notebook by getting the latest version through this link.

Note that once you update the lab, copy paste the codes carefully in the newly updated version of the notebook, then save your work and submit it again. Let us see if that works for you or not.

1 Like

I’ll try, is it okay to rename the file to be re-run again?

Yes, please. The link describes everything on how you need to proceed including the renaming.

I agree that those messages sound like something went wrong, but it turns out those messages are normal on this assignment and do not indicate any kind of problem. Notice that it says at the bottom that your notebook passed all the tests. Does the grader give you 100/100 and update your score?

Here’s a screenshot of a successful grading run on that assignment:

Notice that I got even more of the same timeout messages, but the score is 100/100 and it says “Passed - Yes”. Please compare that to what you see and let us know if it is any different.

Halo @paulinpaloalto
i have tried to run fine on Jupiter Notebook Coursera, however in the My submissions section the score is 0/100.

I attach the result, Thank you

I have tried it only successfully running on Jupiter Notebook Coursera but the result remains the same in the My Submissions score 0/100 section

Ok, we probably need to look at your notebook. We can’t see it directly, but I will send you a DM about how to proceed …

There is a bunch of very strange stuff in the hidden “metadata” parts of your notebook. It looks like some of the metadata that the grader depends on has been removed somehow. Have you been running it on some other platform like Colab? Or maybe on your local computer, instead of on the course website? Or using some external tools to edit the notebook? I don’t think it would be possible to make the changes I see using the course website.

My suggestion would be to do the “Get a Clean Copy” process that is documented on the DLS FAQ Thread and then carefully “copy/paste” over just your completed code from the “YOUR CODE HERE” segments and see if that helps.

There is also a bunch of added code and other changes you’ve made, e.g. the cells at the end where you import “pickle” and create some files. But I tried deleting those cells and it still fails the grader.

Please try the “get a clean copy” and let us know whether that helps or not.

You also deleted the import of public_tests and then deleted the cells that invoke two_layer_model_test and L_layer_model_test. Why did you do that? If a test fails, the solution is not to delete the test but to figure out why it fails, right?

I don’t understand that There are a lot of very strange things in the hidden “metadata” section a lot of very strange things in the “metadata” section are hidden in my notebook.
because the result in jupiter notebook Coursera runs fine and outputs output as instructed but my submissions score 0/100, to make sure I end up trying to run the process as follows :

  1. Download notebook files from Jupiter Notebook Coursera
  2. Running on Google Colabs and on Local Jupiter Notebooks
  3. After Point 2 goes well
  4. Upload the .ipynb file to Jupiter Notebook Coursera
  5. Run All Jupiter Notebook Coursera
  6. Point 5 Goes Well All Test Passed
  7. But in My Submissions the score is 0/100

If there is a required screenshoot of the success of the process I will send.

Hello @Noer_Barrihadianto,

I can see that you have done very careful checking along those steps, but if it is really that there is some metadata stuff being corrupted when it being saved on Colabs or your local environment, the quickest way to correct it is to start over with a fresh assignment notebook, and then copy your exercises’ solutions to the refreshed notebook and submit.

If you would like to try it, please follow these instructions which will ask you to rename your current notebook in one of the steps, before the system can get you a new notebook. Then you can copy your work to the new notebook.


Hallo @rmwkwok ,
That’s right because there is only 1 exam left, I have tried the same result for a few weeks, Thank you for the enlightenment,
I will try this method and delete all the .ipynb files, by following all the instructions you described, the result will be I will info here

OK, but please be reminded that you need to keep a copy of your work so that you can move the solutions to the refreshed notebook.

Thanks for the enlightenment,
I will try this method and delete all the .ipynb files, by following all the instructions you described, the result will be I will info here

The way you successfully run and found the .ipynb file 9 months ago, with the original file restored in the IN section there was an error when running
parameters, costs = two_layer_model(train_x, train_y, layers_dims = (n_x, n_h, n_y), num_iterations = 2, print_cost=False)

print("Cost after first iteration: " + str(costs[0]))


and I can’t change that IN section in Jupiter Notebook Coursera, and it should be if I can edit it in jupiter notebook Coursera in the IN section to something like this:
parameters, costs = two_layer_model(train_x, train_y, layers_dims = (n_x, n_h, n_y), num_iterations = 2500, print_cost=False)

Hello @Noer_Barrihadianto,

There are 2 points that I want to make:

  1. please don’t change any code outside of the assignment function. they are not supposed to be changed in order to have a successful submission. So, please keep them as is.

  2. After you are keeping them as is, and you run it again, and if you see any error message, please share a screenshot of the Error Traceback here. We need to know what the traceback says.


Okay, I will run according to the following instructions capture from Traceback

I think that is what corrupted your notebooks. Why is it necessary to run the notebooks anywhere besides the course website? You never answered the question about why you deleted the import command for public_tests and the test cases. If it is because that failed on Colab, that just means you did not bring over all the associated files with the assignment. There is a topic on the FAQ Thread about how to download all the files associated with the assignment. Just the notebook is not enough.

But I think what we see is that running on Colab and then uploading the notebook back to Coursera is mistake: it corrupts the metadata in the notebook that the grader depends on.