Fix e2e-ml-workflow notebook: pin MLflow version and add NCD deployment dependencies - #3902
Conversation
Removed environment variables from deployment configuration.
7ea532f to
343d5d8
Compare
Three issues fixed: 1. Auto-generated MLflow scoring script imports azureml.ai.monitoring which is missing from auto-built env. Fixed with explicit conda env. 2. The mlflow.pyfunc.scoring_server.infer_and_parse_data and predictions_to_json functions were removed in mlflow 3.x. Rewrote score.py to parse input_data (split-oriented DataFrame) with pandas and serialize predictions with numpy/json directly. 3. Fixed model path: AZUREML_MODEL_DIR points to registration root but MLflow artifacts (MLmodel, model.pkl) are in a subdirectory. The score.py walks the directory to find the MLmodel file. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
343d5d8 to
fa4df36
Compare
|
Root Cause The notebook's conda.yaml uses unpinned mlflow, which installs the latest version. MLflow Pin mlflow==2.16.2 in the training environment conda.yaml (latest version supported by Azure ML) |
Description
Checklist