Even after all test passed ,I keep getting zero grade

For all exercises, I got this error “Grader found global variables inside graded fuctions. Please avoid using global variables in your functions.”

I verified all of my functions, even I refreshed the environment, with new notebook did all my changes again. Still getting the same error.

I could not debug where I am using global variable. @mubsi Can you please help?

My lab id is xyhvjwcc

Hi @Abrar_Hyder_Mohammed

Did you solve the problem?

I have the exact same problem. Any help would be great!

Hi @dmilush

In other words, what it suggests, that you use some variable that is not passed to the function.

Please check in every function that you use variables that are passed only as arguments (in def (...)) and not variables that are somewhere else in the Notebook.

For example, if you have a function:
def tweet_to_tensor(tweet, vocab_dict, unk_token='__UNK__', verbose=False):

  • make sure that you use vocab_dict and not Vocab,
  • unk_token and not Vocab[0] or smth.
    and others.

I use the same variable and still have this error what problem did you know ? :thinking:

Hi @Amal2

If you are sure that you do not use global variables and not modified functions outside where you supposed to, you could click on my username and message me your Assignment notebook (how to download).


Thank, you my bad, fixed and assignment done!

My lab iD is idgrcrjrck. I got all test passes and graded 0. Thx

I have the same prorblem, I got all test passed and my grade is 0. And now I have this error :
" Evaluator Error: Evaluator Comments Not Found
Visit the discussion forum to see if your peers are experiencing or have resolved similar errors. If this error is not resolved within 24 hours, please contact Coursera through the Help Center. "

By the way, I have passed all the rest of this course

my lab id is grcrjrck

I have the same problem, for all of the exercises of this assignment, I am getting the same error of using global variables, which I cannot find any in my code.
My lab id is noqvzwmb.

I am having the same issue. My lab id is pwpersni

@Mubsi Hi, could you please take a look at my lab with id noqvzwmb.

all the tests are passed but I am getting 0 point at the end, the error is global variables for all the test cases, I have checked but there are no global variables.

Thank you.

Hi @Zoha_Azimi,

I shall look into this soon.


Hi @Zoha_Azimi,

You are, in fact, using a global variable in your function.

In Ex 6, you are using the model global variable. Please use the function parameter instead.


Hi @Z_Su,

Do you still need help with this as well ? If so, kindly tag me when you reply back.


@Mubsi , Thank you, it was showing the global variable error for all the 8 exercises and I was checking all of them, I missed this one.
It is solved now, Thanks again.