I seem to have broken the code; the grader fails each time with the same error:
There was an error grading your submission. Details:
ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’
Even when I delete all my code for the function, it still gives exactly the same error, so it seems to be something more fundamentally broken. I also don’t seem to be able to revert the notebook to it’s original state because I saved/checkpointed it at some point with my changes and now it simply reverts to my latest checkpoint. What do I do?
There is a way to start from scratch, as described on this thread. The key point is that the “Get Latest Version” procedure will never over-write an existing file, so you need to either delete or (preferably) rename your existing notebook first.
You know Paul, like early on in DLS I ran into a similar issue and had to start allll the way from scratch (in part because I hadn’t really used Jupyter Notebooks that much). This was annoying.
But gaining a better sense now, doesn’t it save ‘checkpoints’? (like a ‘mini Github’). Is there no way in Colab to just go back to an earlier checkpoint rather than starting all over again ?
Yeah a quick Google search is not really turning up any immediate/useful way to do this either… But I ‘think’ it is what is happening under the hood, either via an auto/manual save… So just figured I’d inquire.
*If you turn out to be really lucky, maybe you can just do a ‘Ctrl-Z’ all the way
** Should specify, in my case I kind of just got frustrated with one cell, and by that much had lost too much of the original code. But everything before it worked. So I was not looking to start entirely from scratch.
If you just want to recover the original state of one cell, you can rename your notebook, get a clean copy and then just “copy/paste” over the contents of the one trashed cell from the clean copy. Then you have to rename your copy back to the “official” name. Unfortunately you need to do that full renaming dance because clicking “Submit” in a renamed copy submits the “official” notebook (the one opened by the “Launch Lab” button).
What I actually do is save a “clean” copy under a different name when I first open a given assignment for the first time, so that I can just click “File → Open” and look at the saved clean copy if I want to remember what the original looked like.
You were more prepared than I was-- I only learned how to fully download the entire package when it came near the end of the course and I was like ‘uh oh, I’m going to lose access’ – Though I realize they give a module in each course early on as to how to do this.
I save local copies as well of both the clean notebooks and my worked ones. But I meant to save the clean copy online. When you first open an assignment, you can click “File → Make a Copy” and then rename it with C1W4_Assignment_clean.ipynb or alternate name of your choice. Then go back to the original copy and start working. Then the clean version is available to examine whenever you need to.