C3_W1 Deep N-grams: module 'w1_unittest' has no attribute 'test_test_model'

Hi @Deepti_Prasad

Ehmm… I don’t think that’s the issue…

The compile_model cell works fine and my code is getting a 96% in the grader (everything 10/10 except for the issue described in this other issue in the forums.

The error message is saying that the function test_test_model doesn’t exist in w1_unittest and that can be confirmed by inspecting the w1_unittest module:

from inspect import getmembers, isfunction
print(getmembers(w1_unittest, isfunction))

This will print:

[
    ('Input', <function Input at 0x7fb97cbd0b80>),
    ('comparator', <function comparator at 0x7fb97a4a6700>),
    ('summary', <function summary at 0x7fb97a4a6790>),
    ('test_GRULM', <function test_GRULM at 0x7fb97a4a68b0>),
    ('test_GenerativeModel', <function test_GenerativeModel at 0x7fb97a4a6a60>),
    ('test_compile_model', <function test_compile_model at 0x7fb97a4a6940>),
    ('test_create_batch_dataset', <function test_create_batch_dataset at 0x7fb97a4a6820>),
    ('test_line_to_tensor', <function test_line_to_tensor at 0x7fbafef7e820>),
    ('test_log_perplexity', <function test_log_perplexity at 0x7fb97a4a69d0>)
]

As you can see, there is no test_test_model function but there is a test_log_perplexity function that, when run:

w1_unittest.test_log_perplexity(log_perplexity)

Returns:

All test passed!