"There was a problem grading your submission. Check stderr for more details." Grading 1st week homework

I passed all the tests, why I don’t get points on “Test predict tweet” part? It doesn’t make any sense. Please see the screenshot!!!

Can anyone help or manually correct my grades?

I know I added two lines in cell 27, where homework instruction didn’t ask me to input code. Thus I also tested to change “test_predict_tweet” instead. Please see highlighted line I added to correct the error in function “test_predict_tweet”

I failed to get points again although I passed all the tests. My question would be I feel there is error in function “test_predict_tweet” in file “w1_unittest”. No one else find the same issue?

Sorry, but if you had to change the test code in order to get it to pass your code, then that means something is wrong with your code.

There are a number of reasons why you can pass the tests in the notebook, but still fail the grader. The basic reason is that your code is not general: it happens to work with the test in the notebook, but it does not work with a different test case. One type of reason for this is referencing global variables in the body of your function. What if the grader uses a different value?

Hi, is there a way for me to reset the file “w1_unittest”?

Yes, you can delete the file and then use the “Get a New Copy” procedure documented here.

actually I got the error now. thanks! It is all about the data type definition.

Keep us posted. If you are not able to directly find the error, there are other ways for us to help. But it sounds like you are on the track of the error, so you will probably figure it out.

1 Like

I had not actually looked at the change you made to the test file, but having seen that please note that the assignment as written does not use Pandas in any way. If you have introduced Pandas into your solution, that will cause problems. You only need python and numpy here.

1 Like

Thank you, I figured it out :slight_smile: