0

Is there any way to use python ML model in ml .net for prediction. Is it inter-operable?

I know there are some other ways using Process to fire python script but here I am looking for inter-operablity of Python ML models.

I have tried with Process class of c#. but I am looking for something more generic.

  • Sure, wrap it into a C dll and use that in C#. Provide some language-agnostic interface, e.g. ZeroMQ. Use a framework like Celery. Use interprocess communication. Use a third-party extension like Keras.NET, TensorFlow.Net, TensorFlowSharp, https://github.com/tensorflow/docs/blob/master/site/en/r1/guide/extend/bindings.md – Joe Sep 30 '19 at 14:45
  • I am not using tensorflow or Keras for now. Now i know it is not possible. – vikash sinha Oct 07 '19 at 07:51
  • It is possible, as I mentioned above. Option 1: Wrap it into a C dll and use that in C#. Option 2: Provide some language-agnostic interface, e.g. ZeroMQ. Option 3: Use a framework like Celery. Option 4: Use interprocess communication. – Joe Oct 07 '19 at 11:10
  • yeah, I saw. My whole point of using same model in c# was simple. I wanted to avoid network calls if I expose it through python APIs. Your options will work i guess but this is again something which has overhead for my requirement. My core app is in .net core. – vikash sinha Oct 07 '19 at 12:56

0 Answers0