4

Well the problem is that I found out models in scikit-learn that are the best for my data but I am not able to save these models under ".pb" extension to be able to deploy them over tensorflow-serving. Knowing that tensorflow-serving is a must, is there any way to make it happen or am I obliged to use a model from tensorflow or Keras only?

Note that I know there is a /contrib directory containing models that act like scikit-learn ones but their precision is much worse.

Noel Saade
  • 55
  • 5
  • I am not aware of a general conversion tool. What kind of model do you want to use? – mrks Mar 29 '19 at 16:22
  • I am still optimizing my models so I didn't really choose yet but it is between a GradientBoostingRegressor and a RandomForestRegressor. – Noel Saade Mar 29 '19 at 16:26
  • 1
    TF supports pickling. See this existing thread - https://stackoverflow.com/questions/38000180/save-tensorflow-model-to-file – Raunak Jhawar Mar 29 '19 at 16:27
  • 1
    Can you please clarify how is it similar to my issue? Apparently the person that opened the thread wants to save a tensorflow model as a checkpoint .ckpt. I want to save a scikit-learn model as a servable version .pb file... – Noel Saade Mar 29 '19 at 16:45
  • AFAIK, support for servables from other platform is still in contributions welcome state ([Ref](https://github.com/tensorflow/serving/issues/1694)). If you're using GCP, you can try the CloudML engine to deploy sklearn models at scale, Please refer this [blog](https://towardsdatascience.com/deploying-scikit-learn-models-at-scale-f632f86477b8) for more info on the same. Thanks! –  Mar 09 '22 at 17:41

0 Answers0