The notebook has passed all the unit tests successfully.
Upon submitting the assignment getting the following error:
There was a problem compiling the code from your notebook. Details:
name ‘tokenizer’ is not defined
The notebook has passed all the unit tests successfully.
Upon submitting the assignment getting the following error:
There was a problem compiling the code from your notebook. Details:
name ‘tokenizer’ is not defined
can you just share screenshot of the exercise 1 grade cell codes by personal DM. Please make sure not to post any codes here on public post as it is against community guidelines. Click on my name and message.
Regards
DP
Have shared the complete code file and also the screenshot of grading error via personal message.
Please guide.
Hi @Hrushikesha_Shastry1, happy to see you making progress in the course. Based on the error my guess is that one or more cells might’ve been removed. Can you check your notebook against the unmodified copy?
In the parse_squad, for code lines
Add the question_context to the inputs list and add answer to the target list, you are suppose to use question_context and answer which was recalled in the previous two codes lines rather than using the code you used to create the question_context and answer.
Let me know if issue persist, then I might have to look at other codes too.
Regards
DP
The issue is still the same.
Tried creating a new copy, but the issue is persisting.
The issue is still the same
Although earlier autograders allowed gradeuptohere for a particular grade cell to score in a section of assignment is correct but now autograder are designed in a way even a minor incorrect code anywhere in assignment cause grade failure. The reason being probably they have seen learners ignoring the incorrect part of codes if they have scored enough to pass an assignment.
Now comes to your code shared for answer_question grade cell
for code line
Concat the predicted next word to the output
You have used axis 1 where as you are suppose to use -1.
Regards
DP
Have made necessary changes as mentioned, still the same error, all unit tests have passed successfully but grader is throwing error as ‘tokenizer’ is not defined.
can I see the corrected screenshots. Also once you do the corrections, I hope you are first saving the notebook, then running each cell one by one and then submitting!
You could also do one thing, getting a completely fresh copy and make sure only to make changes between ###START AND END CODE HERE### and then resubmit. but make sure you delete the old file in the Coursera environment, file==>open section.
Regards
DP
GRADED FUNCTION: parse_squad
Create the question/context sequence
for the context part you have used ’ context: ’ + context which is incorrect. It should be ’ context: ’ + paragraph[‘context’]
Remember the point mentions
answer
sequence using the first answer from the available answers.Have made all the modifications mentioned.
Getting the same error ‘tokenizer’ not defined
Hi All,
Please help in submitting the assignment.
Have shared the complete code snippet via personal message.
Taken from the unmodified notebook - the tokenizer is initialized in section 1.4:
# Special tokens
# PAD, EOS = 0, 1
<Code chunk to be copy-pasted goes here>
Please add this code chunk back or restore the unmodified copy of C4W3 assignment. Let us know if you’re facing issues.
His issue was addressed in DM, he had edited out a def statement tokenizer=None to tokenizer=tokenizer which caused this grading issue.