My code dissapeared from assignment notebook

Sorry about that, but what happened is that DeepLearning.AI recently made a significant change to that assignment, which involved upgrading it to be able to use GPUs to make the training run faster. When they do normal minor fixes or improvements to an assignment, your work is preserved by having your notebook renamed. But when they do a major update like the GPU case, it involves generating a whole new Docker image and in that case you no longer have access to your previous work after the upgrade. The only way to defend yourself against this kind of update is to always save a copy of any notebook locally anytime you make a change to it. The way to do that is documented on the DLS FAQ Thread, but the “tl;dr” is just to do “File → Download as notebook (ipynb)” to save a local copy.

Just generally speaking, you always have to defend yourself. Do you have backups of your computer’s hard drive or the pictures on your phone? Computers and hard drives and even solid state drives can fail, right? Even fancy servers have hard drives that can fail. Does AWS backup every single user file? Maybe, but my guess is that would be way too expensive.