Home > Net >  Azure Synapste Predict Model with Synapse ML predict
Azure Synapste Predict Model with Synapse ML predict

Time:03-30

I follow the official tutotial from microsoft: enter image description here

When I predict for MLFLOW packaged model named sklearn_regression_model, getting same error as shown above:

enter image description here

linear_regression: Which contains the below files:

enter image description here

When I predict for MLFLOW packaged model named linear_regression, it works as excepted.

enter image description here


It should be AML_MODEL_URI = "" #In URI ":x" => Rossman_Sales:2

enter image description here

Before running this script, update it with the URI for ADLS Gen2 data file along with model output return data type and ADLS/AML URI for the model file.

#Set model URI
       #Set AML URI, if trained model is registered in AML
          AML_MODEL_URI = "<aml model uri>" #In URI ":x" signifies model version in AML. You can   choose which model version you want to run. If ":x" is not provided then by default   latest version will be picked.

       #Set ADLS URI, if trained model is uploaded in ADLS
          ADLS_MODEL_URI = "abfss://<filesystemname>@<account name>.dfs.core.windows.net/<model   mlflow folder path>"

Model URI from AML Workspace:

DATA_FILE = "abfss://[email protected]/AML/LengthOfStay_cooked_small.csv"
AML_MODEL_URI_SKLEARN = "aml://mlflow_sklearn:1" #Here ":1" signifies model version in AML. We can choose which version we want to run. If ":1" is not provided then by default latest version will be picked
RETURN_TYPES = "INT"
RUNTIME = "mlflow"

Model URI uploaded to ADLS Gen2:

DATA_FILE = "abfss://[email protected]/AML/LengthOfStay_cooked_small.csv"
AML_MODEL_URI_SKLEARN = "abfss://[email protected]/linear_regression/linear_regression" #Here ":1" signifies model version in AML. We can choose which version we want to run. If ":1" is not provided then by default latest version will be picked
RETURN_TYPES = "INT"
RUNTIME = "mlflow"
  • Related