I have finished all the modules for Advanced Learning Algorithms in the Machine Learning specialization. However, there is one practice lab in Week 1 module that is not being graded properly. There is an error where it cannot compile the code to grade the assignment.
I have tried using a new browser and clearing cache before submission.
The grader error is something pretty specific, so my guess is that this is not some weird system malfunction. More likely there is something legitimately incorrect in your code in that notebook. Well, either that or you have accidentally damaged the notebook e.g. by making one of the code cells “Markdown” or the like.
The first question is whether you’re sure that everything runs correctly when you run the notebook yourself, before you submit to the grader? What happens if you do:
Kernel -> Restart and Clear Output
Cell -> Run All
Then carefully page through and check that everything runs correctly and that you don’t see any errors or exceptions being thrown.
If it runs correctly when you run it, but still fails the grader, that most likely means that the nature of your error is more subtle: you’ve implemented the solution in a way that is not general. It passes one test, but fails a different test. Examples of how that can happen would be referencing global variables from within the body of your solution functions, instead of the parameters that are defined.
But before we dig into that theory, the first step is to try the “Run All” above and then let us know what happens.
Hi, I clicked Run All, but I received an error saying that model was not defined. I noticed that the cell defining the model was being run after the cell calling model.summary(), so I manually ran cell 141 first and then cell 140 to correct the order. After doing that, everything ran successfully and all of the tests passed in the notebook. However, when I submit the assignment, it still fails the grader. Do you have any suggestions on what I should check next? Thank you.
I think the problem is that you must have rearranged the order of the cells in the notebook. Maybe it was by accident, but that’s a big mistake. Here’s what those cells look like in a clean copy of the notebook:
How did that happen?
The best way to get things back to normal would be to do the “Restore Original Version” process documented on this thread. That’s the version for the Coursera Platform. The instructions are different if you are on the DeepLearning.AI platform: see this thread instead.
Or you can just try moving the “summary” cell to be after the cell that defines “model” again. Your choice. But if you’ve accidentally made one change like that, there may be others, so starting fresh might be the safer choice.
Actually I should make the disclaimer that I do not have access to MLS on the Coursera platform, so it’s possible that things are different over there. I do have access to MLS on the DLAI LP and that’s where I am running my experiments.
Hi! I followed your instructions to restore to original version and re-submitted and it passed.
Thank you!
That’s great news! Thanks for confirming.