Skip to content

Commit

Permalink
fix tg notebook (#2736)
Browse files Browse the repository at this point in the history
Co-authored-by: Razvan Tanase <[email protected]>
  • Loading branch information
cassieesvelt and rtanase authored Oct 13, 2023
1 parent e851fde commit 5d960b9
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,17 @@
"outputs": [],
"source": [
"model_name = \"gpt2\"\n",
"model_version = \"4\"\n",
"foundation_model = registry_ml_client.models.get(model_name, model_version)\n",
"print(\n",
" f\"Using model name: {foundation_model.name}, version: {foundation_model.version}, id: {foundation_model.id} for inferencing.\"\n",
")"
"version_list = list(registry_ml_client.models.list(model_name))\n",
"if len(version_list) == 0:\n",
" print(\"Model not found in registry\")\n",
"else:\n",
" model_version = version_list[0].version\n",
" foundation_model = registry_ml_client.models.get(model_name, model_version)\n",
" print(\n",
" \"\\n\\nUsing model name: {0}, version: {1}, id: {2} for inferencing\".format(\n",
" foundation_model.name, foundation_model.version, foundation_model.id\n",
" )\n",
" )"
]
},
{
Expand Down

0 comments on commit 5d960b9

Please sign in to comment.