Programming Assignment Grading Error

When creating a post, please add:

However, all the functions have all tests passed within the notebook. Please help.

hi @Xin_Liu1

did this grader output message come in general for a particular grade cell?

make sure before submitting always run down all the cells.

if you are confident of your codes being correct, first disconnect the kernel, then reconnect the kernel and run each cell from beginning till end one by one making sure you have passed all the test before submitting.

In case while you running any of the cell and kernel gets disconnected and reconnect itself, you are suppose to run the cells from beginning till end one by one.

Then try submitting again.
Let me know if issue persist, :crossed_fingers:t2::+1:t2:

Regards
DP

The grader output message come in general, for all grade cells.

I have run down all the cells before submitting.

Disconnect the kernel, reconnect, run from beginning to the end done, and all tests passed.

Saved the notebook before submitting.

Still getting grader output errors. :frowning:

Xin

I’ve also made multiple submissions and all returned 0 scores.

The grader output message come in general, for all grade cells.

I have run down all the cells before submitting.

Disconnect the kernel, reconnect, run from beginning to the end done, and all tests passed.

Saved the notebook before submitting.

Still getting grader output errors. :frowning:

Xin

Then it’s time to check your codes, please share the screenshot of codes by personal DM.

Do not post any codes here as it’s against community guidelines.

Regards
DP

Typically this sort of “passes all the notebook tests but get a grade of zero” means either:

  • your code doesn’t work correctly for the test cases the grader uses.
    …or…
  • your notebook has some error that makes the grader crash - such as use of global variables that the grader doesn’t provide.

I’ve sent screenshot of codes via personal DM. Are you able to see it? Thanks!

1 Like

hi @Xin_Liu1

There are code errors in your assignment. You have tried to use numpy function recall everywhere which you were not suppose to.

  1. while compute metric, you didn’t require to assign true and pred labels to the value you have used.

  2. You didn’t share naive forecast codes, so cannot confirm

  3. Your moving average forecast, where you forecast append, you have used np.mean which you did not require. use mean( ) to forecast.append code

Also the time-window_size: time is incorrect, it should be time:time+window_size

  1. you didn’t share diff_series codes

  2. for diff_moving_avg where you perform correct slicing, that is again incorrect, taking len of series_valid will not get you diff moving avg.
    it should be [SPLIT_TIME-365-WINDOW_SIZE:]

  3. You applied the same logic for calculating past series where you used len of series valid which is again incorrect, you are suppose to use SERIES.
    if your naive_forecast codes are correct (as I didn’t see the codes), apply the same logic as used in naive forecast, only value here would 365 and in naive forecast it is 1.

Also from next time, please create first topic, if a mentor wants to see your codes they will ask for it. Don’t send direct DM for different topics, rather create a new topic. You can always tag anyone using @ if you want any particular mentor to look at your codes.

Whenever I used to come across a grader failure for my assignment, I used to go back to videos and u graded labs, on how I can make changes to my codes to get successful submission, this is is just a suggestion on how I used to debug my codes.

Regards
DP

Hi Deepti,

Both naive forest code and diff_series code are shared in the screenshot in our private message, please take a look.

Also even though the compute metric function isn’t right, but the grader output for the train_test_split function also returns 0 score, is that normal?

Xin

@Xin_Liu1

Your naive forecast codes are correct, apply the same code for past series except the value here would be 365

diff series code i didn’t get.

your compute metrics was correct except you assigned the call arguments with pred and true labels, so remove those.

Thank you very much for reviewing!
I have a question about the compute metrics code, why can’t I call the arguments? tf.keras.losses.MSE  |  TensorFlow v2.16.1
because I checked the documentation, the function has two args y_true and y_pred.

Xin

I’ve pointed the diff series code in our private chat.

Thanks for reviewing Deepti! I’ve corrected my code and it passed. I will make sure to review the videos and graded labs to change my code first.

1 Like

cool. keep learning!!

your codes were good just that it got mixed up with arguments, confused between global and local variables and using incorrect recall function, which can happen with angone.

So just keep learning!!!

Regards
DP