diff --git a/ModelOps/09_ModelOps_GIT_PIMA_Python_XGboost.ipynb b/ModelOps/09_ModelOps_GIT_PIMA_Python_XGboost.ipynb index 2e02f824..6fc777fe 100644 --- a/ModelOps/09_ModelOps_GIT_PIMA_Python_XGboost.ipynb +++ b/ModelOps/09_ModelOps_GIT_PIMA_Python_XGboost.ipynb @@ -463,6 +463,7 @@ "source": [ "%%writefile $model_local_path/model_modules/evaluation.py\n", "from sklearn import metrics\n", + "from sklearn.metrics import ConfusionMatrixDisplay, RocCurveDisplay\n", "from teradataml import DataFrame, copy_to_sql\n", "from aoa import (\n", " record_evaluation_stats,\n", @@ -508,10 +509,10 @@ " with open(f\"{context.artifact_output_path}/metrics.json\", \"w+\") as f:\n", " json.dump(evaluation, f)\n", "\n", - " metrics.plot_confusion_matrix(model, X_test, y_test)\n", + " ConfusionMatrixDisplay.from_estimator(model, X_test, y_test)\n", " save_plot('Confusion Matrix', context=context)\n", "\n", - " metrics.plot_roc_curve(model, X_test, y_test)\n", + " RocCurveDisplay.from_estimator(model, X_test, y_test)\n", " save_plot('ROC Curve', context=context)\n", "\n", " from xgboost import plot_importance\n", diff --git a/ModelOps/12_ModelOps_Model_Factory_REST_Python.ipynb b/ModelOps/12_ModelOps_Model_Factory_REST_Python.ipynb index 390a6530..6cb547b8 100644 --- a/ModelOps/12_ModelOps_Model_Factory_REST_Python.ipynb +++ b/ModelOps/12_ModelOps_Model_Factory_REST_Python.ipynb @@ -450,7 +450,7 @@ "source": [ "def train(url, token, project, model, dataset_connection, dataset_train, train_memory, train_cpu, hyper_params, training_image):\n", " headers = {\n", - " \"AOA-Project-ID\": project,\n", + " \"VMO-Project-ID\": project,\n", " \"Authorization\": f\"Bearer {token}\",\n", " \"Content-Type\": \"application/json\",\n", " }\n", @@ -519,7 +519,7 @@ "source": [ "def evaluate(url, token, project, version_id, dataset_connection, dataset_eval, eval_memory, eval_cpu, hyper_params, deployment_image):\n", " headers = {\n", - " \"AOA-Project-ID\": project,\n", + " \"VMO-Project-ID\": project,\n", " \"Authorization\": f\"Bearer {token}\",\n", " \"Content-Type\": \"application/json\",\n", " }\n", @@ -587,7 +587,7 @@ "\n", " comment = b6(b\"Approved\").decode().strip()\n", " headers = {\n", - " \"AOA-Project-ID\": project,\n", + " \"VMO-Project-ID\": project,\n", " \"Authorization\": f\"Bearer {token}\",\n", " \"Content-Type\": \"application/json\",\n", " }\n", @@ -686,7 +686,7 @@ "source": [ "def deploy(url, token, project, version_id, deploy_memory, deploy_cpu, dataset_connection, dataset_template, deployment_image):\n", " headers = {\n", - " \"AOA-Project-ID\": project,\n", + " \"VMO-Project-ID\": project,\n", " \"Authorization\": f\"Bearer {token}\",\n", " \"Content-Type\": \"application/json\",\n", " }\n", @@ -773,7 +773,7 @@ "def retire_others(url, token, project, model, version_id):\n", " deployments = []\n", " headers = {\n", - " \"AOA-Project-ID\": project,\n", + " \"VMO-Project-ID\": project,\n", " \"Authorization\": f\"Bearer {token}\",\n", " \"Content-Type\": \"application/json\",\n", " }\n", @@ -847,7 +847,7 @@ "def get_job_status(url, token, project, job_id):\n", " status = \"RUNNING\"\n", " headers = {\n", - " \"AOA-Project-ID\": project,\n", + " \"VMO-Project-ID\": project,\n", " \"Authorization\": f\"Bearer {token}\",\n", " \"Content-Type\": \"application/json\",\n", " }\n",