Module 2 C1M2_Assignment

I submitted the assignment, but it was marked as failed. However, when I run the following cell to check my code, it shows 'All tests passed!

Did you try resubmitting your assignment at a later time?

Yes and i get this Exercise 1

0/10 points

Failed test case: generate_draft raised LLMError: An error occurred: Error code: 400 - {ā€˜error’: {ā€˜message’: ā€œInvalid value for ā€˜content’: expected a string, got null.ā€, ā€˜type’: ā€˜invalid_request_error’, ā€˜param’: ā€˜messages.[0].content’, ā€˜code’: None}}. Expected: no exception, but got: An error occurred: Error code: 400 - {ā€˜error’: {ā€˜message’: ā€œInvalid value for ā€˜content’: expected a string, got null.ā€, ā€˜type’: ā€˜invalid_request_error’, ā€˜param’: ā€˜messages.[0].content’, ā€˜code’: None}}.

The error message suggests that you are missing an edge case or an special case in your code that causes error while getting 100/100 in notebook! Please double-check your code. Also, feel free to ask if you need further assistance.

Make sure your notebook is saved with the changes before submitting as per the instruction. Could you try this ?

ā€œTo submit your notebook for grading, first save it by clicking the :floppy_disk: icon on the top left of the page and then click on the Submit assignment button on the top right of the page. ā€œ

Hi, how did you run your code? My code is neither giving an error in the lab nor running.

Thank you! Your instructions worked perfectly.

You’re welcome, happy to help :raised_hands:

Hi,

Please double-check that your kernel is working properly!

@Alireza_Saei Thank you. All tests are passed now, but when I am submitting it, it’s giving a 0 score

I’m having the same issue. Notebook works perfectly - Initial_Draft, Reflection, Revised_Verison.
All unit tests successfully passed, but submission returns this error.
Tried to add handler to avoid null content - but still getting the same error.

Any suggestions?

hm.. Something was fixed in the lab and now everything was accepted without any issues.

UGH. Thanks. Saving it did the trick.

After 45 minutes, that was it. It’s annoying because other labs in other courses do not work that way.

The notebook auto-save is not very reliable. It’s always best to manually save your work before you submit for grading.

Sigh… so it goes. I was frustrated because my code was right and I knew it. The in-built unit tests were passed. BUT! Grading failed… but that’s our job of coding, right? Sorting out the problems we can’t figure out… which is way forums like this are oh so important. Thanks for being here.

Note that passing the built-in unit tests never proves that your code is perfect. The grader always uses entirely different test cases.

Can anyone have a full code

Students cannot share their code for the assignments. That’s in the Code of Conduct.