Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modelops 7.1 Support #713

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ModelOps/09_ModelOps_GIT_PIMA_Python_XGboost.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 6 additions & 6 deletions ModelOps/12_ModelOps_Model_Factory_REST_Python.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down