I indeed found one excess definition of ‘sentences’ in the code.
However, after fixing I get the sentences not defined grader error for both exexrcise 1 and 2, which is strange as now sentences is defined only once as a global variable.
Thanks for bearing with me.
I did use the hinted take and skip methods to define train_dataset and validation_dataset, and there is no other definition of ‘sentences’ anywhere else .
You added extra codes in fit vectorizer grade cell, there was only instantiation of textvectorizer class and fitting the vectorizer to the training sentences, so I don’t know from where you added again the train split codes here. Get fresh copy and redo your assignment, and always remember stick to writing codes only as per the instructions already given and not adding/deleting or editing anything which was anything outside the ###Start and end code here###