All the test cases passed, but this error popped up during submission.
Can anyone help, please?
Hi @Prabudhd
The grader fails at the first exercise (“Tokenize and mask”).
99% of the time when you pass the unit tests (and all your outputs match the expected outputs) but grading of the assignment fails, it is one of those reasons:
Important Note on Submission to the AutoGrader
Before submitting your assignment to the AutoGrader, please make sure you are not doing the following:
- You have not added any extra
- You have not added any extra code cell(s) in the assignment.
- You have not changed any of the function parameters.
- You are not using any global variables inside your graded exercises. Unless specifically instructed to do so, please refrain from it and use the local variables instead.
- You are not changing the assignment code where it is not required, like creating extra variables.
80% of these are:
- You are not using any global variables inside your graded exercises. Unless specifically instructed to do so, please refrain from it and use the local variables instead.
For example, if you have local variable named vocab_size
then do not use global variable like len(Vocab)
. (Here is a Video what is being meant by global vs. local variables and the playground to experiment.)
So please make sure you do not do any of the points mentioned above.
If you made a lot of changes while implementing the Assignment and you are not sure which parts have you changed, you could save your work and redo the Assignment with a fresh copy:
How to Refresh your Workspace
How to Refresh your Workspace:
Using Lab Help
- Open the assignment.
- After the assignment opens up, click "File" (top left) and then "Open…"
- When your workspace opens, select the check box before your assignment file. After it is selected, press "Shutdown".
- Using the same procedure mentioned above, "Rename" your file. For instance you can change it from assignment_name.ipynb to assignment_name_v2.ipynb. By doing this you’ll be able to save your current progress on the assignment after the latest assignment file is fetched.
- Using the same procedure, "Delete" any other file, if any, that you want to get a fresh copy of.
- After renaming your file, click on the "Help" button on the top right of the page. From the panel that opens, click "Get latest version" button, and then "Update lab".
- After the page reloads go to File → Open… , as described in (2)
- Now you’ll see two notebook files. The one you renamed (as done in step 4) will have your previous progress, and the latest version. (Depending on how many previous versions you have kept saved, you could have more than two assignment files in the worksapce)
Cheers
Hi @Prabudhd
It is against the rules to share your code, so please remove it.
You will have to refresh your workspace to complete the Assignment because the current state of your Assignment would be too complicated to recover.
This time, please do not modify code outside:
### START CODE HERE (Replace instances of 'None' with your code) ###
...
### END CODE HERE ###
For example, you imported random
on your own, while at the start there is import random as rnd
for you.
Cheers
ok thank you