C1_W2_Linear_Regression: Week 2 practice lab - Code Assignment - Stuck at 41/100 score

I’ve completed both the exercises. But cannot move past 41/100 score.

I’ve ensured that I update only with the sections markeds as

### START CODE HERE ###

### END CODE HERE ###   

I did not touch any other section. I’ve run the code, 1 step at a time and every test should “passed” i.e. results as expected. I’ve also verified the code with Hints provided. Don’t see any issue. Yet, when I submit, I get only 41/100. Not sure what I’m doing wrong. Can anyone help please?

1 Like

Passing the tests in the notebook does not prove your code is perfect.
The grader uses different tests than those in the notebook.

The first thing to check is - does the code you added use any global variables, when you should be using a function parameter?

And, have you hard-coded any parameters, when you should be using a computed value?

Hi Tom,

Thanks for the quick response.

When I use the code in deeplearing.ai lab, it gets stuck at 41/100. But, when I used the exact same code in Coursera Lab, it worked. I am not sure what is the issue with deeplearing.ai lab, but given that I got 100/100 in Coursera Lab, I am pretty sure that the issue is not with my code.

Please check your personal messages for instructions.

Have you modified the notebook file name? That will confuse the grader.

I am also facing similar issue. I don’t see any issue with my code. @Rudraeon what was the fix recommended by @TMosh
This discussion helped me - Week 2 practice lab:linear regression graded assignment - Machine Learning Specialization / Supervised ML: Regression and Classification - DeepLearning.AI