Tests for the Module3

Hi, I cant seem to pass Module 3 assignment for course 2 PyTorch: Techniques and Ecosystem Tools what can I do?

Hi @charlieijk,

Please be more specific about what kind of issue and where you are encountering those?

Sharing screenshots and error messages would be helpful for us to understand your situation.

Do not share your solution code though.

Thanks,
Mubsi

Hi @Mubsi , I am facing the same issue - Despite passing all the unit tests, I continue to receive 0/10 on exercise 2 and 3, while the corresponding unittests are all successful. The data_collator and Bert_tokenizer are not initialized is the specific error message in the feedback for the submission, but I can verify these objects are initialized.

We don’t have full visibility into how the graders work here (yet anyway), but one thing to check is that you actually did a successful “Save” before you submitted to the grader. Perhaps the grader is seeing an older version of your code.

The other theory would be that data_collator and bert_tokenizer are initialized in an invalid way: e.g. referencing variables that would not be defined in the grader environment.

Hi @gagan024,

You are getting these errors precisely because of what Paul mentioned.

At the start of every assignment, the one of the instructions mention:

Avoid using global variables unless you absolutely have to. The grader tests your code in an isolated environment without running all cells from the top. As a result, global variables may be unavailable when scoring your submission. Global variables that are meant to be used will be defined in UPPERCASE.

  • So, in exercise 2, you are using bert_tokenizer, when you should be using the function parameter, tokenizer, as instructed in the exercise description.
  • Similarly, in exercise 3, you are using data_collator, when you should be using the function parameter, collate_fn .

Make these revisions and you should be able to pass the grader.

Best,
Mubsi

1 Like