All four cells correct but grader failed me


Could you check this please. Thanks.


Hi @getjaidev,

Is this the same issue as before ? Or a different issue with the same assignment ?


Different problem with the same assignment. I solved the previous one with your pointer. Now all test cells pass but I get a grader fail.

Hi @getjaidev,

What is the error the grader is giving ? Share screenshot as well.



Function “df_train_unskewed.std” not found in Code Cell UNQ_C1.
Code Cell UNQ_C1: Function ‘make_standard_normal’ is correct.
Code Cell UNQ_C2: Function ‘lr_model’ is correct.
Code Cell UNQ_C3: Function ‘cindex’ is correct.
Code Cell UNQ_C4: Function ‘add_interactions’ is correct.
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 message is the key. It looks like this is an instance in which there may be more than correct way to write the code, but the grader requires that you use the stated function as part of your solution. That may not seem “fair” or reasonable, but we have to obey the grader if we want the points. :nerd_face:

Thanks @paulinpaloalto

So what do I do?

As in, where is that function defined and how do I use it. I am merely filling in the "None"s as best I can

“std()” is a method of the Pandas Dataframe class and I’m guessing that df_train_unskewed is a member of that class or a subclass of it. Mind you, I am not a student or mentor of AI4M, so I haven’t actually done that exercise. I’m just reasoning from the error message. Does the computation in question involving computing the standard deviation of some variable? If so, how did you implement that? It sounds like there is more than one way to do it and the point is that the grader is being persnickety about how you implement it.

Note that it also matters how the grader implements that type of check. If they are unsophisticated about it, they might just be doing a string search on the text of your function. So one thing to try would just be to add a comment like:

# here I could have used df_train_unskewed.std(), but I chose not to

No guarantee that would work, but it’s worth a try. :nerd_face:

Hi @getjaidev,

As Paul mentioned above, in this particular instance, the grader is being unreasonable and asking to implement it using a specific function. I have noted this, and will try to remove this restriction in the future as there are more than one way to correctly implement it.

I have left the expected implementation in your notebook. Try submitting now.



Probkem was solved using stdev from pandas rather than numpy.

Paul’s and you suggestion. Thanks!