From 4315d18d48e1c226de732cc03e5d0fd6a2825e0e Mon Sep 17 00:00:00 2001 From: KyuWoo Choi Date: Fri, 29 Nov 2024 13:37:42 +0900 Subject: [PATCH] doc: update example for better nubison integration --- example/model.ipynb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/example/model.ipynb b/example/model.ipynb index fc1718d..b27c25b 100644 --- a/example/model.ipynb +++ b/example/model.ipynb @@ -9,7 +9,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -56,22 +56,22 @@ "name": "stderr", "output_type": "stream", "text": [ - "2024/11/28 14:29:24 WARNING mlflow.utils.requirements_utils: Detected one or more mismatches between the model's dependencies and the current Python environment:\n", + "2024/11/28 16:58:19 WARNING mlflow.utils.requirements_utils: Detected one or more mismatches between the model's dependencies and the current Python environment:\n", " - nubison-model (current: 0.0.2.dev3+3e1558a.20241118053748, required: nubison-model==0.0.1)\n", "To fix the mismatches, call `mlflow.pyfunc.get_model_dependencies(model_uri)` to fetch the model's environment and install dependencies using the resulting environment file.\n", - "2024/11/28 14:29:24 WARNING mlflow.models.model: Model logged without a signature and input example. Please set `input_example` parameter when logging the model to auto infer the model signature.\n", - "Registered model 'Default' already exists. Creating a new version of this model...\n", - "2024/11/28 14:29:24 INFO mlflow.store.model_registry.abstract_store: Waiting up to 300 seconds for model version to finish creation. Model name: Default, version 141\n", - "Created version '141' of model 'Default'.\n", - "2024/11/28 14:29:24 INFO mlflow.tracking._tracking_service.client: ๐Ÿƒ View run bittersweet-wren-934 at: http://127.0.0.1:5000/#/experiments/0/runs/f6de73428f38482f9d4ee6ae86494793.\n", - "2024/11/28 14:29:24 INFO mlflow.tracking._tracking_service.client: ๐Ÿงช View experiment at: http://127.0.0.1:5000/#/experiments/0.\n" + "2024/11/28 16:58:19 WARNING mlflow.models.model: Model logged without a signature and input example. Please set `input_example` parameter when logging the model to auto infer the model signature.\n", + "Registered model 'nubison_model' already exists. Creating a new version of this model...\n", + "2024/11/28 16:58:20 INFO mlflow.store.model_registry.abstract_store: Waiting up to 300 seconds for model version to finish creation. Model name: nubison_model, version 8\n", + "Created version '8' of model 'nubison_model'.\n", + "2024/11/28 16:58:20 INFO mlflow.tracking._tracking_service.client: ๐Ÿƒ View run bustling-mare-593 at: https://model.nubison.io/#/experiments/1207/runs/dbebfd0f99594a0fa1c67a6a00b3e270.\n", + "2024/11/28 16:58:20 INFO mlflow.tracking._tracking_service.client: ๐Ÿงช View experiment at: https://model.nubison.io/#/experiments/1207.\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "Model registered: runs:/f6de73428f38482f9d4ee6ae86494793/\n" + "Model registered: runs:/dbebfd0f99594a0fa1c67a6a00b3e270/\n" ] } ], @@ -81,7 +81,7 @@ "\n", "# Register the user model\n", "# The `artifact_dirs` argument specifies the folders containing the files used by the model class.\n", - "model_id = register(UserModel(), artifact_dirs=\"src\", params={\"desc\": \"This is a test model\"}, metrics={\"train_score\": 0.9, \"val_score\": 0.8, \"test_score\": 0.7})\n", + "model_id = register(UserModel(), mlflow_uri=\"https://model.nubison.io\", model_name=\"nubison_model\", artifact_dirs=\"src\", params={\"desc\": \"This is a test model\"}, metrics={\"train\": 0.9, \"validation\": 0.8, \"test\": 0.7})\n", "print(f\"Model registered: {model_id}\")\n" ] },