ModuleNotFoundError Traceback (most recent call last)
in
10 from copy import deepcopy
11 from testCases import *
—> 12 from public_tests import *
13
14 get_ipython().run_line_magic(‘matplotlib’, ‘inline’)
~/work/release/W2A1/public_tests.py in
2 from numpy import array
3 from testCases import *
----> 4 from dlai_tools.testing_utils import single_test, multiple_test
5
6
ModuleNotFoundError: No module named ‘dlai_tools’
I have this error, it’s the second time it appears on the second day I try to solve the programming assignment of week 3. Yesterday appeared between 11:00 - 11:10 pm (Texas), today I didn’t get any error but when I arrived at “Exercise 2 - random_mini_batches” when I try to call the function random_mini_batches_test(random_mini_batches) appeared another error related to this function, I run all the code again and restarted the kernel and appeared the same error of yesterday. I think that there is some kind of bug in your servers or something like that, and it’s frustrating because I can only do this assignment at night when I have enough free time.
After digging, it seems like you should never have this problem for Week 3. However, I will investigate your issue further for Week 1 and 2.
It might be the case that you have an old version of extra files installed on the server. Download your notebook. Delete all files and then refresh the lab to get the latest version. Hopefully, it should then work.
Same situation for me for the week 1:
ModuleNotFoundError Traceback (most recent call last)
in
3 import sklearn
4 import sklearn.datasets
----> 5 from public_tests import *
6 from init_utils import sigmoid, relu, compute_loss, forward_propagation, backward_propagation
7 from init_utils import update_parameters, predict, load_dataset, plot_decision_boundary, predict_dec
~/work/release/W1A1/public_tests.py in
1 import numpy as np
----> 2 from dlai_tools.testing_utils import single_test, multiple_test
3
4
5 def initialize_parameters_zeros_test(target):
… but only after downloading the files and running the notebook locally. In the online workspace everything works fine.
However, I’d really like to run the notebook also locally - how do I fix this error there? @Kinzang_Dorji it looks like you had the same problem, how did you fix it?
@jonaslalin I noticed that my public_tests.py file does not start with
import numpy as np
from test_utils import single_test, multiple_test
but rather with
import numpy as np
from dlai_tools.testing_utils import single_test, multiple_test