Unexpected error in grading

In week 1 I have completed the assignment with 7 of the 8 exercises passed. The grading process seems to fail.



Here you can see that the test case for exercise one passed but the grading says it is 0/10.

I still have not found a solution to this problem. Can someone please help?

still no solution has been found for this problem

Hi, Angel.

I am not a mentor for NLP and have not even taken that course, so I can’t help with the actual details of the assignment, but that generic “Grader feedback not found” error from the grader sounds like a structural problem with your notebook. Are you sure you didn’t work on the notebook on Colab or some other platform and then re-upload it back to the course website? If that’s not the problem, then here are a couple of things to try:

The first thing to try is to remove all the generated output from the notebook and submitting again:

  1. Kernel → Restart and Clear Output
  2. Save
  3. Submit

The point is that the grader does not need the generated output in the notebook and it’s possible that it might create some syntax that interferes with the grader.

If it still fails after that, then you can also try getting a clean copy of the notebook (See this thread) and then very carefully “copy/paste” over just your completed code from the “YOUR CODE HERE” sections and then submit again without even running the notebook.

If neither of those things help, please let us know and then we need real help from one of the NLP Mentors.

Hello Paulin.
I have not downloaded the notebook and then reupload it. I just try restarting it and clear the output, saved it and submit it again, but it still gives errors. I also tried the other method you mentioned and it still spits out an error. Perhaps I do need help from the NLP mentors. I have submitted a help request on coursera but have not received any response yet.

This is a course related matter, so Coursera will not be able to help. Let me contact some of the NLP mentors and see if they can help.

1 Like

Any news Paulin? I am worried that I won’t be able to complete the certification because of this little problem

Hi, Angel.

Sorry, I messaged the one NLP mentor that I could think of off the top of my head, but it looks like they are offline for the last few days. I found another person and just messaged them.

Regards,
Paul

Hey @Angel_Ortiz,
Your notebook gives a compilation error, and that’s why the grader is unable to grade your notebook. To be precise, your implementation of train_model is incorrect, and it produces the following error stack:

---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
~/work/w1_unittest.py in test_train_model(target)
    893     try:
--> 894         assert test_func(output_loop) == [
    895             "WeightedCategoryCrossEntropy",

~/work/w1_unittest.py in <lambda>(x)
    890     # Test the metrics in the evaluation task
--> 891     test_func = lambda x: list(map(str, x._eval_tasks[0]._metric_names))
    892 

IndexError: list index out of range

During handling of the above exception, another exception occurred:

IndexError                                Traceback (most recent call last)
<ipython-input-47-7c2f23c889cd> in <module>
      6     pass
      7 
----> 8 w1_unittest.test_train_model(train_model(classifier(), train_task, [eval_task], 10, './model_test/'))

~/work/w1_unittest.py in test_train_model(target)
    905                     "WeightedCategoryAccuracy",
    906                 ],
--> 907                 "got": test_func(output_loop),
    908             }
    909         )

~/work/w1_unittest.py in <lambda>(x)
    889 
    890     # Test the metrics in the evaluation task
--> 891     test_func = lambda x: list(map(str, x._eval_tasks[0]._metric_names))
    892 
    893     try:

IndexError: list index out of range

Hint: Try to find which of the arguments passed into the function train_model haven’t been used yet by your code or by the existing code.

Cheers,
Elemento

I have passed all the tests now. Still the error in grading occurs.

{Moderator’s Edit: Solution Code Removed}

Hey @Angel_Ortiz,
Can you please post a SS of the errors produced by the grader while grading your assignment?

P.S. - Posting solution code publicly is strictly against the community guidelines. Instead, you are always recommended to post the error stack. If a mentor requires to see your solution code, (s)he will ask you to DM it.

Cheers,
Elemento

Hello Vinesh,

Here is a photo of the error that appears in the grader:

PS.
I thought this email thread was only between you and me. That is the only reason I posted my code. I apologize if I misunderstood something.

Hey @Angel_Ortiz,
No need for apologies. It happens with me as well, at times.

Anyways, I checked your notebook that you sent to me, and you have changed some things that you were not supposed to change. The grader becomes unhappy when learners change something that they are not intended to.

For starters, in your implementation of train_model, you have deleted the code defining the seed for the training part. Since it is not feasible for me to check the entire notebook word by word, I would recommend you to get a fresh copy of your notebook, and paste your solutions very carefully in it, inside the comments “START CODE HERE” and “END CODE HERE”. Do not change anything outside these comments. You can find the instructions for the same here.

Once you have submitted the notebook, and received a complete score, feel free to play with the notebook.

Let us know if this helps. If it doesn’t, we will bring a staff member in the loop.

Cheers,
Elemento

2 Likes

i have the same problem and i don’t know what should i do exactly

I’m experiencing a similar situation. The final exercise isn’t receiving a grade.

@Mansoury
@Ivan_Figueiredo
What feedback do you get from the grader? Please post a screen capture image.

I’m not a mentor for this course, but maybe the feedback will provide some clues.

I tried this technique and it worked for me, here is the guide