I am unable to get a grade for the graded assignment for week 2 course 3 (C3_W2_Collaborative_RecSys_Assignment)
the grading is failing with this error :Comment line with index:
UNQ_C1 wasn’t found in code.
Any help to sort this out would be welcome.
Thanks in advance
That means you must have accidentally removed some of the comment lines that turn out to contain information that the grader uses. You can get a clean copy of the notebook to see what that cell should look like by using topic B.5 on the MLS FAQ Thread. Search for the string UNQ_C1 in the clean notebook to find the relevant graded code cell.
Just generally speaking, it should only be necessary to change things in the “YOUR CODE HERE” sections. It’s not illegal to change other things, but you need to exercise appropriate care.
Thank you for the reply .I tried to put the two lines of comment code back,I am still getting the error.
Are you sure you did a “Save” before you submitted to the grader? Not sure that matters in MLS, but it does in DLS C4 and C5. The other thing to realize is that if you renamed the notebook, then clicking “Submit” in a different copy still submits the “official” notebook, which is the one opened when you click “Work in Browser” regardless of what notebook you are running when you click “Submit”.
Thank you ,I appreciate the time you take to go through this with me,I did save but that did not help.please note I re-added the following :UNQ_C1 and
GRADED_FUNCTION: cofi_cost_func on top.Maybe I should do a full reset to bring it back to its initial state?kernel restart did not help, anything else I could try?
Welcome and we are glad that you could be a part of our community Just to make sure we are on the same page, your beginning of the code cell should be like follows:
# GRADED FUNCTION: cofi_cost_func
def cofi_cost_func(X, W, b, Y, R, lambda_):
Please copy and paste this, if it’s anything different, and make sure you don’t put in any extra spaces. If this doesn’t work, feel free to follow the instructions in this thread, to get a fresh copy of your notebook. I hope this helps.
I did both suggestion ,I am still getting this
Code Cell UNQ_C1 failed: cofi_cost_func test 1 failed If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps. This dependency may be the cause of the errors.
I think that’s a different message: before it was saying that the string UNQ_C1 was missing. Now what it is saying is that your
cofi_cost_func does not pass the grader test cases. Does it pass the tests in the notebook?
Yes,it seems it’s different now,I do see some validations issues,I will double check.
This is to confirm it passed all the validation now but I still cannot submit it, it gave the same error reported last time.Might I kindly request to get support to review and possibly manually submit it ?
Code Cell UNQ_C1 failed: cofi_cost_func test 1 failed
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.
That means there is still a bug in your code. If you pass the tests in the notebook, but fail the grader, that means your solution is not “general” enough. Either you’ve hard-coded some aspect of the code to match the particular test case in the notebook or perhaps you’re referencing global variables in the scope of your
cofi_cost_func. I’m not a mentor for MLS, so I am not familiar with this particular exercise. If you need more detailed help than just my general purposes hints about the nature of the problem, we’ll need to find one of the MLS mentors to help out here.
Thanks for the help , it was submitted successfully after more troubleshooting.
It’s great to hear that you found the solution by your own analysis. Thanks for confirming!