Point wrongly deducted for C1_W3 assignment

Hi,

I just passed the week 1 course 3 assignment, and the automatic grader took a point off because it was expecting the use of a specific function in the first cell, when everything else was correct:

Function "np.moveaxis" not found in Code Cell UNQ_C1.
Code Cell UNQ_C1: Function 'get_sub_volume' is correct.
Code Cell UNQ_C2: Function 'standardize' is correct.
Code Cell UNQ_C3: Function 'single_class_dice_coefficient' is correct.
Code Cell UNQ_C4: Function 'dice_coefficient' is correct.
Code Cell UNQ_C5: Function 'soft_dice_loss' is correct.
Code Cell UNQ_C6: Function 'compute_class_sens_spec' 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.

I used np.transpose to shuffle the dimensions, which is the exact same as the expected np.moveaxis:

>>> a = np.ones((1, 2, 3))
>>> np.transpose(a, (1, 0, 2)).shape
(2, 1, 3)

All the notebook’s test cells output an All tests passed, including the one following UNQ_C1:

### test cell ex1 - do not modify this test cell    
get_sub_volume_test(get_sub_volume)

The validation script should be changed and not look for a specific function to be used, but rather focus on shape and output.

Hi @BrainyMonkey,

Can you direct message me the version of the notebook you submitted which prompted this output from the grader ? I’ll see what I can do about updating the grader

And kindly use np.moveaxis afterwards for Ex 1 to get the points for it as well.

Best,
Mubsi

At least when I took the class a couple of years ago, the AI4M grader was a little unusual compared to other DeepLearning courses in that it uses a ‘whitelist’ approach. You’re correct that there is always more than one way to produce a result in Python, but these graders sometimes have one particular solution in mind. Given that this grader has been this way for years, you’re probably going to have a happier experience and reduce your $ubscription cost by doing it they/their/them’s way. (At least the grader feedback tells you what it wants.)

Oh sure, plus I didn’t realize that you could submit more than once and that it would update the grade, so in the end for me it works out :slight_smile:

But still, on principle whitelisting is not a good approach, especially like here if there is no advantage of one function over another (computing ressources), or constraints later in the pipe.