Course 2 week 3 Assignment Haven't graded successfully

Assignment Doesn’t graded saying " * ### Learner Error: Grader timed out

Please try optimizing the efficiency of your solution and submit again. You can also visit the discussion forum to see if your peers have experienced and found resolutions for similar errors, or if course staff have provided prior guidance for these errors… If the error isn’t resolved in 24 hours, please reach out to Coursera through our Help Center."

Can someone know why this is happening My code looks okay i pass the code tests as well

1 Like

Hello @Viraj_Hemantha

Can you follow the below link of fallback runtime which tells you to follow some of the steps to solve the issue you are currently encountering.

Please make sure once you follow the steps, run the cells from beginning one by one and then re-submit.

Let me know if it resolved your issue.

Regards
DP

1 Like

Hello @Viraj_Hemantha,

According to your latest DM shared, your error is because of

Prepare train dataset by using preprocessing with map_fn, shuffling and batching
def prepare_dataset(train_examples, validation_examples, test_examples, num_examples, map_fn, batch_size):

START CODE HERE

train_ds = YOUR CODE IS INCORRECT PLACED

HOW TO RECTIFY THE CODE:
As in the instruction given above the grader cell mentions first to Shuffle the training data using .shuffle(buffer_size=) and set the buffer size to the number of examples
Then Group these into batches using .batch() and set the batch size given by the parameter.
HERE YOU HAVE PLACED THE ABOVE TWO INSTRUCTIONS IN REVERSE IN YOUR CODE.

Another mistake in your codes is your buffer_size is incorrect, if you read instruction above it mentions buffer_size being number of examples and not len of train examples.

Also when you wrote the codes I noticed it written as
train_ds=
(YOUR CODES STARTS FROM THE NEXT LINE, I SUPPOSE BY MISTAKE YOU HAVE PRESSED AN ENTER HERE). MAKE SURE YOU HAVE PLACED YOUR CODES CORRECTLY.

In case after correctly the above code still gives you an error, make sure you have not done any editing in other cells other than mentioned to write your codes.

If you are unsure, I would suggest you to save a copy of the assignment you did. Then re-do the assignment with a fresh copy by referring at your copy of the assignment you did, so you know where things might have gone wrong.

Also please follow community guidelines for the below

Let me know if you are still stuck.

Keep Learning!!!

Regards
DP

Thanks

1 Like

Is the issue resolved