C4W3_Assignment Question-Answering

Assignement link

Hello can someone help me ?
I get this error when testing the answer-question function, what should i do to resolve the issue ?

and here’s the grader error message: There was an error grading your submission. Details:
in user code:

File "/grader/transformer_utils.py", line 547, in create_padding_mask  *
    seq = 1 - tf.cast(tf.math.equal(decoder_token_ids, 0), tf.float32)

TypeError: Failed to convert elements of <transformer_utils.Transformer object at 0x7faaaf643a90> to Tensor. Consider casting elements to a supported type. See https://www.tensorflow.org/api_docs/python/tf/dtypes for supported TF dtypes.

Hello @Burak_Bakkar

Did you pass the below test cell?
Test your implementation!
w3_unittest.test_tokenize_and_mask(tokenize_and_mask)

Mention the assignment name as the course was updated and now has only 3 weeks, seems like your issue is with week2 assignment and you have stated it as week 3

Also kindly make sure you have updated the lab before starting the assignment as these courses were recently updated.

Regards
DP

here’s the output for w3_unittest.test_tokenize_and_mask(tokenize_and_mask)

and here’s the output of w3_unittest.test_answer_question(answer_question)

i’m doing this assignement C4W3_Assignment so it’s week 3 for me. And yes the course contains only 3 weeks. Maybe all my issues are with the update. Can you please tell me how to update the lab ?

Your next word has incorrect codes but I also feel your issue related to idx, so please go back and check if all of test cells match with the expected output

This is the same error I am facing, if you found any solution let me know please.

Hello @Deepti_Prasad i have updated the course and then try but the error of the answer_question remain same.

You are getting the same error?

Yes i am getting the same error.

Kindly DM your codes for the grader cell you are having issue. You can share a screenshot. Click on my name and then message. Also always create a new topic for your own issue even if you find similar thread as the error for your issue might be different from the post creator here.

Regards
DP

This is the notebook, if you have time, take a look and guide me.

{DONT POST ASSIGNMENT NOTEBOOK ON PUBLIC POST THREAD}

@m_hassan

you are using an obsolete/old copy of assignment, so kindly get a fresh copy of assignment and re-do the assignment.

Regards
DP

@Burak_Bakkar I am also getting the same error. No idea how to fix

If you have any query or issue with your assignment, kindly create a new topic with the error encountered screenshot without sharing any codes. posting comment on an older thread can be missed by mentors as they are older threads.

To get a response having a briefly explained issue with correctly selected specialisation, course, week and assignment name, and/or screenshot of your error, or your output with the expected output incase of mismatch output, will get you more prompt response. You can tag any mentors with @__their name in case you want them to notice your thread.

Let me know if you need further assistance.

Regards
DP

Still I did not get where will I find those files. From coursera, I will launch the notebook ,and then C4W3_Assignment
appears. So from that point, where will I find those files

Pavamana,

Have you deleted the files??

lets go step by step

I am not able to find files to delete.

I have opened the C4W3_Assignment, then what to do

Ok not to worry

I am sharing a screenshot, try to mimic the steps with the screenshot

When I clicked the file, you see new notebook, new text notebook, Jupytext and then Open, click on this open

Yeah. Now I got the list of files. Should I delete all these

When you click on open, you find the below image

1 Like