C3W1 grading error parse_data_from_file

I got 5/20 in parse_data_from_file function

Failed test case: incorrect number of sentences when using a csv file with 5 examples.
Expected:
5,
but got:
2225.

Failed test case: incorrect number of labels when using a csv file with 5 examples.
Expected:
5,
but got:
2225.

Failed test case: incorrect set of labels when using a csv file with first 5 examples.
Expected:
[‘tech’, ‘business’, ‘sport’, ‘sport’, ‘entertainment’],
but got:
[‘tech’, ‘business’, ‘sport’, ‘sport’, ‘entertainment’, ‘politics’, ‘politics’, ‘sport’, ‘sport’, ‘entertainment’, ‘entertainment’, ‘business’, ‘business’, ‘politics’, ‘sport’, ‘business’, ‘politics’, ‘sport’, ‘business’, ‘tech’, ‘tech’, ‘tech’, ‘sport’, ‘sport’, ‘tech’, …].

Though my output matches the expected output. I can’t quite understand where I am actually doing the problem.

Please click my name and message your notebook as an attachment.

I’ve notified the staff about this. Could you please refresh your workspace and try again by pasting your code where required?
See Refresh your Lab Workspace section here

it’s still same. 5/20

Thanks for trying. Someone should get back to you with an update pretty soon.

Hi @Rama_Jha, I think you hardcoded the path to the csv in your function instead of using the filename param provided. The function is then tested with a file with only 5 examples but it is still parsing the full corpus as a result of this.

Let me know if this helps! :slight_smile:

@a-zarta Sorry about that.

No problem @balaji.ambresh! :slight_smile: