0

I have a trained model using TPOT. When I tried loading the model to ml-engine it says: No module named tpot.builtins.stacking_estimator

The error makes sense since TPOT is an external package, not included in Cloud ML Engine runtime versions. Is there any way to get around it?

A. Sen
  • 53
  • 4

1 Answers1

0

For what I can see, you only need PyPI to add the related dependencies. Checking the dependencies for the installation of TPOT, all of those can be installed through pip.

So, follow the documentation for "Adding standard (PyPI) dependencies" and include this module and all the related dependencies in your setup.py file. And follow the related steps to package and upload your training application.

Héctor Neri
  • 1,384
  • 9
  • 13
  • Yes, that will work for training. I am looking for a similar solution for prediction. How do I create ml-engine model version with a TPOT model binary for prediction? In general, how to deploy a custom class which is not included in runtime-versions for predictions? – A. Sen Nov 01 '18 at 14:17
  • Ok. From the scikit-learn docs, which I see is what it's used for TPOT, only [model.pkl and model.joblib files](https://cloud.google.com/ml-engine/docs/scikit/deploying-models) can be used to deploy the model, according to the [library used to export model](https://cloud.google.com/ml-engine/docs/scikit/packaging-trainer#name-model-for-prediction). To follow your question, the mentioned TPOT model binary is different to those files? or being exported as any of those files, you want to include in the model something that was not included when exporting the model after the training phase? – Héctor Neri Nov 01 '18 at 16:53