hello everyone.
it seems there is a problem when i submit my assignment.it pass all the test when i run it in lab but fails when i submit it. can any one help me
Hello @alireza_helali
I have recategorized your post. Hereafter when you post your query, kindly post it under correct category so that the possibility of the mentor attending your question may increase.
Hi @alireza_helali,
At the start of the notebook there’s:
**Important Note on Submission to the AutoGrader**
Before submitting your assignment to the AutoGrader, please make sure you are not doing the following:
1. You have not added any extra print statement(s) in the assignment.
2. You have not added any extra code cell(s) in the assignment.
3. You have not changed any of the function parameters.
4. 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.
5. You are not changing the assignment code where it is not required, like creating extra variables.
If you do any of the following, you will get something like, Grader not found (or similarly unexpected) error upon submitting your assignment. Before asking for help/debugging the errors in your assignment, check for these first. If this is the case, and you don't remember the changes you have made, you can get a fresh copy of the assignment by following these instructions.
The stderr
error also happens when you do any of the above mentioned things. Please check for those and if it still continues
Please make sure you are not doing any of these listed things. If it still continues to happen, let me know.
Best,
Mubsi
hi. thanks for replying
i deleted my .ipynb and updated lab to latest version and started coding from beginning but still have the problem.i was so careful to do the things that you’ve said. i had probably 6 courses on coursera and this is the first time happening.
Hi, can you send me your notebook? I can check to see what the problem is.
Hi @Mubsi, Even I am having the exact similar problem.
Regards,
Praveer
Hi @Mubsi
My problem is solved. Thanks.
Regards,
Praveer
Hi @Praveer_Roy,
Could you mention what you did differently which helped your error so that @alireza_helali can benefit from it as well ?
Thanks,
Mubsi
I was using the global dictionary for embeddings, thus the program was running but the autograder was rejecting it.
Regards,
Praveer
{moderator edit - solution removed}
here is the file
@Mubsi @Praveer_Roy @davidguo94
Check your variable for get_country, you are using a global variable for embeddings.
Thanks, this helps to solve my issue too
could you upload your .ipynb file or a screenshot from get_country function. because my problem isn’t solved yet
i checked unittest file and embedding is specified in test_get_country function as you see in screenshot
Hi the issue is that in the function get_country, the word_embeddings is a global variable, and the local variable embeddings should be used here instead. Hope this helps.
Thank you @Praveer_Roy, @davidguo94 and @ry2022 for clarifying things for @alireza_helali.
@alireza_helali, please take note.
You should not take inspiration from unit tests to implement your exercises, because this will cause many issues for you.
For one, in order to satisfy the unit tests, learners often write code which helps them pass the unit test of the assignment, but they fail the unit test of the autograder because they are different.
And second, within the unit test, please know the variable word_embeddings
is completely different than the one in the assignment, even if they load the same data.
As everyone mentioned, do not use the global variable word_embeddings
(which as I mentioned, will pass the assignment unit test, but not of the autograder because autograder unit test is completely different), but use the function parameter embeddings
instead.
Cheers,
Mubsi
thank everyone my problem solved.@Mubsi @ry2022 @davidguo94 @Praveer_Roy
can you share the screenshot of your code
use embeddings instead of word_embeddings variable it may solve your problem.