I'm trying to reproduce 2 tutorials below using my own dataset instead of MNIST dataset. https://docs.microsoft.com/ja-jp/azure/machine-learning/service/tutorial-auto-train-models https://docs.microsoft.com/ja-jp/azure/machine-learning/service/tutorial-deploy-models-with-aml
About '/notebooks/tutorials/03.auto-train-models.ipynb' there's no problem. I've got 'model.pkl'.
However, '/notebooks/tutorials/02.deploy-models.ipynb' has an error below in 'Predict test data' cell. I guess it's a matter of 'pickle' and 'import'.
Tell me solutions, please.
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-6-11cf888b622f> in <module>
      2 from sklearn.externals import joblib
      3 
----> 4 clf = joblib.load('./model.pkl')
      5 # clf = joblib.load('./sklearn_mnist_model.pkl')
      6 y_hat = clf.predict(X_test)
~/anaconda3_501/lib/python3.6/site-packages/sklearn/externals/joblib/numpy_pickle.py in load(filename, mmap_mode)
    576                     return load_compatibility(fobj)
    577 
--> 578                 obj = _unpickle(fobj, filename, mmap_mode)
    579 
    580     return obj
~/anaconda3_501/lib/python3.6/site-packages/sklearn/externals/joblib/numpy_pickle.py in _unpickle(fobj, filename, mmap_mode)
    506     obj = None
    507     try:
--> 508         obj = unpickler.load()
    509         if unpickler.compat_mode:
    510             warnings.warn("The file '%s' has been generated with a "
~/anaconda3_501/lib/python3.6/pickle.py in load(self)
   1048                     raise EOFError
   1049                 assert isinstance(key, bytes_types)
-> 1050                 dispatch[key[0]](self)
   1051         except _Stop as stopinst:
   1052             return stopinst.value
~/anaconda3_501/lib/python3.6/pickle.py in load_global(self)
   1336         module = self.readline()[:-1].decode("utf-8")
   1337         name = self.readline()[:-1].decode("utf-8")
-> 1338         klass = self.find_class(module, name)
   1339         self.append(klass)
   1340     dispatch[GLOBAL[0]] = load_global
~/anaconda3_501/lib/python3.6/pickle.py in find_class(self, module, name)
   1386             elif module in _compat_pickle.IMPORT_MAPPING:
   1387                 module = _compat_pickle.IMPORT_MAPPING[module]
-> 1388         __import__(module, level=0)
   1389         if self.proto >= 4:
   1390             return _getattribute(sys.modules[module], name)[0]
ModuleNotFoundError: No module named 'automl'
you have to include azureml-train-automl package. and you have to do this:
import azureml.train.automl
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With