Help: machine learning specialisation hard stuck at 98%

Machine Learning Specialization

Course 3/3: Unsupervised Learning, Recommenders, Reinforcement Learning

week 3 programming assignment/ reinforcement learning. it’s the final lab assignment. the course completion stands at 98% complete. in the final lab assignment there are 2 questions. the first question i have got it right. the second question i’m not getting any marks i have shared my answer for the second question in the attachment. i honestly don’t think that answer is worth 0% marks and that question is the reason that the course is stuck at 98%. let me know if anyone has had a similar issue or if someone could help out with the correct answer for the final lab test, final question, much appreciated.

exercise.2.py (1.5 KB)

Hello @Jai_peace,

Please open the lab > “Kernel” > “Restart & Run All”, then confirm that no error messages are shown in any cell’s output:

Then, click “File” > “Save and Checkpoint” , and confirm that the “Last checkpoint” was saved “a few seconds ago”.

image

After that, submit the assignment, and share here any error message by the grader under the exercises that don’t score all the marks.

These steps make sure the grader will receive all of your correct works. If any problem, we need the error messages for making suggestions.

Cheers,
Raymond

2 Likes

hi! @rmwkwok, I did try that. on my screen it shows All Tests Passed on multiple attempts. However the grader still shows the old error Code Cell UNQ_C1: The value of your variable ‘q_network’ is correct. Code Cell UNQ_C1: The value of your variable ‘target_q_network’ is correct. Code Cell UNQ_C1: The value of your variable ‘optimizer’ is correct. Code Cell UNQ_C2 failed: compute_loss 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.

Edit: I did save before submitting the assignment.

It appears to be a grader issue. As it shows all tests passed for me.

Kindly help me reach 100%

It seems there is an error in your code for the 2nd graded function. It does not pass the grader’s tests.

2 Likes

Hello @Jai_peace,

There are “public tests” and “grader tests”, and the “All tests passed” message only indicates that your work has passed the public tests.

I have just submitted the assignment and the grader gave me 100%, so I think the grader is not a problem.

The error message you shared (UNQ_C2 failed: compute_loss test 1 failed) refers to a test that attempts to calculate the loss value based on some given inputs using your implementation of the “compute_loss” function. Failing that test means that your work didn’t compute the correct value.

For the reasons above, we should focus on your notebook and not the grader. I have 2 suggestions for you:

  1. Check the hints underneath the exercise. This exercise should be relatively straightforward with the hints.
  2. Back up your work, get a fresh copy of the notebook and make required changes ONLY to the areas between the marks ### START CODE HERE ### and ### END CODE HERE ###. Any changes outside of these areas or changes that are not required can fail the grader. After this, save the notebook, run it and make sure it’s error-free, and then submit it.

For how to refresh your workspace, check this out.

Cheers,
Raymond

2 Likes

hi @rmwkwok thankyou so much :), I appreciate your response. I have cleared the course. it’s 100% now​:hatching_chick:

1 Like

Thanks, you were right : )

1 Like