@AMROUN Lysa One possible solution to this issue is to use the ONNX (Open Neural Network Exchange) format to export your Azure AutoML model and then load it into your C# .NET application using the Microsoft.ML library. ONNX is a standard format for representing machine learning models that is supported by many different libraries and frameworks, including both Azure AutoML and Microsoft.ML.
To export your Azure AutoML model to ONNX format, you can use the ModelProxy
class in the azureml.automl.runtime
module. Here is an example of how to do this:
from azureml.automl.runtime import ModelProxy
model_proxy = ModelProxy(model_path='path/to/your/model.pkl')
onnx_model = model_proxy.serialize_to_onnx('path/to/save/onnx/model.onnx')
Once you have exported your Azure AutoML model to ONNX format, you can load it into your C# .NET application using the ApplyOnnxModel
method of the Microsoft.ML.Transforms.Onnx
namespace. Here is an example of how to do this:
using Microsoft.ML;
using Microsoft.ML.Transforms.Onnx;
var mlContext = new MLContext();
var onnxModel = mlContext.Transforms.ApplyOnnxModel("path/to/onnx/model.onnx");
This should allow you to use your Azure AutoML model in your C# .NET application using the Microsoft.ML library.