Assignment crashes every time

Hi, I was working on Course 2 Week 2 assignment on optimizers. The assignment had a lot of models to run, and all the parameters are displayed and saved on my jupyter notebook while I was working on it. Right at the end, my assignment crashed before I could hit submit. Now every time I try to open it again, it loads for quite a while, until my laptop memory runs out, and crashes before everything can be loaded. I can’t open the assignment and I can’t submit it. How do I resolve this issue?

None of the actual execution of the notebook is taking place on your laptop, so I doubt that it’s a problem of limited local memory. The actual execution takes place on AWS in a Docker image. But your theory is probably right that the problem is that the memory image of your notebook is too large. Did you perhaps add some print statements that print in every iteration of the loop or the like?

You can try clicking the “Help” menu in the upper right corner of the screen as the notebook is loading and see if that will respond. If it does, try “Reboot Server” or “Get Latest Version” and see if that makes any difference. I’m not confident that it will help, since (e.g.) “Get Latest Version” will only replace files that have been renamed or deleted. The real solution would be to replace your notebook with a clean copy, but you have to rename it first.

If “Reboot Server” gets you control back, the first thing to do is “Kernel → Restart and Clear Output”. That will discard all the generated memory from running your version of the notebook.

Please let us know what happens when you try the above.

Hi, while working on the assignment, yes the output prints out every iteration for every model I ran. I’m sure I didn’t add any print statements in my code though, not sure what happened there.

I tried all the different methods, but it all resulted in the same thing. I can’t even use any of the kernel functions like restart and clear output once the assignment starts loading the contents. I guess the only thing I didn’t try is getting a clean copy. I tried duplicating and renaming, but that didn’t work out. Where and how do I get a clean copy of the assignment?

There is a topic about that on the FAQ Thread.

So for some reason, during the first time I ran the assignment, it loaded all the parameters into my output, but it’s working alright now as I just submitted it. Thanks for everything!