Notebook stopped working

Hi, I had submitted my notebook for grading; however i did not passed the grade. Now when i am try to open the notebook; it is not opening correctly.
Can anyone guide?
Note: Notebook opened is blank and image of failed notebook is attached.

That probably means you have added print statements that generate a lot of output and the memory footprint of your notebook has grown very large. What you need to do is launch it and then click “Kernel → Restart and Clear Output” to release the memory. But if you can’t start the notebook, that’s going to be a problem.

If you are still on the Regularization Assignment, there is a way to get back to a clean copy of the notebook. Fortunately all 3 of the C2W1 assignments are in the same Docker image. So launch one of the other ones (e.g. Initialization). Then click “File → Open” and then navigate up to the “release” folder above that assignment and then down into the one that is failing. Then do a “rename” to rename your notebook to a different name. Then try to launch the failing one again and you’ll get a 404 error. From there, follow the “get a clean copy” procedure from the FAQ Thread. That will get you a new fresh copy that you can then launch. Now the problem is how to copy over your completed work. If you can’t open the broken notebook, you could try downloading it from the file navigation menu (the renamed copy). Then if you can launch it locally, you might be able to “copy/paste” over the code. Or you could try uploading it to Colab and copy/pasting from there.

Thanks Paulin for the support! issue is resolved.

That’s good to hear. Just for our ability to better help people in the future, it would be useful to know which strategies worked for you and whether you were able to figure out what the underlying problem actually was. E.g. was it the memory footprint issue that I suggested as one possible cause? Or something more complicated …

Thanks for any info you can share with your fellow students!

Yes it was the memory footprint issue. The thing that really worked out for me was mentioning that the workbook might have stopped due to “PRINT STATEMENTS”. I remembered that i had added a lot of print statements to pick the bug. The rest of method (shared thread) to restore to original workbook was pretty self-explanatory. The main learning lesson in this case was below:

" Unnecessary print statements should be avoided in the notebooks especially in iteration cases. If there is a requirement to print to catch bugs or for other purposes, make sure that if you have used print statement at some step, you ensure to delete it. If print statement generate a lot of output it can lead to kernel stopping and workbook can halt; the result could be restoring workbook to original status which may result in work loss and extra effort.

Great! Thanks for sharing the results!