From 37159db633646059eb31efa4654dca1d630d9370 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 8 Jul 2024 17:30:51 +0200 Subject: [PATCH 1/6] Fix Ray+XGBoost example --- .../ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb index 650e433..7fb9745 100644 --- a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb +++ b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb @@ -41,7 +41,8 @@ }, "outputs": [], "source": [ - "%pip install -U comet_ml \"ray[air]>=2.1.0\" xgboost_ray \"pandas!=2.2.0\"" + "# XGBoost is pinned because of https://github.com/ray-project/ray/issues/46476\n", + "%pip install -U comet_ml \"ray[air]>=2.1.0\" xgboost_ray \"pandas!=2.2.0\" \"xgboost!=2.1.0\"" ] }, { From 5c79886866b1cf41cc3b45c57c43a540360eba1d Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 8 Jul 2024 18:18:08 +0200 Subject: [PATCH 2/6] Temporary use older version of Keras to fix the build --- .../ray-train/notebooks/Comet_with_ray_train_keras.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb index d3c44d8..2d51217 100644 --- a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb +++ b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb @@ -41,7 +41,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml \"ray[air]>=2.1.0\" tensorflow" + "%pip install -U comet_ml \"ray[air]>=2.1.0\" \"keras<3\" \"tensorflow<2.16.0\"" ] }, { From 6c0dbaaab20eb5730bd9b5fdedb0107c61c7f2d3 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 8 Jul 2024 18:45:10 +0200 Subject: [PATCH 3/6] Use new comet_ml.login instead of comet_ml.init --- .../Running_Offline_Experiments.ipynb | 66 +- .../Computer_Vision_with_Comet.ipynb | 4 +- guides/get-started/Comet_Quickstart.ipynb | 4 +- .../Image_Classification_with_Keras.ipynb | 114 +- ...ith_Structured_Data_Churn_Prediction.ipynb | 1198 ++++++------- .../A_Guide_to_Remote_Artifacts.ipynb | 4 +- .../Introduction_to_Artifacts.ipynb | 4 +- .../Comet_in_Notebooks.ipynb | 78 +- integrations/annoy/annoy_example.py | 3 +- integrations/annoy/requirements.txt | 2 +- .../notebooks/Comet_and_Snowflake.ipynb | 361 ++-- .../notebooks/CometLLM_hello_world.ipynb | 4 +- .../Alpaca_Lora_Finetuning_with_Comet.ipynb | 4 +- .../gradio/notebooks/Gradio_and_Comet.ipynb | 4 +- ...del_Inferences_with_Comet_and_Gradio.ipynb | 4 +- ..._NerfStudio_sitcoms3d_evaluate_model.ipynb | 6 +- ..._with_Tensorflow_Model_Analysis_TFMA.ipynb | 156 +- .../notebooks/Comet_Optimizer_Keras.ipynb | 114 +- .../ray-tune/notebooks/Comet_and_Ray.ipynb | 4 +- .../notebooks/Comet_and_Accelerate.ipynb | 4 +- .../anomalib/notebooks/Anomalib_Comet.ipynb | 37 +- .../catalyst/notebooks/Catalyst_x_Comet.ipynb | 125 +- .../mosaicml-getting-started.py | 2 +- .../mosaicml-getting-started/requirements.txt | 2 +- .../composer/notebooks/comet_composer.ipynb | 4 +- .../deepspeed-cifar/cifar10_deepspeed.py | 2 +- .../deepspeed-cifar/requirements.txt | 2 +- .../deepspeed/notebooks/comet_deepspeed.ipynb | 4 +- .../fastai-hello-world/fastai_hello_world.py | 2 +- .../fastai-hello-world/requirements.txt | 2 +- .../fastai/notebooks/fastai_hello_world.ipynb | 4 +- .../Comet_with_Hugging_Face_Trainer.ipynb | 4 +- .../requirements.txt | 2 +- .../transformers-distilbert-fine-tuning.py | 2 +- .../keras/keras-mnist-dnn/keras-mnist-dnn.py | 2 +- .../keras/keras-mnist-dnn/requirements.txt | 2 +- .../keras/notebooks/Comet_with_Keras.ipynb | 4 +- .../notebooks/Comet_and_LightGBM.ipynb | 4 +- .../mlflow/notebooks/Comet_and_MLFlow.ipynb | 99 +- .../Comet-NerfStudio_sitcoms3d.ipynb | 4 +- .../prophet/notebooks/Comet_and_Prophet.ipynb | 4 +- .../pycaret/notebooks/comet_pycaret.ipynb | 4 +- .../Comet_and_Pytorch_Lightning.ipynb | 26 +- .../pytorch-lightning-optimizer.py | 2 +- .../requirements.txt | 2 +- .../notebooks/Comet_Pytorch_Tensorboard.ipynb | 4 +- .../Comet_Pytorch_TensorboardX.ipynb | 4 +- .../pytorch/notebooks/Comet_and_Pytorch.ipynb | 4 +- .../notebooks/Histogram_Logging_Pytorch.ipynb | 4 +- .../pytorch-tensorboard-example.py | 2 +- .../pytorch-tensorboard/requirements.txt | 2 +- .../Comet_with_ray_train_keras.ipynb | 4 +- .../Comet_with_ray_train_xgboost.ipynb | 4 +- .../train_mnist.ipynb | 46 +- .../train_text_classification.ipynb | 56 +- .../pytorch-mnist/train_mnist.ipynb | 28 +- .../tensorflow-mnist/train_mnist.ipynb | 36 +- .../notebooks/Comet_with_Scikit_Learn.ipynb | 234 +-- .../comet-scikit-classification-example.py | 2 +- .../requirements.txt | 2 +- .../requirements.txt | 2 +- .../sklearn-model-saving-example.py | 2 +- .../comet-scikit-nlp-example.py | 2 +- .../sklearn-nlp-example/requirements.txt | 2 +- .../spark-nlp/notebooks/Comet_SparkNLP.ipynb | 258 ++- .../notebooks/Comet_and_Tensorflow.ipynb | 4 +- .../xgboost/notebooks/Comet_and_XGBoost.ipynb | 95 +- ...w_to_use_comet_with_xgboost_tutorial.ipynb | 33 +- .../xgboost/notebooks/xg_comet.ipynb | 50 +- .../yolov5/notebooks/Comet_and_YOLOv5.ipynb | 4 +- .../yolov8/notebooks/YOLOv8_and_Comet.ipynb | 579 +++---- .../notebooks/comet_gymnasium_example.ipynb | 4 +- .../metaflow-model-evaluation.py | 2 +- .../requirements.txt | 2 +- .../notebooks/metaflow_hello_world.ipynb | 4 +- .../notebooks/metaflow_model_eval.ipynb | 6 +- .../Comet-Confusion-Matrix-Pytorch.ipynb | 1498 ++++++++--------- notebooks/Comet-Confusion-Matrix.ipynb | 38 +- notebooks/Comet-Python-API.ipynb | 50 +- notebooks/ExpiringDataExample.ipynb | 27 +- 80 files changed, 2773 insertions(+), 2806 deletions(-) diff --git a/guides/advanced/Running_Offline_Experiments.ipynb b/guides/advanced/Running_Offline_Experiments.ipynb index c2e69cb..77bb0b4 100644 --- a/guides/advanced/Running_Offline_Experiments.ipynb +++ b/guides/advanced/Running_Offline_Experiments.ipynb @@ -1,18 +1,4 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", @@ -25,14 +11,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "wMWufCyZbZOx" }, + "outputs": [], "source": [ - "!pip install comet_ml --quiet" - ], - "execution_count": null, - "outputs": [] + "%pip install -U \"comet_ml>=3.44.0\"" + ] }, { "cell_type": "markdown", @@ -45,16 +31,16 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "B2s8nND-birg" }, + "outputs": [], "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"running-offline\")" - ], - "execution_count": null, - "outputs": [] + "comet_ml.login(project_name=\"running-offline\")" + ] }, { "cell_type": "markdown", @@ -67,16 +53,16 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "o7UtgSB-bk6K" }, + "outputs": [], "source": [ "experiment = comet_ml.OfflineExperiment()\n", "experiment.log_metrics({\"accuracy\": 0.5, \"loss\": 0.001})\n", "experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -98,23 +84,37 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "uo53wkSabrnW" }, + "outputs": [], "source": [ "!comet upload /content/.cometml-runs/*.zip" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "lxMv2erXgLtD" }, - "source": [], - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" } - ] -} \ No newline at end of file + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/guides/computer_vision/Computer_Vision_with_Comet.ipynb b/guides/computer_vision/Computer_Vision_with_Comet.ipynb index 4986f9b..2761881 100644 --- a/guides/computer_vision/Computer_Vision_with_Comet.ipynb +++ b/guides/computer_vision/Computer_Vision_with_Comet.ipynb @@ -61,7 +61,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml torch torchvision timm datasets h5py scipy scikit-learn \"pandas<2\" \"numpy<2\"" + "%pip install -U \"comet_ml>=3.44.0\" torch torchvision timm datasets h5py scipy scikit-learn \"pandas<2\" \"numpy<2\"" ] }, { @@ -86,7 +86,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-pytorch-image-classification-svhn\")\n", + "comet_ml.login(project_name=\"comet-example-pytorch-image-classification-svhn\")\n", "\n", "# Create the Comet Experiment for logging\n", "experiment = comet_ml.Experiment()" diff --git a/guides/get-started/Comet_Quickstart.ipynb b/guides/get-started/Comet_Quickstart.ipynb index 4daf4e3..f95a7b0 100644 --- a/guides/get-started/Comet_Quickstart.ipynb +++ b/guides/get-started/Comet_Quickstart.ipynb @@ -76,7 +76,7 @@ }, "outputs": [], "source": [ - "%pip install -U comet_ml \"numpy<2.0.0\"" + "%pip install -U \"comet_ml>=3.44.0\" \"numpy<2.0.0\"" ] }, { @@ -98,7 +98,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-intro-to-comet\")" + "comet_ml.login(project_name=\"comet-example-intro-to-comet\")" ] }, { diff --git a/guides/get-started/Image_Classification_with_Keras.ipynb b/guides/get-started/Image_Classification_with_Keras.ipynb index 7ab2506..fe4b7ed 100644 --- a/guides/get-started/Image_Classification_with_Keras.ipynb +++ b/guides/get-started/Image_Classification_with_Keras.ipynb @@ -1,18 +1,4 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", @@ -25,14 +11,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "DJnmqphuY2eI" }, + "outputs": [], "source": [ - "!pip install comet_ml --quiet" - ], - "execution_count": null, - "outputs": [] + "%pip install -U \"comet_ml>=3.44.0\"" + ] }, { "cell_type": "markdown", @@ -45,16 +31,16 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "HNQRM0U3caiY" }, + "outputs": [], "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"keras-image-classification\")" - ], - "execution_count": null, - "outputs": [] + "comet_ml.login(project_name=\"keras-image-classification\")" + ] }, { "cell_type": "markdown", @@ -67,18 +53,18 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "e-5rRYaUw5AF" }, + "outputs": [], "source": [ "from tensorflow import keras\n", "from tensorflow.keras.datasets import mnist\n", "from tensorflow.keras.models import Sequential\n", "from tensorflow.keras.layers import Dense, Dropout\n", "from tensorflow.keras.callbacks import EarlyStopping" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -91,15 +77,15 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "m-OWU2ynwp2u" }, + "outputs": [], "source": [ "# create an experiment with your api key\n", "experiment = comet_ml.Experiment()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -112,9 +98,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "YFbozHiJxTax" }, + "outputs": [], "source": [ "# the data, shuffled and split between train and test sets\n", "(x_train, y_train), (x_test, y_test) = mnist.load_data()\n", @@ -130,9 +118,7 @@ "\n", "print(x_train.shape[0], \"train samples\")\n", "print(x_test.shape[0], \"test samples\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -145,9 +131,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "xsZ8x-ntxCkV" }, + "outputs": [], "source": [ "# these will all get logged\n", "params = {\n", @@ -164,9 +152,7 @@ "# convert class vectors to binary class matrices\n", "y_train = keras.utils.to_categorical(y_train, num_classes)\n", "y_test = keras.utils.to_categorical(y_test, num_classes)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -179,9 +165,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "flH9VHctxjSB" }, + "outputs": [], "source": [ "model = Sequential()\n", "model.add(Dense(64, activation=\"relu\", input_shape=(784,)))\n", @@ -193,9 +181,7 @@ "model.compile(\n", " loss=\"categorical_crossentropy\", optimizer=params[\"optimizer\"], metrics=[\"accuracy\"]\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -208,15 +194,15 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "wtXRSEccyTEO" }, + "outputs": [], "source": [ "experiment.log_parameters(params)\n", "experiment.log_dataset_hash(x_train) # creates and logs a hash of your data" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -229,9 +215,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "Y8DNdezRxpng" }, + "outputs": [], "source": [ "# will log metrics with the prefix 'train_'\n", "model.fit(\n", @@ -242,9 +230,7 @@ " verbose=1,\n", " validation_data=(x_test, y_test),\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -266,17 +252,17 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "DwJRmFH8yYqI" }, + "outputs": [], "source": [ "loss, accuracy = model.evaluate(x_test, y_test)\n", "metrics = {\"loss\": loss, \"accuracy\": accuracy}\n", "with experiment.test():\n", " experiment.log_metrics(metrics)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -298,20 +284,22 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "jWpEX1gz8gNX" }, + "outputs": [], "source": [ "predictions = model.predict(x_test)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "h1hA_J0B7kNi" }, + "outputs": [], "source": [ "# Logs the image corresponding to the model prediction\n", "def index_to_example(index):\n", @@ -332,9 +320,7 @@ " title=\"Confusion Matrix: Evaluation\",\n", " file_name=\"confusion-matrix-eval.json\",\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -347,14 +333,28 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "z_5zd8Pby2-b" }, + "outputs": [], "source": [ "experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb b/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb index 189769e..60be42b 100644 --- a/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb +++ b/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb @@ -1,542 +1,179 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [], - "collapsed_sections": [ - "-cTh8OcaYvbU" - ], - "toc_visible": true + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "-cTh8OcaYvbU" + }, + "source": [ + "# Install Comet" + ] }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "M4EOdXIXYm9J" + }, + "outputs": [], + "source": [ + "%pip install -U \"comet_ml>=3.44.0\"" + ] }, - "language_info": { - "name": "python" + { + "cell_type": "markdown", + "metadata": { + "id": "IWjxrVhSYxOG" + }, + "source": [ + "# Initialize Comet\n", + "Set your API Key to enable logging to Comet from this notebook" + ] }, - "widgets": { - "application/vnd.jupyter.widget-state+json": { - "6ef35152dfa94fd28f335622a8d70060": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HBoxModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "HBoxView", - "_dom_classes": [], - "_model_name": "HBoxModel", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.5.0", - "box_style": "", - "layout": "IPY_MODEL_75da1f6c7fdb4247bed5492f19ef02b1", - "_model_module": "@jupyter-widgets/controls", - "children": [ - "IPY_MODEL_a492186217b74b99ab9a28d548949b51", - "IPY_MODEL_b79ed0fd8678443b8044defcf4070035", - "IPY_MODEL_7ba958da9a1f4bd3b286c8457b9a1e15" - ] - } - }, - "75da1f6c7fdb4247bed5492f19ef02b1": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": "row wrap", - "width": "100%", - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": "inline-flex", - "left": null - } + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, - "a492186217b74b99ab9a28d548949b51": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "HTMLView", - "style": "IPY_MODEL_1604a7da5a32433e8d94cf151e7bc762", - "_dom_classes": [], - "description": "", - "_model_name": "HTMLModel", - "placeholder": "โ€‹", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": "Done! Use 'show' commands to display/save. ", - "_view_count": null, - "_view_module_version": "1.5.0", - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_5e514536afb44c18a8941b78dca05fb2" - } + "id": "e0p8Dy37YzB6", + "outputId": "394f1bc0-a9d3-47f5-938c-fd90b5631188" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET INFO: Comet API key is valid\n" + ] + } + ], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login(project_name=\"comet-churn-prediction\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "K5vd4RpuY1JD" + }, + "source": [ + "# Download The Data using Artifacts" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "cA2-gecsoH7P" + }, + "source": [ + "[Comet Artifacts](https://www.comet.ml/site/artifacts/) help you conveniently track your datasets throughout the experimentation process. Here we're going to fetch the dataset Churn prediction using just two lines of code!\n", + "\n", + "You can take a look at the dataset [here](https://www.comet.ml/team-comet-ml/artifacts/telco-churn-dataset/1.0.0)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, - "b79ed0fd8678443b8044defcf4070035": { - "model_module": "@jupyter-widgets/controls", - "model_name": "FloatProgressModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "ProgressView", - "style": "IPY_MODEL_1d70e8affa5b40b7a623cb72e0f4e1f2", - "_dom_classes": [], - "description": "", - "_model_name": "FloatProgressModel", - "bar_style": "success", - "max": 1, - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": 1, - "_view_count": null, - "_view_module_version": "1.5.0", - "orientation": "horizontal", - "min": 0, - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_12cf675cc2a5410bb2771751c76eee65" - } + "id": "T79GP9cWY2r8", + "outputId": "da6f7b38-96bc-4a78-a5aa-c22bc4faf042" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET WARNING: As you are running in a Jupyter environment, you will need to call `experiment.end()` when finished to ensure all metrics and code are logged before exiting.\n", + "COMET INFO: Couldn't find a Git repository in '/content' and lookings in parents. You can override where Comet is looking for a Git Patch by setting the configuration `COMET_GIT_DIRECTORY`\n", + "COMET INFO: Experiment is live on comet.ml https://www.comet.ml/team-comet-ml/comet-churn-prediction/23731d13e7ee4a858490ad124a38ef82\n", + "\n" + ] + } + ], + "source": [ + "experiment = comet_ml.Experiment()\n", + "artifact = experiment.get_artifact(\"team-comet-ml/telco-churn-dataset:latest\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" }, - "7ba958da9a1f4bd3b286c8457b9a1e15": { - "model_module": "@jupyter-widgets/controls", - "model_name": "HTMLModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "HTMLView", - "style": "IPY_MODEL_54e4bd5cfafe447aab4a6486bd96e6e6", - "_dom_classes": [], - "description": "", - "_model_name": "HTMLModel", - "placeholder": "โ€‹", - "_view_module": "@jupyter-widgets/controls", - "_model_module_version": "1.5.0", - "value": " [100%] 00:01 -> (00:00 left)", - "_view_count": null, - "_view_module_version": "1.5.0", - "description_tooltip": null, - "_model_module": "@jupyter-widgets/controls", - "layout": "IPY_MODEL_3c6f27c83d4d4bc38db343ae05217ec8" - } + "id": "xxGTMsSxtkbI", + "outputId": "c3f57eba-e21e-4845-fb87-10835fcdf188" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET INFO: Artifact 'team-comet-ml/telco-churn-dataset:1.0.0' download has been started asynchronously\n", + "COMET INFO: Still downloading 1 file(s), remaining 1.69 MB/1.69 MB\n", + "COMET INFO: Artifact 'team-comet-ml/telco-churn-dataset:1.0.0' has been successfully downloaded\n" + ] }, - "1604a7da5a32433e8d94cf151e7bc762": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "StyleView", - "_model_name": "DescriptionStyleModel", - "description_width": "", - "_view_module": "@jupyter-widgets/base", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.2.0", - "_model_module": "@jupyter-widgets/controls" - } - }, - "5e514536afb44c18a8941b78dca05fb2": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } - }, - "1d70e8affa5b40b7a623cb72e0f4e1f2": { - "model_module": "@jupyter-widgets/controls", - "model_name": "ProgressStyleModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "StyleView", - "_model_name": "ProgressStyleModel", - "description_width": "", - "_view_module": "@jupyter-widgets/base", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.2.0", - "bar_color": null, - "_model_module": "@jupyter-widgets/controls" - } - }, - "12cf675cc2a5410bb2771751c76eee65": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": "2", - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } - }, - "54e4bd5cfafe447aab4a6486bd96e6e6": { - "model_module": "@jupyter-widgets/controls", - "model_name": "DescriptionStyleModel", - "model_module_version": "1.5.0", - "state": { - "_view_name": "StyleView", - "_model_name": "DescriptionStyleModel", - "description_width": "", - "_view_module": "@jupyter-widgets/base", - "_model_module_version": "1.5.0", - "_view_count": null, - "_view_module_version": "1.2.0", - "_model_module": "@jupyter-widgets/controls" - } - }, - "3c6f27c83d4d4bc38db343ae05217ec8": { - "model_module": "@jupyter-widgets/base", - "model_name": "LayoutModel", - "model_module_version": "1.2.0", - "state": { - "_view_name": "LayoutView", - "grid_template_rows": null, - "right": null, - "justify_content": null, - "_view_module": "@jupyter-widgets/base", - "overflow": null, - "_model_module_version": "1.2.0", - "_view_count": null, - "flex_flow": null, - "width": null, - "min_width": null, - "border": null, - "align_items": null, - "bottom": null, - "_model_module": "@jupyter-widgets/base", - "top": null, - "grid_column": null, - "overflow_y": null, - "overflow_x": null, - "grid_auto_flow": null, - "grid_area": null, - "grid_template_columns": null, - "flex": null, - "_model_name": "LayoutModel", - "justify_items": null, - "grid_row": null, - "max_height": null, - "align_content": null, - "visibility": null, - "align_self": null, - "height": null, - "min_height": null, - "padding": null, - "grid_auto_rows": null, - "grid_gap": null, - "max_width": null, - "order": null, - "_view_module_version": "1.2.0", - "grid_template_areas": null, - "object_position": null, - "object_fit": null, - "grid_auto_columns": null, - "margin": null, - "display": null, - "left": null - } + { + "data": { + "text/plain": [ + "Artifact(name='telco-churn-dataset', artifact_type='dataset', version=None, aliases=set(), version_tags=set())" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" } - } - } - }, - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "-cTh8OcaYvbU" - }, + ], "source": [ - "# Install Comet" + "artifact.download(\"./\")" ] }, - { - "cell_type": "code", - "metadata": { - "id": "M4EOdXIXYm9J" - }, - "source": [ - "!pip install comet_ml --quiet" - ], - "execution_count": null, - "outputs": [] - }, { "cell_type": "markdown", "metadata": { - "id": "IWjxrVhSYxOG" + "id": "3VEeKx2laVn6" }, "source": [ - "# Initialize Comet\n", - "Set your API Key to enable logging to Comet from this notebook" + "# Basic EDA and Dataset Profiling with Sweetviz" ] }, { "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "e0p8Dy37YzB6", - "outputId": "394f1bc0-a9d3-47f5-938c-fd90b5631188" - }, - "source": [ - "import comet_ml\n", - "\n", - "comet_ml.init(project_name=\"comet-churn-prediction\")" - ], "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stderr", - "text": [ - "COMET INFO: Comet API key is valid\n" - ] - } - ] - }, - { - "cell_type": "markdown", "metadata": { - "id": "K5vd4RpuY1JD" + "id": "pAzrJEL5aYMu" }, + "outputs": [], "source": [ - "# Download The Data using Artifacts" + "!pip install sweetviz --quiet" ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": { - "id": "cA2-gecsoH7P" + "id": "Uc03ALoRaaAR" }, + "outputs": [], "source": [ - "[Comet Artifacts](https://www.comet.ml/site/artifacts/) help you conveniently track your datasets throughout the experimentation process. Here we're going to fetch the dataset Churn prediction using just two lines of code!\n", + "import pandas as pd\n", + "import sweetviz\n", "\n", - "You can take a look at the dataset [here](https://www.comet.ml/team-comet-ml/artifacts/telco-churn-dataset/1.0.0)" + "df = pd.read_csv(\"./telco-churn-dataset.csv\", index_col=0)" ] }, { "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "T79GP9cWY2r8", - "outputId": "da6f7b38-96bc-4a78-a5aa-c22bc4faf042" - }, - "source": [ - "experiment = comet_ml.Experiment()\n", - "artifact = experiment.get_artifact(\"team-comet-ml/telco-churn-dataset:latest\")" - ], - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stderr", - "text": [ - "COMET WARNING: As you are running in a Jupyter environment, you will need to call `experiment.end()` when finished to ensure all metrics and code are logged before exiting.\n", - "COMET INFO: Couldn't find a Git repository in '/content' and lookings in parents. You can override where Comet is looking for a Git Patch by setting the configuration `COMET_GIT_DIRECTORY`\n", - "COMET INFO: Experiment is live on comet.ml https://www.comet.ml/team-comet-ml/comet-churn-prediction/23731d13e7ee4a858490ad124a38ef82\n", - "\n" - ] - } - ] - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "xxGTMsSxtkbI", - "outputId": "c3f57eba-e21e-4845-fb87-10835fcdf188" - }, - "source": [ - "artifact.download(\"./\")" - ], - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stderr", - "text": [ - "COMET INFO: Artifact 'team-comet-ml/telco-churn-dataset:1.0.0' download has been started asynchronously\n", - "COMET INFO: Still downloading 1 file(s), remaining 1.69 MB/1.69 MB\n", - "COMET INFO: Artifact 'team-comet-ml/telco-churn-dataset:1.0.0' has been successfully downloaded\n" - ] - }, - { - "output_type": "execute_result", - "data": { - "text/plain": [ - "Artifact(name='telco-churn-dataset', artifact_type='dataset', version=None, aliases=set(), version_tags=set())" - ] - }, - "metadata": {}, - "execution_count": 25 - } - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "3VEeKx2laVn6" - }, - "source": [ - "# Basic EDA and Dataset Profiling with Sweetviz" - ] - }, - { - "cell_type": "code", - "metadata": { - "id": "pAzrJEL5aYMu" - }, - "source": [ - "!pip install sweetviz --quiet" - ], - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "code", - "metadata": { - "id": "Uc03ALoRaaAR" - }, - "source": [ - "import pandas as pd\n", - "import sweetviz\n", - "\n", - "df = pd.read_csv(\"./telco-churn-dataset.csv\", index_col=0)" - ], "execution_count": null, - "outputs": [] - }, - { - "cell_type": "code", "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -558,26 +195,25 @@ "id": "Tl7SFsNypu69", "outputId": "11cfe3af-1b14-4653-bc06-09310011a585" }, - "source": [ - "report = sweetviz.analyze(df, target_feat=\"Churn Label\")\n", - "report.log_comet(experiment)" - ], - "execution_count": null, "outputs": [ { - "output_type": "display_data", "data": { "application/vnd.jupyter.widget-view+json": { "model_id": "6ef35152dfa94fd28f335622a8d70060", - "version_minor": 0, - "version_major": 2 + "version_major": 2, + "version_minor": 0 }, "text/plain": [ " | | [ 0%] 00:00 -> (? left)" ] }, - "metadata": {} + "metadata": {}, + "output_type": "display_data" } + ], + "source": [ + "report = sweetviz.analyze(df, target_feat=\"Churn Label\")\n", + "report.log_comet(experiment)" ] }, { @@ -600,6 +236,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -607,13 +244,8 @@ "id": "TtL4OdtonqW5", "outputId": "e7c3fe16-e3c5-4a5f-fad5-a231e1fdef8a" }, - "source": [ - "df.columns" - ], - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "Index(['CustomerID', 'Count', 'Country', 'State', 'City', 'Zip Code',\n", @@ -627,9 +259,13 @@ " dtype='object')" ] }, + "execution_count": 29, "metadata": {}, - "execution_count": 29 + "output_type": "execute_result" } + ], + "source": [ + "df.columns" ] }, { @@ -643,6 +279,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -650,13 +287,8 @@ "id": "1k0O4YvhvceP", "outputId": "39727ea7-e4d6-4c22-9ab3-2e3dc3c32671" }, - "source": [ - "df.dtypes" - ], - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "CustomerID object\n", @@ -695,9 +327,13 @@ "dtype: object" ] }, + "execution_count": 30, "metadata": {}, - "execution_count": 30 + "output_type": "execute_result" } + ], + "source": [ + "df.dtypes" ] }, { @@ -717,9 +353,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "3sYA_LPyvfu-" }, + "outputs": [], "source": [ "def convert_to_float(x):\n", " try:\n", @@ -731,15 +369,15 @@ "\n", "df[\"Total Charges\"] = df[\"Total Charges\"].apply(lambda x: convert_to_float(x))\n", "df.dropna(subset=[\"Total Charges\"], inplace=True)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "zU9ePgJq7qjA" }, + "outputs": [], "source": [ "y = df.pop(\"Churn Value\")\n", "X = df.drop(\n", @@ -755,9 +393,7 @@ " ],\n", " axis=1,\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -779,17 +415,18 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "4KAMJBlk_zOw" }, + "outputs": [], "source": [ "X_features = pd.get_dummies(X)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", @@ -798,13 +435,8 @@ "id": "5hLAXaANp20v", "outputId": "79992742-c211-4826-ec2a-db4eb57b07de" }, - "source": [ - "X_features.head()" - ], - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/html": [ "
\n", @@ -1345,9 +977,13 @@ "[5 rows x 1179 columns]" ] }, + "execution_count": 34, "metadata": {}, - "execution_count": 34 + "output_type": "execute_result" } + ], + "source": [ + "X_features.head()" ] }, { @@ -1361,18 +997,18 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "nIeGPpZQ0JZL" }, + "outputs": [], "source": [ "from sklearn.model_selection import train_test_split\n", "\n", "X_train, X_test, y_train, y_test = train_test_split(\n", " X_features, y, test_size=0.2, random_state=42\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -1385,6 +1021,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -1392,16 +1029,8 @@ "id": "WitZoZ1ndOoa", "outputId": "fec68dd8-0f77-45b9-ae12-835d2dd844f4" }, - "source": [ - "from sklearn.ensemble import RandomForestClassifier\n", - "\n", - "clf = RandomForestClassifier()\n", - "clf.fit(X_train, y_train)" - ], - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "RandomForestClassifier(bootstrap=True, ccp_alpha=0.0, class_weight=None,\n", @@ -1414,9 +1043,16 @@ " verbose=0, warm_start=False)" ] }, + "execution_count": 35, "metadata": {}, - "execution_count": 35 + "output_type": "execute_result" } + ], + "source": [ + "from sklearn.ensemble import RandomForestClassifier\n", + "\n", + "clf = RandomForestClassifier()\n", + "clf.fit(X_train, y_train)" ] }, { @@ -1448,6 +1084,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -1455,6 +1092,16 @@ "id": "vM4tZzxy79TG", "outputId": "ccc4e564-feee-449f-cd98-d6179126974e" }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{'0': {'precision': 0.9997591522157996, 'recall': 1.0, 'f1-score': 0.9998795616042394, 'support': 4151}, '1': {'precision': 1.0, 'recall': 0.9993215739484396, 'f1-score': 0.999660671869698, 'support': 1474}, 'accuracy': 0.9998222222222222, 'macro avg': {'precision': 0.9998795761078998, 'recall': 0.9996607869742198, 'f1-score': 0.9997701167369687, 'support': 5625}, 'weighted avg': {'precision': 0.999822265039606, 'recall': 0.9998222222222222, 'f1-score': 0.9998222027653569, 'support': 5625}}\n", + "{'0': {'precision': 0.8246869409660107, 'recall': 0.9110671936758893, 'f1-score': 0.8657276995305164, 'support': 1012}, '1': {'precision': 0.6885813148788927, 'recall': 0.5037974683544304, 'f1-score': 0.5818713450292397, 'support': 395}, 'accuracy': 0.7967306325515281, 'macro avg': {'precision': 0.7566341279224518, 'recall': 0.7074323310151598, 'f1-score': 0.7237995222798781, 'support': 1407}, 'weighted avg': {'precision': 0.786476761645178, 'recall': 0.7967306325515281, 'f1-score': 0.7860381046278835, 'support': 1407}}\n" + ] + } + ], "source": [ "from sklearn.metrics import classification_report\n", "\n", @@ -1473,27 +1120,16 @@ "\n", "with experiment.test():\n", " log_classification_report(y_test, clf.predict(X_test))" - ], - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "{'0': {'precision': 0.9997591522157996, 'recall': 1.0, 'f1-score': 0.9998795616042394, 'support': 4151}, '1': {'precision': 1.0, 'recall': 0.9993215739484396, 'f1-score': 0.999660671869698, 'support': 1474}, 'accuracy': 0.9998222222222222, 'macro avg': {'precision': 0.9998795761078998, 'recall': 0.9996607869742198, 'f1-score': 0.9997701167369687, 'support': 5625}, 'weighted avg': {'precision': 0.999822265039606, 'recall': 0.9998222222222222, 'f1-score': 0.9998222027653569, 'support': 5625}}\n", - "{'0': {'precision': 0.8246869409660107, 'recall': 0.9110671936758893, 'f1-score': 0.8657276995305164, 'support': 1012}, '1': {'precision': 0.6885813148788927, 'recall': 0.5037974683544304, 'f1-score': 0.5818713450292397, 'support': 395}, 'accuracy': 0.7967306325515281, 'macro avg': {'precision': 0.7566341279224518, 'recall': 0.7074323310151598, 'f1-score': 0.7237995222798781, 'support': 1407}, 'weighted avg': {'precision': 0.786476761645178, 'recall': 0.7967306325515281, 'f1-score': 0.7860381046278835, 'support': 1407}}\n" - ] - } ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "8VfmrSrYcj6h" }, - "source": [], - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] }, { "cell_type": "markdown", @@ -1506,9 +1142,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "ZUsq52bG04cA" }, + "outputs": [], "source": [ "import numpy as np\n", "from sklearn.metrics import precision_recall_curve\n", @@ -1518,12 +1156,11 @@ ")\n", "pr_df = pd.DataFrame([precision, recall, thresholds]).T\n", "pr_df.columns = [\"precision\", \"recall\", \"thresholds\"]" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -1531,15 +1168,8 @@ "id": "0bOPUuwD3wvc", "outputId": "8943e7ff-65d0-4adf-9b1f-dfd40f2d119d" }, - "source": [ - "experiment.log_table(\n", - " filename=\"precision-recall-data.csv\", tabular_data=pr_df, headers=True\n", - ")" - ], - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "{'api': 'https://www.comet.ml/api/rest/v2/experiment/asset/get-asset?assetId=55b49bb4a07a447499f8e73a0f9b4f68&experimentKey=f598691808cd450788e66c8e19d353a7',\n", @@ -1547,9 +1177,15 @@ " 'web': 'https://www.comet.ml/api/asset/download?assetId=55b49bb4a07a447499f8e73a0f9b4f68&experimentKey=f598691808cd450788e66c8e19d353a7'}" ] }, + "execution_count": 19, "metadata": {}, - "execution_count": 19 + "output_type": "execute_result" } + ], + "source": [ + "experiment.log_table(\n", + " filename=\"precision-recall-data.csv\", tabular_data=pr_df, headers=True\n", + ")" ] }, { @@ -1563,6 +1199,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -1570,21 +1207,8 @@ "id": "AhlY74C2fLOd", "outputId": "0bdf2c1d-aa3e-47a7-8b6a-476cb3425e70" }, - "source": [ - "def index_to_example(index):\n", - " return X_test.iloc[index, :][[\"CLTV\", \"Monthly Charges\", \"Total Charges\"]].to_json()\n", - "\n", - "\n", - "experiment.log_confusion_matrix(\n", - " y_test.tolist(),\n", - " clf.predict(X_test).tolist(),\n", - " index_to_example_function=index_to_example,\n", - ")" - ], - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "{'api': 'https://www.comet.ml/api/rest/v2/experiment/asset/get-asset?assetId=1aa491a9f9414927915e5f47147fadb2&experimentKey=f598691808cd450788e66c8e19d353a7',\n", @@ -1592,9 +1216,21 @@ " 'web': 'https://www.comet.ml/api/asset/download?assetId=1aa491a9f9414927915e5f47147fadb2&experimentKey=f598691808cd450788e66c8e19d353a7'}" ] }, + "execution_count": 20, "metadata": {}, - "execution_count": 20 + "output_type": "execute_result" } + ], + "source": [ + "def index_to_example(index):\n", + " return X_test.iloc[index, :][[\"CLTV\", \"Monthly Charges\", \"Total Charges\"]].to_json()\n", + "\n", + "\n", + "experiment.log_confusion_matrix(\n", + " y_test.tolist(),\n", + " clf.predict(X_test).tolist(),\n", + " index_to_example_function=index_to_example,\n", + ")" ] }, { @@ -1608,6 +1244,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -1615,14 +1252,10 @@ "id": "fDkoO27LGFJP", "outputId": "e8788d6e-9d13-49f1-eed1-6d71ac03ad67" }, - "source": [ - "experiment.end()" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stderr", + "output_type": "stream", "text": [ "COMET INFO: ---------------------------\n", "COMET INFO: Comet.ml Experiment Summary\n", @@ -1703,16 +1336,383 @@ "COMET INFO: The Python SDK has 3600 seconds to finish before aborting...\n" ] } + ], + "source": [ + "experiment.end()" ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "QKuRKijJ7ivO" }, - "source": [], - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "collapsed_sections": [ + "-cTh8OcaYvbU" + ], + "provenance": [], + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "12cf675cc2a5410bb2771751c76eee65": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": "2", + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "1604a7da5a32433e8d94cf151e7bc762": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "1d70e8affa5b40b7a623cb72e0f4e1f2": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "ProgressStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "ProgressStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "bar_color": null, + "description_width": "" + } + }, + "3c6f27c83d4d4bc38db343ae05217ec8": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "54e4bd5cfafe447aab4a6486bd96e6e6": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "DescriptionStyleModel", + "state": { + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "DescriptionStyleModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "StyleView", + "description_width": "" + } + }, + "5e514536afb44c18a8941b78dca05fb2": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": null, + "flex": null, + "flex_flow": null, + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": null + } + }, + "6ef35152dfa94fd28f335622a8d70060": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HBoxModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HBoxModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HBoxView", + "box_style": "", + "children": [ + "IPY_MODEL_a492186217b74b99ab9a28d548949b51", + "IPY_MODEL_b79ed0fd8678443b8044defcf4070035", + "IPY_MODEL_7ba958da9a1f4bd3b286c8457b9a1e15" + ], + "layout": "IPY_MODEL_75da1f6c7fdb4247bed5492f19ef02b1" + } + }, + "75da1f6c7fdb4247bed5492f19ef02b1": { + "model_module": "@jupyter-widgets/base", + "model_module_version": "1.2.0", + "model_name": "LayoutModel", + "state": { + "_model_module": "@jupyter-widgets/base", + "_model_module_version": "1.2.0", + "_model_name": "LayoutModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/base", + "_view_module_version": "1.2.0", + "_view_name": "LayoutView", + "align_content": null, + "align_items": null, + "align_self": null, + "border": null, + "bottom": null, + "display": "inline-flex", + "flex": null, + "flex_flow": "row wrap", + "grid_area": null, + "grid_auto_columns": null, + "grid_auto_flow": null, + "grid_auto_rows": null, + "grid_column": null, + "grid_gap": null, + "grid_row": null, + "grid_template_areas": null, + "grid_template_columns": null, + "grid_template_rows": null, + "height": null, + "justify_content": null, + "justify_items": null, + "left": null, + "margin": null, + "max_height": null, + "max_width": null, + "min_height": null, + "min_width": null, + "object_fit": null, + "object_position": null, + "order": null, + "overflow": null, + "overflow_x": null, + "overflow_y": null, + "padding": null, + "right": null, + "top": null, + "visibility": null, + "width": "100%" + } + }, + "7ba958da9a1f4bd3b286c8457b9a1e15": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_3c6f27c83d4d4bc38db343ae05217ec8", + "placeholder": "โ€‹", + "style": "IPY_MODEL_54e4bd5cfafe447aab4a6486bd96e6e6", + "value": " [100%] 00:01 -> (00:00 left)" + } + }, + "a492186217b74b99ab9a28d548949b51": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "HTMLModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "HTMLModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "HTMLView", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_5e514536afb44c18a8941b78dca05fb2", + "placeholder": "โ€‹", + "style": "IPY_MODEL_1604a7da5a32433e8d94cf151e7bc762", + "value": "Done! Use 'show' commands to display/save. " + } + }, + "b79ed0fd8678443b8044defcf4070035": { + "model_module": "@jupyter-widgets/controls", + "model_module_version": "1.5.0", + "model_name": "FloatProgressModel", + "state": { + "_dom_classes": [], + "_model_module": "@jupyter-widgets/controls", + "_model_module_version": "1.5.0", + "_model_name": "FloatProgressModel", + "_view_count": null, + "_view_module": "@jupyter-widgets/controls", + "_view_module_version": "1.5.0", + "_view_name": "ProgressView", + "bar_style": "success", + "description": "", + "description_tooltip": null, + "layout": "IPY_MODEL_12cf675cc2a5410bb2771751c76eee65", + "max": 1, + "min": 0, + "orientation": "horizontal", + "style": "IPY_MODEL_1d70e8affa5b40b7a623cb72e0f4e1f2", + "value": 1 + } + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/guides/manage_data/A_Guide_to_Remote_Artifacts.ipynb b/guides/manage_data/A_Guide_to_Remote_Artifacts.ipynb index 4f3a38c..d7ae0a8 100644 --- a/guides/manage_data/A_Guide_to_Remote_Artifacts.ipynb +++ b/guides/manage_data/A_Guide_to_Remote_Artifacts.ipynb @@ -28,7 +28,7 @@ }, "outputs": [], "source": [ - "%pip install --upgrade comet_ml" + "%pip install --upgrade \"comet_ml>=3.44.0\"" ] }, { @@ -53,7 +53,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"remote-artifacts\")" + "comet_ml.login(project_name=\"remote-artifacts\")" ] }, { diff --git a/guides/manage_data/Introduction_to_Artifacts.ipynb b/guides/manage_data/Introduction_to_Artifacts.ipynb index 54ce8d5..6c0d98b 100644 --- a/guides/manage_data/Introduction_to_Artifacts.ipynb +++ b/guides/manage_data/Introduction_to_Artifacts.ipynb @@ -50,7 +50,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml pandas scikit-learn joblib" + "%pip install -U \"comet_ml>=3.44.0\" pandas scikit-learn joblib" ] }, { @@ -63,7 +63,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"guide-artifacts-demo\")" + "comet_ml.login(project_name=\"guide-artifacts-demo\")" ] }, { diff --git a/guides/tracking-ml-training/Comet_in_Notebooks.ipynb b/guides/tracking-ml-training/Comet_in_Notebooks.ipynb index 45f2953..f385ac9 100644 --- a/guides/tracking-ml-training/Comet_in_Notebooks.ipynb +++ b/guides/tracking-ml-training/Comet_in_Notebooks.ipynb @@ -1,18 +1,4 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", @@ -26,14 +12,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "bjfA7OqbUvc4" }, + "outputs": [], "source": [ - "!pip install comet_ml --quiet" - ], - "execution_count": null, - "outputs": [] + "%pip install -U \"comet_ml>=3.44.0\"" + ] }, { "cell_type": "markdown", @@ -46,16 +32,16 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "-frLwX-YUzDn" }, + "outputs": [], "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-in-notebooks\")" - ], - "execution_count": null, - "outputs": [] + "comet_ml.login(project_name=\"comet-in-notebooks\")" + ] }, { "cell_type": "markdown", @@ -68,17 +54,17 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "Jw9kxe09Vf6C" }, + "outputs": [], "source": [ "experiment = comet_ml.Experiment()\n", "\n", "for idx, value in enumerate(range(0, 100, 10)):\n", " experiment.log_metric(\"accuracy\", value / 100, step=idx)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -91,14 +77,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "fcj_fe3dV5jN" }, + "outputs": [], "source": [ "experiment.display(tab=\"charts\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -111,14 +97,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "kfSiNZEZVz4Y" }, + "outputs": [], "source": [ "experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -131,23 +117,37 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "tBbLw06mWfal" }, + "outputs": [], "source": [ "experiment.display(tab=\"code\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "drpje33JXHXN" }, - "source": [], - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/annoy/annoy_example.py b/integrations/annoy/annoy_example.py index a9f0a53..6991d0d 100644 --- a/integrations/annoy/annoy_example.py +++ b/integrations/annoy/annoy_example.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- import random import comet_ml @@ -6,7 +7,7 @@ # Use this if you are using the Cloud version of Comet.ml # Comment this line if you are using a on-premise version of Comet.ml -comet_ml.init() +comet_ml.login() # Uncomment this line if you are using a on-premise version of Comet.ml # comet_ml.init_onprem() diff --git a/integrations/annoy/requirements.txt b/integrations/annoy/requirements.txt index 09d0646..b198caf 100644 --- a/integrations/annoy/requirements.txt +++ b/integrations/annoy/requirements.txt @@ -1,2 +1,2 @@ annoy -comet_ml +comet_ml>=3.44.0 diff --git a/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb b/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb index f426d2c..34ed5c3 100644 --- a/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb +++ b/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb @@ -1,182 +1,183 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "oDqA6MrBfXal" + }, + "source": [ + "![comet-banner.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM4AAABaCAYAAADw6GmRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABhwSURBVHgB7V1bbBzXef7PmVlSti5eASkatAW8cvuQGK5EPRSI3TpcvjgPQSDKTorCTcxVCksuClRUX1K0kbhS0hZ9MoWiaGXD5TIJ3AKJbeohD30ouEwvSRGkWhVFW6BBuUIuShxVXJOSRYk75/T//3NmdmZ3Zi/kUhLp84HDuZ1zZnb2fPNfz1kABwcHBwcHBwcHBwcHBwcHBwcHh8Eg4AFiOV/M56D5uFZQFFIUtNYFPFwQWuRx/bhO3l8Ddxpa6DooaICGmhai5m8EtV9Y/5dr4OBwH3HfifOD/NPjeNkiCFwAxnAbSaJbBXT7XYnYQd1x/I4UsCqD5VWpqxsClj7xk+/Mg4PDNuO+EIcki++vnxZSllC6FMyV8dJat+6CtvkYJDnSzhtcK1yteBre8wA2sKKmihr/FG9fg0CVP/EzRyCH7cO2Euf6h58eD0CXWcKEiMgiWvshieLrlHN3hIb/y2l4X1iyKGYNMGm4WSm4KOpzSKL52/dGzhxvVBvg4DBkbAtxrv8SEUaVUUIUo6u0SY3o8jpmyUTnbEG7T4S56Wt9hwUSk4RJw4RBAmltJRUdM+dxYWLVbt/LTTjyOAwbPgwR1wtjhQByc0oHxeggywZhNK8ONcxsCPtfg25tUeeXADc9pVckHzIc04Y8+MfNknrGVeiQZHWNT5As0lKMPTq6MYPnz4CDwxAxNInz4yd+7bSWqJYZj1gLcdUrvh9X2XTM6Ldlb0sN70rkBRjpoa1EYZZoEiZID6uqhRInWsdsHoHs04GaeO7Gt5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] }, - "cells": [ - { - "cell_type": "markdown", - "source": [ - "![comet-banner.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM4AAABaCAYAAADw6GmRAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABhwSURBVHgB7V1bbBzXef7PmVlSti5eASkatAW8cvuQGK5EPRSI3TpcvjgPQSDKTorCTcxVCksuClRUX1K0kbhS0hZ9MoWiaGXD5TIJ3AKJbeohD30ouEwvSRGkWhVFW6BBuUIuShxVXJOSRYk75/T//3NmdmZ3Zi/kUhLp84HDuZ1zZnb2fPNfz1kABwcHBwcHBwcHBwcHBwcHBwcHh8Eg4AFiOV/M56D5uFZQFFIUtNYFPFwQWuRx/bhO3l8Ddxpa6DooaICGmhai5m8EtV9Y/5dr4OBwH3HfifOD/NPjeNkiCFwAxnAbSaJbBXT7XYnYQd1x/I4UsCqD5VWpqxsClj7xk+/Mg4PDNuO+EIcki++vnxZSllC6FMyV8dJat+6CtvkYJDnSzhtcK1yteBre8wA2sKKmihr/FG9fg0CVP/EzRyCH7cO2Euf6h58eD0CXWcKEiMgiWvshieLrlHN3hIb/y2l4X1iyKGYNMGm4WSm4KOpzSKL52/dGzhxvVBvg4DBkbAtxrv8SEUaVUUIUo6u0SY3o8jpmyUTnbEG7T4S56Wt9hwUSk4RJw4RBAmltJRUdM+dxYWLVbt/LTTjyOAwbPgwR1wtjhQByc0oHxeggywZhNK8ONcxsCPtfg25tUeeXADc9pVckHzIc04Y8+MfNknrGVeiQZHWNT5As0lKMPTq6MYPnz4CDwxAxNInz4yd+7bSWqJYZj1gLcdUrvh9X2XTM6Ldlb0sN70rkBRjpoa1EYZZoEiZID6uqhRInWsdsHoHs04GaeO7Gt5fAwWFI2LLEuf4RlDKBmNNCFY3qpRJSxUgBZQkRihwFkZoGOuEcUGTHSKXX7GmtSJQQAbAdiWRhYaSB19KIMkFOATyFXDOXAm5Po8kj8IAGT5bxyAQ4OAwJW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aXYIqzhQXkyVYJ0A0dL8OksedxKdC2/laXGI4hDZGsBBuwo1PjHXY/0r1qAjJTrlm6jEJNtQ8nIHIkvWOT7XWD7rltjYztBHQN3kHp5LxwDg8UqcSx9ks55VRDkFftk3BNds5VUI/bKjplvt92x4H+dxjXV1Ey/Sc8Lo6gGmeGXE+j25oTQ0l9Q6LMYbljsUaq4qiziRweLLoGQNGVPJZTqJIB/1QeDZ+ejY8E1f8EU4FG20ZDTXowK349dg7VsiDpTat7HhTDMkQYiI8/kTApDkNiAm8kDQ1hKAIRdgwOgoPDQ4JtzRxA1a2gfB781pBNmE9IpFrHTNxVJEfCzY3kIruHfhdzFiXSGXBweEiwrcTpBiRO+5CFDuI4ODys6JlyMwyQMc+2zFV4lewZPpgcv98A+8vHtuxUVG7QaxmbyGVgO+wMUO4ZpdE0v4Ud95+TnZ47c40nOKJlOTp+BeNFV6AU95LReVtuJc17Zh0Gi0TCjHM67ZyDwzAx6NzRqaCYTiCi0aBjQcCpOnG1K06AQriB3rFqSnP52JoCre1lirxoJt35uIcNt+t47CCqfM7r5rCtGApxVOcUUcW2q5ShySQoQK8pluhnRxQHTitIgGpKiQU8R5na9TSCOFe1w44BuaVRRdOxZS61XJvqpf8DjrDaZdSzuSy7xtpHXacm5TLxeI+DwzZiaF61KKaDqhW6ni/2Stzk3DQBVyCpxpEUOZQoR2QI03kkxoEOdyaX2rbIdnKeOYf7ggfnjiYDXqfkpLWRg6QSqnlV3hmBsazkTySPmXrIqWoO9wFDsXGGiiBJZvEUXEVSsBRC0mSSAglTAweH+4QHJ3Eo1qI6jP8OVc3B4WHEfQmApoHVMZmYH7iKqlgRHBwcHBwcHBwcHBwcHBwcHBwcHBwcdiH+Hxza7B+yWutWAAAAAElFTkSuQmCC)" - ], - "metadata": { - "id": "oDqA6MrBfXal" - } - }, - { - "cell_type": "markdown", - "source": [ - "[Snowflake](https://www.snowflake.com/en/) is a data platform that offers cloud-based data storage and analytics services that serve a wide range of applications such as data warehouses and data lakes, data engineering, and data science and ML workloads.\n", - "\n", - "Data science and machine learning teams use [Comet](https://www.comet.com?utm_source=github.com&utm_medium=referral&utm_campaign=comet_notebook&utm_content=snowflake)โ€™s ML platform to track, compare, explain, and optimize their models across the complete ML lifecycle โ€“ from managing experiments to monitoring models in production.\n", - "\n", - "Comet works with Jupyter Notebooks and Scripts and most importantly it is 100% free to [get started](https://www.comet.com/signup?utm_source=github.com&utm_medium=referral&utm_campaign=comet_notebook&utm_content=snowflake)!" - ], - "metadata": { - "id": "IacY50E8fj7p" - } - }, - { - "cell_type": "code", - "source": [], - "metadata": { - "id": "tQBQd3L0c_a_" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Install Dependencies" - ], - "metadata": { - "id": "ZjBkTgW-ih5e" - } - }, - { - "cell_type": "code", - "source": [ - "%pip install comet_ml snowflake-snowpark-python pandas" - ], - "metadata": { - "id": "jztHMyUGfitU" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Prerequisites\n", - "\n", - "In order to run this example, you will need a [Comet API key](https://www.comet.com/signup?utm_source=github.com&utm_medium=referral&utm_campaign=comet_notebook&utm_content=snowflake) and a [Snowflake Account](https://www.snowflake.com/login/)" - ], - "metadata": { - "id": "0-8vTHXQiyfM" - } - }, - { - "cell_type": "markdown", - "source": [ - "# Initialize Comet" - ], - "metadata": { - "id": "Vl7tvoeQjBqf" - } - }, - { - "cell_type": "code", - "source": [ - "import comet_ml\n", - "comet_ml.init(project_name=\"comet-example-snowflake\")" - ], - "metadata": { - "id": "V-upQnd_i0Ly" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Start a Snowflake Session" - ], - "metadata": { - "id": "B1UEegaL3lyO" - } - }, - { - "cell_type": "code", - "source": [ - "from snowflake.snowpark import Session\n", - "\n", - "# Configure Snowflake and Comet\n", - "connection_parameters = {\n", - " \"account\": \"Your Account Name\",\n", - " \"user\": \"Your User Name\",\n", - " \"password\": \"Your Snowflake Password\",\n", - " \"database\": \"SNOWFLAKE_SAMPLE_DATA\",\n", - "}\n", - "\n", - "session = Session.builder.configs(connection_parameters).create()" - ], - "metadata": { - "id": "HmBjmbMX3vmB" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Run a Query and Log the resulting dataset information as a Comet Artifact" - ], - "metadata": { - "id": "jPp4tW4M36MC" - } - }, - { - "cell_type": "code", - "source": [ - "experiment = comet_ml.Experiment(project_name=\"comet-snowflake\")\n", - "df = session.sql(\"select * from TPCH_SF10.ORDERS limit 1000\")\n", - "\n", - "comet_snowflake.log_snowpark_dataframe_v1(\n", - " experiment, \"my-snowflake-dataframe\", df, log_sample=True, sample_size=50\n", - ")\n", - "\n", - "experiment.end()" - ], - "metadata": { - "id": "6I0CW6Ul4AW-" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Fetch the Query Information from the logged Artifact" - ], - "metadata": { - "id": "fAsG1nAm4J6p" - } - }, - { - "cell_type": "code", - "source": [ - "experiment = comet_ml.Experiment(project_name=\"comet-snowflake\")\n", - "query = comet_snowflake.get_artifact_v1(\n", - " experiment, \"snowflake-dataframe\", \"team-comet-ml\"\n", - ")\n", - "df = session.sql(query)" - ], - "metadata": { - "id": "V1tITCI14Nd7" - }, - "execution_count": null, - "outputs": [] - } - ] -} \ No newline at end of file + { + "cell_type": "markdown", + "metadata": { + "id": "IacY50E8fj7p" + }, + "source": [ + "[Snowflake](https://www.snowflake.com/en/) is a data platform that offers cloud-based data storage and analytics services that serve a wide range of applications such as data warehouses and data lakes, data engineering, and data science and ML workloads.\n", + "\n", + "Data science and machine learning teams use [Comet](https://www.comet.com?utm_source=github.com&utm_medium=referral&utm_campaign=comet_notebook&utm_content=snowflake)โ€™s ML platform to track, compare, explain, and optimize their models across the complete ML lifecycle โ€“ from managing experiments to monitoring models in production.\n", + "\n", + "Comet works with Jupyter Notebooks and Scripts and most importantly it is 100% free to [get started](https://www.comet.com/signup?utm_source=github.com&utm_medium=referral&utm_campaign=comet_notebook&utm_content=snowflake)!" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "tQBQd3L0c_a_" + }, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "ZjBkTgW-ih5e" + }, + "source": [ + "# Install Dependencies" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "jztHMyUGfitU" + }, + "outputs": [], + "source": [ + "%pip install -U \"comet_ml>=3.44.0\" snowflake-snowpark-python pandas" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "0-8vTHXQiyfM" + }, + "source": [ + "# Prerequisites\n", + "\n", + "In order to run this example, you will need a [Comet API key](https://www.comet.com/signup?utm_source=github.com&utm_medium=referral&utm_campaign=comet_notebook&utm_content=snowflake) and a [Snowflake Account](https://www.snowflake.com/login/)" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "Vl7tvoeQjBqf" + }, + "source": [ + "# Initialize Comet" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "V-upQnd_i0Ly" + }, + "outputs": [], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login(project_name=\"comet-example-snowflake\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "B1UEegaL3lyO" + }, + "source": [ + "# Start a Snowflake Session" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "HmBjmbMX3vmB" + }, + "outputs": [], + "source": [ + "from snowflake.snowpark import Session\n", + "\n", + "# Configure Snowflake and Comet\n", + "connection_parameters = {\n", + " \"account\": \"Your Account Name\",\n", + " \"user\": \"Your User Name\",\n", + " \"password\": \"Your Snowflake Password\",\n", + " \"database\": \"SNOWFLAKE_SAMPLE_DATA\",\n", + "}\n", + "\n", + "session = Session.builder.configs(connection_parameters).create()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jPp4tW4M36MC" + }, + "source": [ + "# Run a Query and Log the resulting dataset information as a Comet Artifact" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "6I0CW6Ul4AW-" + }, + "outputs": [], + "source": [ + "experiment = comet_ml.Experiment(project_name=\"comet-snowflake\")\n", + "df = session.sql(\"select * from TPCH_SF10.ORDERS limit 1000\")\n", + "\n", + "comet_snowflake.log_snowpark_dataframe_v1(\n", + " experiment, \"my-snowflake-dataframe\", df, log_sample=True, sample_size=50\n", + ")\n", + "\n", + "experiment.end()" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "fAsG1nAm4J6p" + }, + "source": [ + "# Fetch the Query Information from the logged Artifact" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "V1tITCI14Nd7" + }, + "outputs": [], + "source": [ + "experiment = comet_ml.Experiment(project_name=\"comet-snowflake\")\n", + "query = comet_snowflake.get_artifact_v1(\n", + " experiment, \"snowflake-dataframe\", \"team-comet-ml\"\n", + ")\n", + "df = session.sql(query)" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb b/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb index cad9da0..9d56c8a 100644 --- a/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb +++ b/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb @@ -57,9 +57,9 @@ }, "outputs": [], "source": [ - "import comet_ml\n", + "import comet_llm\n", "\n", - "comet_ml.init(project_name=\"comet-example-llm-hello-world\")" + "comet_llm.init(project_name=\"comet-example-llm-hello-world\")" ] }, { diff --git a/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb b/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb index f59813c..128b622 100644 --- a/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb +++ b/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb @@ -37,7 +37,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -59,7 +59,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-alpaca-lora-finetuning\")" + "comet_ml.login(project_name=\"comet-example-alpaca-lora-finetuning\")" ] }, { diff --git a/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb b/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb index 359ed2f..df25b06 100644 --- a/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb +++ b/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb @@ -55,7 +55,7 @@ }, "outputs": [], "source": [ - "%pip install -U comet_ml gradio altair torch torchvision \"transformers<4.40.0\" requests Pillow" + "%pip install -U \"comet_ml>=3.44.0\" gradio altair torch torchvision \"transformers<4.40.0\" requests Pillow" ] }, { @@ -78,7 +78,7 @@ "import comet_ml\n", "import gradio as gr\n", "\n", - "comet_ml.init(project_name=\"comet-example-gradio-notebook\")" + "comet_ml.login(project_name=\"comet-example-gradio-notebook\")" ] }, { diff --git a/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb b/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb index 3b18abf..ba9e72a 100644 --- a/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb +++ b/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb @@ -42,7 +42,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml torch \"transformers<4.40.0\" \"gradio>=4.0\" shap" + "%pip install -U \"comet_ml>=3.44.0\" torch \"transformers<4.40.0\" \"gradio>=4.0\" shap" ] }, { @@ -68,7 +68,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-gradio-inference\")" + "comet_ml.login(project_name=\"comet-example-gradio-inference\")" ] }, { diff --git a/integrations/model-evaluation/nerfstudio/notebooks/Comet_NerfStudio_sitcoms3d_evaluate_model.ipynb b/integrations/model-evaluation/nerfstudio/notebooks/Comet_NerfStudio_sitcoms3d_evaluate_model.ipynb index 39243ac..0eb7213 100644 --- a/integrations/model-evaluation/nerfstudio/notebooks/Comet_NerfStudio_sitcoms3d_evaluate_model.ipynb +++ b/integrations/model-evaluation/nerfstudio/notebooks/Comet_NerfStudio_sitcoms3d_evaluate_model.ipynb @@ -38,7 +38,7 @@ "# Installing TinyCuda\n", "%cd /content/\n", "!gdown \"https://drive.google.com/u/1/uc?id=1-7x7qQfB7bIw2zV4Lr6-yhvMpjXC84Q5&confirm=t\"\n", - "!pip install tinycudann-1.7-cp310-cp310-linux_x86_64.whl" + "%pip install tinycudann-1.7-cp310-cp310-linux_x86_64.whl" ] }, { @@ -51,7 +51,7 @@ "source": [ "# Install nerfstudio\n", "%cd /content/\n", - "!pip install git+https://github.com/nerfstudio-project/nerfstudio" + "%pip install -U git+https://github.com/nerfstudio-project/nerfstudio" ] }, { @@ -77,7 +77,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init()" + "comet_ml.login()" ] }, { diff --git a/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb b/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb index ebc3290..0ed7cb3 100644 --- a/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb +++ b/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb @@ -1,103 +1,74 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "display_name": "Python 3", - "name": "python3" - } - }, "cells": [ { "cell_type": "markdown", - "source": [ - "# Install Comet" - ], "metadata": { "id": "re1sfMFZsui6" - } + }, + "source": [ + "# Install Comet and dependencies" + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "l2pryucSqLOS" }, + "outputs": [], "source": [ - "!pip install --upgrade comet_ml --quiet" - ], - "execution_count": null, - "outputs": [] + "%pip install -U \"comet_ml>=3.44.0\" tensorflow-model-analysis" + ] }, { "cell_type": "markdown", - "source": [ - "# Install Dependencies" - ], - "metadata": { - "id": "l5uZf2ppssOf" - } - }, - { - "cell_type": "code", "metadata": { - "id": "dWTbGtU2HkZA" + "id": "vNAfoInQsxXz" }, - "source": [ - "!pip install tensorflow-model-analysis" - ], - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", "source": [ "# Initialize Comet" - ], - "metadata": { - "id": "vNAfoInQsxXz" - } + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "tMFDWlcEHmEo" }, + "outputs": [], "source": [ "import comet_ml\n", "\n", - "comet_ml.init()" - ], - "execution_count": null, - "outputs": [] + "comet_ml.login()" + ] }, { "cell_type": "markdown", - "source": [ - "# Fetch Tensorflow Model Analysis Data" - ], "metadata": { "id": "8BP3xQk3szXf" - } + }, + "source": [ + "# Fetch Tensorflow Model Analysis Data" + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "yYhrTG1kffZB" }, + "outputs": [], "source": [ "import tensorflow_model_analysis as tfma" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "qhnrUpHsWjlZ" }, + "outputs": [], "source": [ "# Get the Data\n", "\n", @@ -118,24 +89,24 @@ "\n", "print(\"Here's what we downloaded:\")\n", "!ls -R {BASE_DIR}" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Setup TFMA Data Schema" - ], "metadata": { "id": "dmmmSLCAtDZy" - } + }, + "source": [ + "# Setup TFMA Data Schema" + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "PLRNn-H8Wmmq" }, + "outputs": [], "source": [ "# Setup Data Schema\n", "\n", @@ -148,24 +119,24 @@ "schema = schema_pb2.Schema()\n", "contents = file_io.read_file_to_string(SCHEMA)\n", "schema = text_format.Parse(contents, schema)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Encode Data to TFRecords Format" - ], "metadata": { "id": "-V5tOHQyuWXE" - } + }, + "source": [ + "# Encode Data to TFRecords Format" + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "93uAo29pW4dJ" }, + "outputs": [], "source": [ "# Encode Data to TFRecords format using the Schema\n", "\n", @@ -202,24 +173,24 @@ " writer.write(example.SerializeToString())\n", "\n", "!ls {tfrecord_file}" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Setup TFMA Evaluation Config and Run the Analysis" - ], "metadata": { "id": "fAgYPsd1uczE" - } + }, + "source": [ + "# Setup TFMA Evaluation Config and Run the Analysis" + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "6q1RGsX5XAmy" }, + "outputs": [], "source": [ "import tensorflow_model_analysis as tfma\n", "\n", @@ -286,24 +257,24 @@ " data_location=tfrecord_file,\n", " output_path=keras_output_path,\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Log TFMA Visualizations to Comet" - ], "metadata": { "id": "UwifkpNwulHg" - } + }, + "source": [ + "# Log TFMA Visualizations to Comet" + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "UuHkdVTzrJdg" }, + "outputs": [], "source": [ "%env COMET_AUTO_LOG_TFMA=1\n", "\n", @@ -315,18 +286,27 @@ "tfma.view.render_plot(results)\n", "\n", "experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", - "source": [], + "execution_count": null, "metadata": { "id": "bLvy5CTXuoni" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-optimization/comet-optimizer/notebooks/Comet_Optimizer_Keras.ipynb b/integrations/model-optimization/comet-optimizer/notebooks/Comet_Optimizer_Keras.ipynb index 0cb865d..3dc0878 100644 --- a/integrations/model-optimization/comet-optimizer/notebooks/Comet_Optimizer_Keras.ipynb +++ b/integrations/model-optimization/comet-optimizer/notebooks/Comet_Optimizer_Keras.ipynb @@ -1,22 +1,8 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - }, - "accelerator": "GPU" - }, "cells": [ { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -24,14 +10,10 @@ "id": "u6N22Dmnat1a", "outputId": "f366c559-3a79-475f-ae44-3494c35bbeb9" }, - "source": [ - "!pip install comet_ml --quiet" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "\u001b[?25l\r\u001b[K |โ–ˆ | 10 kB 16.2 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ– | 20 kB 17.8 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–Ž | 30 kB 19.8 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ– | 40 kB 19.7 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œ | 51 kB 10.3 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹ | 61 kB 11.7 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹ | 71 kB 11.7 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Š | 81 kB 12.8 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‰ | 92 kB 13.1 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 102 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 112 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 122 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 133 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Ž | 143 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 153 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œ | 163 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹ | 174 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Š | 184 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Š | 194 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‰ | 204 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 215 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ | 225 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 235 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Ž | 245 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Ž | 256 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ– | 266 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Œ | 276 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‹ | 286 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Š| 296 kB 10.9 MB/s eta 0:00:01\r\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 299 kB 10.9 MB/s \n", "\u001b[K |โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 54 kB 1.8 MB/s \n", @@ -40,6 +22,9 @@ "\u001b[?25h Building wheel for configobj (setup.py) ... \u001b[?25l\u001b[?25hdone\n" ] } + ], + "source": [ + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -51,6 +36,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -58,12 +44,6 @@ "id": "eKXK0Irvaw2h", "outputId": "76cd6f37-a4dd-4c54-c82f-5808526318e9" }, - "source": [ - "import comet_ml\n", - "\n", - "comet_ml.init(project_name=\"comet-optimizer\")" - ], - "execution_count": null, "outputs": [ { "name": "stdout", @@ -75,17 +55,23 @@ ] }, { - "output_type": "stream", "name": "stderr", + "output_type": "stream", "text": [ "COMET INFO: Comet API key is valid\n", "COMET INFO: Comet API key saved in /root/.comet.config\n" ] } + ], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login(project_name=\"comet-optimizer\")" ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -93,6 +79,16 @@ "id": "X5sQWU3BapLH", "outputId": "1d9e52b6-111b-40c7-9502-03b2ad2108ec" }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "60000 train samples\n", + "10000 test samples\n" + ] + } + ], "source": [ "from tensorflow.keras.datasets import mnist\n", "from tensorflow.keras.layers import Dense\n", @@ -160,21 +156,11 @@ "\n", "# Get the dataset:\n", "x_train, y_train, x_test, y_test = get_dataset()" - ], - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stdout", - "text": [ - "60000 train samples\n", - "10000 test samples\n" - ] - } ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -182,6 +168,16 @@ "id": "TOtpiuGZcBD8", "outputId": "b1099ad7-c479-41f5-c8d4-4eca75e57fa1" }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET INFO: COMET_OPTIMIZER_ID=5d81d806b4c947d2ae8741bb8c21c1c0\n", + "COMET INFO: Using optimizer config: {'algorithm': 'bayes', 'configSpaceSize': 'infinite', 'endTime': None, 'id': '5d81d806b4c947d2ae8741bb8c21c1c0', 'lastUpdateTime': None, 'maxCombo': 10, 'name': 'Optimize MNIST Network', 'parameters': {'batch_size': {'type': 'discrete', 'values': [64, 128, 256]}, 'first_layer_units': {'mu': 500, 'scalingType': 'normal', 'sigma': 50, 'type': 'integer'}}, 'predictor': None, 'spec': {'gridSize': 10, 'maxCombo': 10, 'metric': 'loss', 'minSampleSize': 100, 'objective': 'minimize', 'retryAssignLimit': 0, 'retryLimit': 1000}, 'startTime': 24021673633, 'state': {'mode': None, 'seed': None, 'sequence': [], 'sequence_i': 0, 'sequence_pid': None, 'sequence_retry': 0, 'sequence_retry_count': 0}, 'status': 'running', 'suggestion_count': 0, 'trials': 1, 'version': '2.0.1'}\n" + ] + } + ], "source": [ "# The optimization config:\n", "config = {\n", @@ -201,24 +197,15 @@ "}\n", "\n", "opt = comet_ml.Optimizer(config)" - ], - "execution_count": null, - "outputs": [ - { - "output_type": "stream", - "name": "stderr", - "text": [ - "COMET INFO: COMET_OPTIMIZER_ID=5d81d806b4c947d2ae8741bb8c21c1c0\n", - "COMET INFO: Using optimizer config: {'algorithm': 'bayes', 'configSpaceSize': 'infinite', 'endTime': None, 'id': '5d81d806b4c947d2ae8741bb8c21c1c0', 'lastUpdateTime': None, 'maxCombo': 10, 'name': 'Optimize MNIST Network', 'parameters': {'batch_size': {'type': 'discrete', 'values': [64, 128, 256]}, 'first_layer_units': {'mu': 500, 'scalingType': 'normal', 'sigma': 50, 'type': 'integer'}}, 'predictor': None, 'spec': {'gridSize': 10, 'maxCombo': 10, 'metric': 'loss', 'minSampleSize': 100, 'objective': 'minimize', 'retryAssignLimit': 0, 'retryLimit': 1000}, 'startTime': 24021673633, 'state': {'mode': None, 'seed': None, 'sequence': [], 'sequence_i': 0, 'sequence_pid': None, 'sequence_retry': 0, 'sequence_retry_count': 0}, 'status': 'running', 'suggestion_count': 0, 'trials': 1, 'version': '2.0.1'}\n" - ] - } ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "nvIbiv1ZcDQo" }, + "outputs": [], "source": [ "for experiment in opt.get_experiments():\n", " # Log parameters, or others:\n", @@ -235,18 +222,31 @@ "\n", " # Optionally, end the experiment:\n", " experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "Q0Pz-LtqLqLo" }, - "source": [], - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] } - ] -} \ No newline at end of file + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb b/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb index f8a4369..0d60406 100644 --- a/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb +++ b/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb @@ -44,7 +44,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml \"ray[tune]\"" + "%pip install -U \"comet_ml>=3.44.0\" \"ray[tune]\"" ] }, { @@ -67,7 +67,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-ray-tune-hello-world\")" + "comet_ml.login(project_name=\"comet-example-ray-tune-hello-world\")" ] }, { diff --git a/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb b/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb index 39f3afe..fbe4780 100644 --- a/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb +++ b/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb @@ -46,7 +46,7 @@ }, "outputs": [], "source": [ - "%pip install \"comet_ml>=3.31.5\" torch torchvision tqdm \"accelerate>=0.17.0\"" + "%pip install -U \"comet_ml>=3.44.0\" torch torchvision tqdm \"accelerate>=0.17.0\"" ] }, { @@ -68,7 +68,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init()" + "comet_ml.login()" ] }, { diff --git a/integrations/model-training/anomalib/notebooks/Anomalib_Comet.ipynb b/integrations/model-training/anomalib/notebooks/Anomalib_Comet.ipynb index 5c21593..3c28d05 100644 --- a/integrations/model-training/anomalib/notebooks/Anomalib_Comet.ipynb +++ b/integrations/model-training/anomalib/notebooks/Anomalib_Comet.ipynb @@ -23,10 +23,7 @@ }, { "cell_type": "code", - "source": [ - "!pip install comet_ml --q\n", - "import comet_ml" - ], + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -34,11 +31,10 @@ "id": "mfJ7ria2WgZb", "outputId": "99f83301-9086-4c07-badb-471f64ee4663" }, - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "\u001b[2K \u001b[90mโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\u001b[0m \u001b[32m501.8/501.8 kB\u001b[0m \u001b[31m7.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", "\u001b[2K \u001b[90mโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”\u001b[0m \u001b[32m54.5/54.5 kB\u001b[0m \u001b[31m2.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n", @@ -50,22 +46,25 @@ "\u001b[?25h" ] } + ], + "source": [ + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { "cell_type": "code", "execution_count": null, "metadata": { - "id": "3Dr3VHzafL-z", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "3Dr3VHzafL-z", "outputId": "11e06f48-7d32-46fa-837d-7dec04097e08" }, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "Cloning into 'anomalib'...\n", "remote: Enumerating objects: 28365, done.\u001b[K\n", @@ -104,7 +103,7 @@ "source": [ "!git clone https://github.com/openvinotoolkit/anomalib.git\n", "%cd anomalib\n", - "!pip install . --q" + "%pip install ." ] }, { @@ -122,25 +121,27 @@ }, { "cell_type": "code", - "source": [ - "comet_ml.init(api_key=\"\")" - ], + "execution_count": null, "metadata": { - "id": "jbmCLpu6T8P7", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "jbmCLpu6T8P7", "outputId": "c65cb2d4-4c41-4b3e-9b3b-30934dfa5452" }, - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stderr", + "output_type": "stream", "text": [ "\u001b[1;38;5;39mCOMET INFO:\u001b[0m Valid Comet API Key saved in /root/.comet.config (set COMET_CONFIG to change where it is saved).\n" ] } + ], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login()" ] }, { @@ -315,16 +316,16 @@ "cell_type": "code", "execution_count": null, "metadata": { - "id": "CezXI1d848cg", "colab": { "base_uri": "https://localhost:8080/" }, + "id": "CezXI1d848cg", "outputId": "b0b0005f-b0ae-4017-ccc7-efaaed6ca8ce" }, "outputs": [ { - "output_type": "stream", "name": "stdout", + "output_type": "stream", "text": [ "To use wandb logger install it using `pip install wandb`\n", "/usr/local/lib/python3.10/dist-packages/anomalib/config/config.py:275: UserWarning: config.project.unique_dir is set to False. This does not ensure that your results will be written in an empty directory and you may overwrite files.\n", @@ -775,4 +776,4 @@ }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} diff --git a/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb b/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb index 0b3f8c1..e8cc002 100644 --- a/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb +++ b/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb @@ -1,20 +1,4 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [], - "toc_visible": true - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - }, - "accelerator": "GPU" - }, "cells": [ { "cell_type": "markdown", @@ -47,15 +31,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "01UyDh4SUXes" }, + "outputs": [], "source": [ - "!pip install catalyst --quiet\n", - "!pip install comet_ml --quiet" - ], - "execution_count": null, - "outputs": [] + "%pip install catalyst \"comet_ml>=3.44.0\"" + ] }, { "cell_type": "markdown", @@ -68,16 +51,16 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "O7g_JrgB64ob" }, + "outputs": [], "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"catalyst-tests\")" - ], - "execution_count": null, - "outputs": [] + "comet_ml.login(project_name=\"comet-example-catalyst-notebook\")" + ] }, { "cell_type": "markdown", @@ -90,9 +73,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "4stX87FG4Pjd" }, + "outputs": [], "source": [ "import os\n", "import torch\n", @@ -105,9 +90,7 @@ "from torch.utils.data import DataLoader, TensorDataset\n", "from catalyst import dl\n", "from catalyst.callbacks.checkpoint import CheckpointCallback" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -120,9 +103,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "N1sevzQl4KKx" }, + "outputs": [], "source": [ "def train(logger, hparams={\"lr\": 0.02, \"batch_size\": 32}):\n", " model = nn.Sequential(nn.Flatten(), nn.Linear(28 * 28, 10))\n", @@ -168,9 +153,7 @@ " load_best_on_end=True,\n", " loggers={\"comet\": logger},\n", " )" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -183,15 +166,15 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "zm2ZNi174ClH" }, + "outputs": [], "source": [ "logger = dl.CometLogger()\n", "train(logger)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -213,14 +196,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "PNL9zSjz9wkb" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"charts\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -244,26 +227,26 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "_k2bW7Zd9fow" }, + "outputs": [], "source": [ "logger = dl.CometLogger(comet_mode=\"offline\", **{\"offline_directory\": \"/tmp\"})\n", "train(logger)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "81Co00LA84_N" }, + "outputs": [], "source": [ "! comet upload /tmp/.zip" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -287,16 +270,16 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "WGQ3GP7mHMOt" }, + "outputs": [], "source": [ "previous_experiment_id = \"previous-experiment-id\"\n", "logger = dl.CometLogger(experiment_id=previous_experiment_id, tags=[\"resumed\"])\n", "train(logger)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -320,9 +303,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "r7_8JXnP7k0q" }, + "outputs": [], "source": [ "class CustomRunner(dl.IRunner):\n", " def __init__(self, logdir, device):\n", @@ -431,21 +416,19 @@ " \"targets\": y,\n", " \"logits\": logits,\n", " }" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "-kaV527kCIe4" }, + "outputs": [], "source": [ "runner = CustomRunner(\"/tmp\", \"cuda\")\n", "runner.run()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -469,9 +452,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "_EdVhgQXFihE" }, + "outputs": [], "source": [ "logger = dl.CometLogger()\n", "\n", @@ -567,9 +552,7 @@ " CometCheckpointCallback(logdir=\"/tmp\", logger=logger),\n", " ],\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -582,14 +565,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "fjCdbHVW-_Nu" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"assets\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -602,9 +585,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "nO8pPnpsn2Gb" }, + "outputs": [], "source": [ "logger = dl.CometLogger()\n", "\n", @@ -641,9 +626,23 @@ ")\n", "logger.log_metrics(metrics, stage_key=\"evaluation\", loader_key=\"valid\", scope=\"batch\")\n", "logger.experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "provenance": [], + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" } - ] -} \ No newline at end of file + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-training/composer/mosaicml-getting-started/mosaicml-getting-started.py b/integrations/model-training/composer/mosaicml-getting-started/mosaicml-getting-started.py index 246c156..4f54da2 100644 --- a/integrations/model-training/composer/mosaicml-getting-started/mosaicml-getting-started.py +++ b/integrations/model-training/composer/mosaicml-getting-started/mosaicml-getting-started.py @@ -10,7 +10,7 @@ from composer.models import ComposerClassifier from torchvision import datasets, transforms -comet_ml.init(project_name="comet-example-mosaicml-getting-started") +comet_ml.login(project_name="comet-example-mosaicml-getting-started") torch.manual_seed(42) # For replicability data_directory = "./data" diff --git a/integrations/model-training/composer/mosaicml-getting-started/requirements.txt b/integrations/model-training/composer/mosaicml-getting-started/requirements.txt index f3026bf..e8e8f76 100644 --- a/integrations/model-training/composer/mosaicml-getting-started/requirements.txt +++ b/integrations/model-training/composer/mosaicml-getting-started/requirements.txt @@ -1,3 +1,3 @@ -comet_ml +comet_ml>=3.44.0 matplotlib mosaicml diff --git a/integrations/model-training/composer/notebooks/comet_composer.ipynb b/integrations/model-training/composer/notebooks/comet_composer.ipynb index 4df9aad..0340d69 100644 --- a/integrations/model-training/composer/notebooks/comet_composer.ipynb +++ b/integrations/model-training/composer/notebooks/comet_composer.ipynb @@ -43,7 +43,7 @@ }, "outputs": [], "source": [ - "%pip install \"composer>=0.16.1\" \"comet_ml>=3.33.10\" matplotlib" + "%pip install -U \"composer>=0.16.1\" \"comet_ml>=3.44.0\" matplotlib" ] }, { @@ -63,7 +63,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-mosaicml-getting-started-notebook\")" + "comet_ml.login(project_name=\"comet-example-mosaicml-getting-started-notebook\")" ] }, { diff --git a/integrations/model-training/deepspeed/deepspeed-cifar/cifar10_deepspeed.py b/integrations/model-training/deepspeed/deepspeed-cifar/cifar10_deepspeed.py index 61159f4..185ef58 100644 --- a/integrations/model-training/deepspeed/deepspeed-cifar/cifar10_deepspeed.py +++ b/integrations/model-training/deepspeed/deepspeed-cifar/cifar10_deepspeed.py @@ -13,7 +13,7 @@ from deepspeed.moe.utils import split_params_into_different_moe_groups_for_optimizer # Login to Comet if needed -comet_ml.init() +comet_ml.login() def add_argument(): diff --git a/integrations/model-training/deepspeed/deepspeed-cifar/requirements.txt b/integrations/model-training/deepspeed/deepspeed-cifar/requirements.txt index cb019dc..6a5bacd 100644 --- a/integrations/model-training/deepspeed/deepspeed-cifar/requirements.txt +++ b/integrations/model-training/deepspeed/deepspeed-cifar/requirements.txt @@ -1,4 +1,4 @@ -comet_ml>=3.39.0 +comet_ml>=3.44.0 deepspeed>=0.14.3 torch torchvision diff --git a/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb b/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb index 9bafdce..e8f7b62 100644 --- a/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb +++ b/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb @@ -45,7 +45,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml deepspeed torch torchvision" + "%pip install -U \"comet_ml>=3.44.0\" deepspeed torch torchvision" ] }, { @@ -67,7 +67,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init()" + "comet_ml.login()" ] }, { diff --git a/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py b/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py index 0cf64ed..0b46bb5 100644 --- a/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py +++ b/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py @@ -19,7 +19,7 @@ EPOCHS = 5 -comet_ml.init(project_name="comet-examples-fastai-hello-world") +comet_ml.login(project_name="comet-examples-fastai-hello-world") experiment = comet_ml.Experiment() path = untar_data(URLs.MNIST_TINY) diff --git a/integrations/model-training/fastai/fastai-hello-world/requirements.txt b/integrations/model-training/fastai/fastai-hello-world/requirements.txt index 944d34f..25a2bdd 100644 --- a/integrations/model-training/fastai/fastai-hello-world/requirements.txt +++ b/integrations/model-training/fastai/fastai-hello-world/requirements.txt @@ -1,2 +1,2 @@ -comet_ml>=3.37.0 +comet_ml>=3.44.0 fastai diff --git a/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb b/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb index 9f26de8..2a1f711 100644 --- a/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb +++ b/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb @@ -43,7 +43,7 @@ }, "outputs": [], "source": [ - "%pip install -U fastai comet_ml>=3.37.0" + "%pip install -U fastai comet_ml>=3.44.0" ] }, { @@ -104,7 +104,7 @@ "outputs": [], "source": [ "# Create Comet Experiment\n", - "comet_ml.init(project_name=\"comet-examples-fastai-hello-world-notebook\")\n", + "comet_ml.login(project_name=\"comet-examples-fastai-hello-world-notebook\")\n", "experiment = comet_ml.Experiment()" ] }, diff --git a/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb b/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb index d958ee0..eb4bb79 100644 --- a/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb +++ b/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb @@ -42,7 +42,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml torch datasets transformers scikit-learn accelerate" + "%pip install -U \"comet_ml>=3.44.0\" torch datasets transformers scikit-learn accelerate" ] }, { @@ -64,7 +64,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-examples-transfomers-trainer\")" + "comet_ml.login(project_name=\"comet-examples-transfomers-trainer\")" ] }, { diff --git a/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/requirements.txt b/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/requirements.txt index ff7b74d..ef809fb 100644 --- a/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/requirements.txt +++ b/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/requirements.txt @@ -1,5 +1,5 @@ accelerate -comet_ml +comet_ml>=3.44.0 pandas scikit-learn torch diff --git a/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/transformers-distilbert-fine-tuning.py b/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/transformers-distilbert-fine-tuning.py index 5eb9ca0..03634ba 100644 --- a/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/transformers-distilbert-fine-tuning.py +++ b/integrations/model-training/hugging_face/transformers-distilbert-fine-tuning/transformers-distilbert-fine-tuning.py @@ -19,7 +19,7 @@ EPOCHS = 100 # Login to Comet if needed -comet_ml.init(project_name="comet-example-transformers-distilbert-fine-tuning") +comet_ml.login(project_name="comet-example-transformers-distilbert-fine-tuning") class Dataset(torch.utils.data.Dataset): diff --git a/integrations/model-training/keras/keras-mnist-dnn/keras-mnist-dnn.py b/integrations/model-training/keras/keras-mnist-dnn/keras-mnist-dnn.py index 3c91a84..8bbb152 100644 --- a/integrations/model-training/keras/keras-mnist-dnn/keras-mnist-dnn.py +++ b/integrations/model-training/keras/keras-mnist-dnn/keras-mnist-dnn.py @@ -21,7 +21,7 @@ } # Login to Comet if needed -comet_ml.init() +comet_ml.login() def main(): diff --git a/integrations/model-training/keras/keras-mnist-dnn/requirements.txt b/integrations/model-training/keras/keras-mnist-dnn/requirements.txt index c90ed9b..36a4d75 100644 --- a/integrations/model-training/keras/keras-mnist-dnn/requirements.txt +++ b/integrations/model-training/keras/keras-mnist-dnn/requirements.txt @@ -1,4 +1,4 @@ -comet_ml +comet_ml>=3.44.0 matplotlib numpy pillow diff --git a/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb b/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb index 684eb4a..31af670 100644 --- a/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb +++ b/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb @@ -42,7 +42,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml tensorflow numpy" + "%pip install -U \"comet_ml>=3.44.0\" tensorflow numpy" ] }, { @@ -64,7 +64,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-keras-notebook\")" + "comet_ml.login(project_name=\"comet-example-keras-notebook\")" ] }, { diff --git a/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb b/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb index cebffbe..e8e9527 100644 --- a/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb +++ b/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb @@ -21,7 +21,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml lightgbm pandas scikit-learn" + "%pip install -U \"comet_ml>=3.44.0\" lightgbm pandas scikit-learn" ] }, { @@ -47,7 +47,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-lightgbm\")" + "comet_ml.login(project_name=\"comet-example-lightgbm\")" ] }, { diff --git a/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb b/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb index dc6bbf9..8bdf76c 100644 --- a/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb +++ b/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb @@ -1,27 +1,13 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", - "source": [ - "# Install Dependencies" - ], "metadata": { "id": "Ot2sn7Zrzwtt" - } + }, + "source": [ + "# Install Dependencies" + ] }, { "cell_type": "code", @@ -31,52 +17,56 @@ }, "outputs": [], "source": [ - "!pip install comet_ml\n", - "!pip install mlflow" + "%pip install -U \"comet_ml>=3.44.0\" mlflow" ] }, { "cell_type": "markdown", - "source": [ - "# Initialize Comet" - ], "metadata": { "id": "A4aji9dozzbe" - } + }, + "source": [ + "# Initialize Comet" + ] }, { "cell_type": "code", - "source": [ - "import comet_ml\n", - "\n", - "comet_ml.init(project_name=\"comet-mlflow\")" - ], + "execution_count": null, "metadata": { "id": "fTae69M2u-hl" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login(project_name=\"comet-examples-mlflow-notebook\")" + ] }, { "cell_type": "markdown", - "source": [ - "# Run MLFlow" - ], "metadata": { "id": "1R-zIOmm2gJP" - } + }, + "source": [ + "# Run MLFlow" + ] }, { "cell_type": "markdown", - "source": [ - "Once Comet is imported at the top of your script, it will automatically log experiment data from your MLFlow runs" - ], "metadata": { "id": "u-a86wIo3mfj" - } + }, + "source": [ + "Once Comet is imported at the top of your script, it will automatically log experiment data from your MLFlow runs" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ljuZ8I_q2ZgX" + }, + "outputs": [], "source": [ "import keras\n", "\n", @@ -154,21 +144,30 @@ "\n", "mlflow.keras.log_model(model, \"model\", registered_model_name=\"Test Model\")\n", "mlflow.end_run()" - ], - "metadata": { - "id": "ljuZ8I_q2ZgX" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", - "source": [], + "execution_count": null, "metadata": { "id": "sVz6748M6R8_" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-training/nerfstudio/notebooks/Comet-NerfStudio_sitcoms3d.ipynb b/integrations/model-training/nerfstudio/notebooks/Comet-NerfStudio_sitcoms3d.ipynb index a445a2d..aadc7ef 100644 --- a/integrations/model-training/nerfstudio/notebooks/Comet-NerfStudio_sitcoms3d.ipynb +++ b/integrations/model-training/nerfstudio/notebooks/Comet-NerfStudio_sitcoms3d.ipynb @@ -62,7 +62,7 @@ "source": [ "# Install nerfstudio\n", "%cd /content/\n", - "%pip install \"nerfstudio>=1.0.0\"" + "%pip install -U \"nerfstudio>=1.0.0\"" ] }, { @@ -122,7 +122,7 @@ "\n", "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-nerfstudio-example\")" + "comet_ml.login(project_name=\"comet-example-nerfstudio-example\")" ] }, { diff --git a/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb b/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb index ae82b13..8a32725 100644 --- a/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb +++ b/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb @@ -45,7 +45,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml prophet plotly \"numpy<2.0.0\"" + "%pip install -U \"comet_ml>=3.44.0\" prophet plotly \"numpy<2.0.0\"" ] }, { @@ -67,7 +67,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-prophet\")" + "comet_ml.login(project_name=\"comet-example-prophet\")" ] }, { diff --git a/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb b/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb index c6a3308..48fede7 100644 --- a/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb +++ b/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb @@ -33,7 +33,7 @@ }, "outputs": [], "source": [ - "%pip install -U \"pycaret>=3.0.3\" comet_ml \"numpy==1.23\"" + "%pip install -U \"pycaret>=3.0.3\" \"comet_ml>=3.44.0\" \"numpy==1.23\"" ] }, { @@ -61,7 +61,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-pycaret-notebook\")" + "comet_ml.login(project_name=\"comet-example-pycaret-notebook\")" ] }, { diff --git a/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb b/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb index 557c019..e269355 100644 --- a/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb +++ b/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb @@ -30,7 +30,7 @@ "id": "pBrcDoZ5q7Rr" }, "source": [ - "# Install Comet" + "# Install Comet and dependencies" ] }, { @@ -41,27 +41,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml" - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "GZriRwZRsHSa" - }, - "source": [ - "# Install Dependencies" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "POAGnif7sKUh" - }, - "outputs": [], - "source": [ - "%pip install torch torchvision \"pytorch-lightning<2.0.0\" \"numpy<2.0.0\"" + "%pip install -U \"comet_ml>=3.44.0\" torch torchvision \"pytorch-lightning<2.0.0\" \"numpy<2.0.0\"" ] }, { @@ -83,7 +63,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-examples-pytorch-lightning\")" + "comet_ml.login(project_name=\"comet-examples-pytorch-lightning\")" ] }, { diff --git a/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/pytorch-lightning-optimizer.py b/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/pytorch-lightning-optimizer.py index 1a0c86a..1654dfb 100644 --- a/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/pytorch-lightning-optimizer.py +++ b/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/pytorch-lightning-optimizer.py @@ -27,7 +27,7 @@ from pytorch_lightning import LightningModule, Trainer # Login to Comet if needed -comet_ml.init(project_name="comet-example-pytorch-lightning-optimizer") +comet_ml.login(project_name="comet-example-pytorch-lightning-optimizer") class PyTorchLightningModel(LightningModule): diff --git a/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/requirements.txt b/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/requirements.txt index 6e3f55d..82fcb5d 100644 --- a/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/requirements.txt +++ b/integrations/model-training/pytorch-lightning/pytorch-lightning-optimizer/requirements.txt @@ -1,4 +1,4 @@ -comet_ml +comet_ml>=3.44.0 pytorch_lightning torch torchvision diff --git a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb index acc5ea8..8f8ac0d 100644 --- a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb +++ b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb @@ -45,7 +45,7 @@ }, "outputs": [], "source": [ - "%pip install \"comet_ml>=3.31.15\" \"matplotlib>=1.1.0\" numpy tensorboard torch torchvision" + "%pip install -U \"comet_ml>=3.44.0\" \"matplotlib>=1.1.0\" numpy tensorboard torch torchvision" ] }, { @@ -67,7 +67,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-pytorch-tensorboard-notebook\")" + "comet_ml.login(project_name=\"comet-example-pytorch-tensorboard-notebook\")" ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb index 819ad2e..b25bea6 100644 --- a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb +++ b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb @@ -60,7 +60,7 @@ "outputs": [], "source": [ "# Temporarily use Pillow 9 until tensorboardX fix compatbility\n", - "%pip install comet_ml tensorboardX torch torchvision matplotlib \"Pillow<10.0.0\"" + "%pip install -U \"comet_ml>=3.44.0\" tensorboardX torch torchvision matplotlib \"Pillow<10.0.0\"" ] }, { @@ -117,7 +117,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-pytorch-tensorboardX\")" + "comet_ml.login(project_name=\"comet-example-pytorch-tensorboardX\")" ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb b/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb index ed0968e..a97e766 100644 --- a/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb +++ b/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb @@ -48,7 +48,7 @@ }, "outputs": [], "source": [ - "%pip install \"comet_ml>=3.38.0\" torch torchvision tqdm" + "%pip install -U \"comet_ml>=3.44.0\" torch torchvision tqdm" ] }, { @@ -71,7 +71,7 @@ "import comet_ml\n", "from comet_ml.integration.pytorch import watch\n", "\n", - "comet_ml.init(project_name=\"comet-example-pytorch-notebook\")" + "comet_ml.login(project_name=\"comet-example-pytorch-notebook\")" ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb b/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb index 0b33149..41ce351 100644 --- a/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb +++ b/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb @@ -48,7 +48,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml torch torchvision tqdm" + "%pip install -U \"comet_ml>=3.44.0\" torch torchvision tqdm" ] }, { @@ -70,7 +70,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-pytorch-histogram-logging\")" + "comet_ml.login(project_name=\"comet-example-pytorch-histogram-logging\")" ] }, { diff --git a/integrations/model-training/pytorch/pytorch-tensorboard/pytorch-tensorboard-example.py b/integrations/model-training/pytorch/pytorch-tensorboard/pytorch-tensorboard-example.py index 5b45b3b..d701df5 100644 --- a/integrations/model-training/pytorch/pytorch-tensorboard/pytorch-tensorboard-example.py +++ b/integrations/model-training/pytorch/pytorch-tensorboard/pytorch-tensorboard-example.py @@ -20,7 +20,7 @@ } -comet_ml.init() +comet_ml.login() experiment = comet_ml.Experiment(project_name="comet-example-pytorch-tensorboard") experiment.log_parameters(hyper_params) diff --git a/integrations/model-training/pytorch/pytorch-tensorboard/requirements.txt b/integrations/model-training/pytorch/pytorch-tensorboard/requirements.txt index 29d35d8..e132158 100644 --- a/integrations/model-training/pytorch/pytorch-tensorboard/requirements.txt +++ b/integrations/model-training/pytorch/pytorch-tensorboard/requirements.txt @@ -1,4 +1,4 @@ -comet_ml>=3.31.15 +comet_ml>=3.44.0 matplotlib>=1.1.0 numpy tensorboard diff --git a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb index 2d51217..6f171b5 100644 --- a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb +++ b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb @@ -41,7 +41,7 @@ }, "outputs": [], "source": [ - "%pip install -U comet_ml \"ray[air]>=2.1.0\" \"keras<3\" \"tensorflow<2.16.0\"" + "%pip install -U \"comet_ml>=3.44.0\" \"ray[air]>=2.1.0\" \"keras<3\" \"tensorflow<2.16.0\"" ] }, { @@ -63,7 +63,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-ray-train-keras\")" + "comet_ml.login(project_name=\"comet-example-ray-train-keras\")" ] }, { diff --git a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb index 7fb9745..b37ba11 100644 --- a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb +++ b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb @@ -42,7 +42,7 @@ "outputs": [], "source": [ "# XGBoost is pinned because of https://github.com/ray-project/ray/issues/46476\n", - "%pip install -U comet_ml \"ray[air]>=2.1.0\" xgboost_ray \"pandas!=2.2.0\" \"xgboost!=2.1.0\"" + "%pip install -U \"comet_ml>=3.44.0\" \"ray[air]>=2.1.0\" xgboost_ray \"pandas!=2.2.0\" \"xgboost!=2.1.0\"" ] }, { @@ -65,7 +65,7 @@ "import comet_ml\n", "import comet_ml.integration.ray\n", "\n", - "comet_ml.init(project_name=\"comet-example-ray-train-xgboost\")" + "comet_ml.login(project_name=\"comet-example-ray-train-xgboost\")" ] }, { diff --git a/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb b/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb index 41fbd79..ef597b4 100644 --- a/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb +++ b/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb @@ -29,7 +29,7 @@ }, "outputs": [], "source": [ - "!pip install comet_ml" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -75,7 +75,9 @@ "from torchvision.datasets import MNIST\n", "from torchvision import transforms\n", "\n", - "MNIST.mirrors = [\"https://sagemaker-sample-files.s3.amazonaws.com/datasets/image/MNIST/\"]\n", + "MNIST.mirrors = [\n", + " \"https://sagemaker-sample-files.s3.amazonaws.com/datasets/image/MNIST/\"\n", + "]\n", "\n", "MNIST(\n", " \"data\",\n", @@ -106,12 +108,7 @@ "AWS_INSTANCE_TYPE = \"ml.c5.2xlarge\"\n", "AWS_INSTANCE_COUNT = 2\n", "\n", - "HYPERPARAMETERS = {\n", - " \"epochs\": 5,\n", - " \"batch-size\": 32,\n", - " \"log-interval\": 1,\n", - " \"backend\": \"gloo\" \n", - "}" + "HYPERPARAMETERS = {\"epochs\": 5, \"batch-size\": 32, \"log-interval\": 1, \"backend\": \"gloo\"}" ] }, { @@ -140,10 +137,10 @@ " instance_type=AWS_INSTANCE_TYPE,\n", " hyperparameters=HYPERPARAMETERS,\n", " metric_definitions=[\n", - " {'Name':'train:loss', 'Regex':'Train Loss: (.*?);'},\n", - " {'Name':'test:loss', 'Regex':'Test Average Loss: (.*?);'},\n", - " {'Name':'test:accuracy', 'Regex':'Test Accuracy: (.*?)%;'}\n", - " ]\n", + " {\"Name\": \"train:loss\", \"Regex\": \"Train Loss: (.*?);\"},\n", + " {\"Name\": \"test:loss\", \"Regex\": \"Test Average Loss: (.*?);\"},\n", + " {\"Name\": \"test:accuracy\", \"Regex\": \"Test Accuracy: (.*?)%;\"},\n", + " ],\n", ")" ] }, @@ -185,7 +182,7 @@ "COMET_WORKSPACE = \"team-comet-ml\"\n", "COMET_PROJECT_NAME = \"sagemaker-pytorch-mnist\"\n", "\n", - "comet_ml.init(workspace=COMET_WORKSPACE, project_name=COMET_PROJECT_NAME)" + "comet_ml.login(workspace=COMET_WORKSPACE, project_name=COMET_PROJECT_NAME)" ] }, { @@ -203,17 +200,20 @@ }, "outputs": [], "source": [ - "from comet_ml.integration.sagemaker import log_sagemaker_training_job_v1, log_sagemaker_training_job_by_name_v1\n", + "from comet_ml.integration.sagemaker import (\n", + " log_sagemaker_training_job_v1,\n", + " log_sagemaker_training_job_by_name_v1,\n", + ")\n", "\n", "COMET_API_KEY = comet_ml.config.get_config()[\"comet.api_key\"]\n", "COMET_WORKSPACE = comet_ml.config.get_config()[\"comet.workspace\"]\n", - "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", + "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", "\n", "log_sagemaker_training_job_v1(\n", - " estimator, \n", - " api_key=COMET_API_KEY, \n", - " workspace=COMET_WORKSPACE, \n", - " project_name=COMET_PROJECT_NAME\n", + " estimator,\n", + " api_key=COMET_API_KEY,\n", + " workspace=COMET_WORKSPACE,\n", + " project_name=COMET_PROJECT_NAME,\n", ")" ] }, @@ -236,10 +236,10 @@ "outputs": [], "source": [ "log_sagemaker_training_job_by_name_v1(\n", - " estimator.latest_training_job.job_name, \n", - " api_key=COMET_API_KEY, \n", - " workspace=COMET_WORKSPACE, \n", - " project_name=COMET_PROJECT_NAME\n", + " estimator.latest_training_job.job_name,\n", + " api_key=COMET_API_KEY,\n", + " workspace=COMET_WORKSPACE,\n", + " project_name=COMET_PROJECT_NAME,\n", ")" ] } diff --git a/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb b/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb index d201662..709a048 100644 --- a/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb +++ b/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb @@ -29,18 +29,7 @@ }, "outputs": [], "source": [ - "!pip install comet_ml" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!pip install \"sagemaker>=2.140.0\" \"transformers==4.26.1\" \"datasets[s3]\" \"boto3\" --upgrade" + "%pip install -U \"comet_ml>=3.44.0\" \"sagemaker>=2.140.0\" \"transformers==4.26.1\" \"datasets[s3]\" \"boto3\"" ] }, { @@ -62,7 +51,7 @@ "\n", "COMET_PROJECT_NAME = \"comet-example-sagemaker-custom-transformers-text-classification\"\n", "\n", - "comet_ml.init(project_name=COMET_PROJECT_NAME)" + "comet_ml.login(project_name=COMET_PROJECT_NAME)" ] }, { @@ -83,7 +72,7 @@ "import sagemaker\n", "\n", "sess = sagemaker.Session()\n", - "prefix = 'sagemaker/DEMO-huggingface-imdb'\n", + "prefix = \"sagemaker/DEMO-huggingface-imdb\"\n", "bucket = sess.default_bucket()\n", "role = sagemaker.get_execution_role()" ] @@ -107,40 +96,41 @@ "from transformers import AutoTokenizer\n", "\n", "# tokenizer used in preprocessing\n", - "tokenizer_name = 'distilbert-base-uncased'\n", + "tokenizer_name = \"distilbert-base-uncased\"\n", "\n", "# dataset used\n", - "dataset_name = 'imdb'\n", + "dataset_name = \"imdb\"\n", "\n", "# download tokenizer\n", "tokenizer = AutoTokenizer.from_pretrained(tokenizer_name)\n", "\n", "# tokenizer helper function\n", "def tokenize(batch):\n", - " return tokenizer(batch['text'], padding='max_length', truncation=True)\n", + " return tokenizer(batch[\"text\"], padding=\"max_length\", truncation=True)\n", + "\n", "\n", "# load dataset\n", - "train_dataset, test_dataset = load_dataset('imdb', split=['train', 'test'])\n", + "train_dataset, test_dataset = load_dataset(\"imdb\", split=[\"train\", \"test\"])\n", "\n", "train_dataset = test_dataset.shuffle().select(range(1000))\n", - "test_dataset = test_dataset.shuffle().select(range(100)) \n", + "test_dataset = test_dataset.shuffle().select(range(100))\n", "\n", "# tokenize dataset\n", "train_dataset = train_dataset.map(tokenize, batched=True)\n", "test_dataset = test_dataset.map(tokenize, batched=True)\n", "\n", "# set format for pytorch\n", - "train_dataset = train_dataset.rename_column(\"label\", \"labels\")\n", - "train_dataset.set_format('torch', columns=['input_ids', 'attention_mask', 'labels'])\n", + "train_dataset = train_dataset.rename_column(\"label\", \"labels\")\n", + "train_dataset.set_format(\"torch\", columns=[\"input_ids\", \"attention_mask\", \"labels\"])\n", "test_dataset = test_dataset.rename_column(\"label\", \"labels\")\n", - "test_dataset.set_format('torch', columns=['input_ids', 'attention_mask', 'labels'])\n", + "test_dataset.set_format(\"torch\", columns=[\"input_ids\", \"attention_mask\", \"labels\"])\n", "\n", "# save train_dataset to s3\n", - "training_input_path = f's3://{sess.default_bucket()}/{prefix}/train'\n", + "training_input_path = f\"s3://{sess.default_bucket()}/{prefix}/train\"\n", "train_dataset.save_to_disk(training_input_path)\n", "\n", "# save test_dataset to s3\n", - "test_input_path = f's3://{sess.default_bucket()}/{prefix}/test'\n", + "test_input_path = f\"s3://{sess.default_bucket()}/{prefix}/test\"\n", "test_dataset.save_to_disk(test_input_path)" ] }, @@ -166,7 +156,7 @@ " \"epochs\": 1,\n", " \"train_batch_size\": 32,\n", " \"log-interval\": 1,\n", - " \"model_name\": \"distilbert-base-uncased\" \n", + " \"model_name\": \"distilbert-base-uncased\",\n", "}" ] }, @@ -188,22 +178,22 @@ "from sagemaker.huggingface import HuggingFace\n", "\n", "COMET_API_KEY = comet_ml.config.get_config()[\"comet.api_key\"]\n", - "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", + "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", "\n", "estimator = HuggingFace(\n", " source_dir=\"src\",\n", " entry_point=\"text_classification.py\",\n", " role=role,\n", - " transformers_version='4.26',\n", - " pytorch_version='1.13',\n", - " py_version='py39',\n", + " transformers_version=\"4.26\",\n", + " pytorch_version=\"1.13\",\n", + " py_version=\"py39\",\n", " instance_count=AWS_INSTANCE_COUNT,\n", " instance_type=AWS_INSTANCE_TYPE,\n", " hyperparameters=HYPERPARAMETERS,\n", " environment={\n", - " \"COMET_API_KEY\": COMET_API_KEY, \n", - " \"COMET_PROJECT_NAME\": COMET_PROJECT_NAME \n", - " }\n", + " \"COMET_API_KEY\": COMET_API_KEY,\n", + " \"COMET_PROJECT_NAME\": COMET_PROJECT_NAME,\n", + " },\n", ")" ] }, @@ -222,7 +212,7 @@ }, "outputs": [], "source": [ - "estimator.fit({'train': training_input_path, 'test': test_input_path})" + "estimator.fit({\"train\": training_input_path, \"test\": test_input_path})" ] } ], diff --git a/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb b/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb index ceb5965..f022056 100644 --- a/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb +++ b/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb @@ -30,7 +30,7 @@ }, "outputs": [], "source": [ - "!pip install comet_ml" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -50,7 +50,7 @@ "import comet_ml\n", "\n", "COMET_PROJECT_NAME = \"comet-example-sagemaker-custom-pytorch-mnist\"\n", - "comet_ml.init(project_name=COMET_PROJECT_NAME)" + "comet_ml.login(project_name=COMET_PROJECT_NAME)" ] }, { @@ -96,7 +96,9 @@ "from torchvision.datasets import MNIST\n", "from torchvision import transforms\n", "\n", - "MNIST.mirrors = [\"https://sagemaker-sample-files.s3.amazonaws.com/datasets/image/MNIST/\"]\n", + "MNIST.mirrors = [\n", + " \"https://sagemaker-sample-files.s3.amazonaws.com/datasets/image/MNIST/\"\n", + "]\n", "\n", "MNIST(\n", " \"data\",\n", @@ -127,11 +129,7 @@ "AWS_INSTANCE_TYPE = \"ml.c5.2xlarge\"\n", "AWS_INSTANCE_COUNT = 1\n", "\n", - "HYPERPARAMETERS = {\n", - " \"epochs\": 5,\n", - " \"batch-size\": 32,\n", - " \"log-interval\": 1\n", - "}" + "HYPERPARAMETERS = {\"epochs\": 5, \"batch-size\": 32, \"log-interval\": 1}" ] }, { @@ -152,7 +150,7 @@ "from sagemaker.pytorch import PyTorch\n", "\n", "COMET_API_KEY = comet_ml.config.get_config()[\"comet.api_key\"]\n", - "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", + "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", "\n", "estimator = PyTorch(\n", " source_dir=\"src\",\n", @@ -164,14 +162,14 @@ " instance_type=AWS_INSTANCE_TYPE,\n", " hyperparameters=HYPERPARAMETERS,\n", " metric_definitions=[\n", - " {'Name':'train:loss', 'Regex':'Train Loss: (.*?);'},\n", - " {'Name':'test:loss', 'Regex':'Test Average Loss: (.*?);'},\n", - " {'Name':'test:accuracy', 'Regex':'Test Accuracy: (.*?)%;'}\n", + " {\"Name\": \"train:loss\", \"Regex\": \"Train Loss: (.*?);\"},\n", + " {\"Name\": \"test:loss\", \"Regex\": \"Test Average Loss: (.*?);\"},\n", + " {\"Name\": \"test:accuracy\", \"Regex\": \"Test Accuracy: (.*?)%;\"},\n", " ],\n", " environment={\n", - " \"COMET_API_KEY\": COMET_API_KEY, \n", - " \"COMET_PROJECT_NAME\": COMET_PROJECT_NAME\n", - " }\n", + " \"COMET_API_KEY\": COMET_API_KEY,\n", + " \"COMET_PROJECT_NAME\": COMET_PROJECT_NAME,\n", + " },\n", ")" ] }, diff --git a/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb b/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb index 2f44cea..67abb47 100644 --- a/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb +++ b/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb @@ -15,7 +15,7 @@ }, "outputs": [], "source": [ - "!pip install comet_ml" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -34,9 +34,9 @@ "outputs": [], "source": [ "import comet_ml\n", - " \n", + "\n", "PROJECT_NAME = \"comet-example-sagemaker-tensorflow-custom-mnist\"\n", - "comet_ml.init(project_name=PROJECT_NAME)" + "comet_ml.login(project_name=PROJECT_NAME)" ] }, { @@ -83,17 +83,22 @@ "import keras\n", "import numpy as np\n", "from keras.datasets import mnist\n", + "\n", "(x_train, y_train), (x_val, y_val) = mnist.load_data()\n", "\n", - "os.makedirs(\"./data\", exist_ok = True)\n", + "os.makedirs(\"./data\", exist_ok=True)\n", "\n", - "np.savez('./data/training', image=x_train, label=y_train)\n", - "np.savez('./data/validation', image=x_val, label=y_val)\n", + "np.savez(\"./data/training\", image=x_train, label=y_train)\n", + "np.savez(\"./data/validation\", image=x_val, label=y_val)\n", "\n", - "prefix = 'keras-mnist'\n", + "prefix = \"keras-mnist\"\n", "\n", - "training_input_path = sagemaker_session.upload_data('data/training.npz', key_prefix=prefix+'/training')\n", - "validation_input_path = sagemaker_session.upload_data('data/validation.npz', key_prefix=prefix+'/validation')" + "training_input_path = sagemaker_session.upload_data(\n", + " \"data/training.npz\", key_prefix=prefix + \"/training\"\n", + ")\n", + "validation_input_path = sagemaker_session.upload_data(\n", + " \"data/validation.npz\", key_prefix=prefix + \"/validation\"\n", + ")" ] }, { @@ -114,10 +119,7 @@ "AWS_INSTANCE_TYPE = \"ml.c5.2xlarge\"\n", "AWS_INSTANCE_COUNT = 1\n", "\n", - "HYPERPARAMETERS = {\n", - " \"epochs\": 1,\n", - " \"batch-size\": 32\n", - "}" + "HYPERPARAMETERS = {\"epochs\": 1, \"batch-size\": 32}" ] }, { @@ -138,7 +140,7 @@ "from sagemaker.tensorflow import TensorFlow\n", "\n", "COMET_API_KEY = comet_ml.config.get_config()[\"comet.api_key\"]\n", - "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", + "COMET_PROJECT_NAME = comet_ml.config.get_config()[\"comet.project_name\"]\n", "\n", "estimator = TensorFlow(\n", " source_dir=\"src\",\n", @@ -151,8 +153,8 @@ " py_version=\"py37\",\n", " environment={\n", " \"COMET_API_KEY\": COMET_API_KEY,\n", - " \"COMET_PROJECT_NAME\": COMET_PROJECT_NAME\n", - " }\n", + " \"COMET_PROJECT_NAME\": COMET_PROJECT_NAME,\n", + " },\n", ")" ] }, @@ -171,7 +173,7 @@ }, "outputs": [], "source": [ - "estimator.fit({'training': training_input_path, 'validation': validation_input_path})" + "estimator.fit({\"training\": training_input_path, \"validation\": validation_input_path})" ] } ], diff --git a/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb b/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb index 9ad0654..6da3083 100644 --- a/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb +++ b/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb @@ -1,47 +1,33 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", - "source": [ - "# Install Comet" - ], "metadata": { "id": "DwWec6YKT28S" - } + }, + "source": [ + "# Install Comet" + ] }, { "cell_type": "code", - "source": [ - "!pip install comet_ml --quiet" - ], + "execution_count": null, "metadata": { "id": "V1sdPf1DT1VL" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [ + "%pip install -U \"comet_ml>=3.44.0\"" + ] }, { "cell_type": "markdown", - "source": [ - "# Initialize Comet" - ], "metadata": { "id": "86DWeNq3T7tb" - } + }, + "source": [ + "# Initialize Comet" + ] }, { "cell_type": "code", @@ -53,20 +39,25 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-sklearn-example\")" + "comet_ml.login(project_name=\"comet-sklearn-example\")" ] }, { "cell_type": "markdown", - "source": [ - "# Import Dependencies" - ], "metadata": { "id": "8C-q1JuiUItU" - } + }, + "source": [ + "# Import Dependencies" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "5AIiw6rAUEWL" + }, + "outputs": [], "source": [ "import numpy as np\n", "from sklearn.datasets import load_breast_cancer\n", @@ -75,24 +66,24 @@ "from sklearn.metrics import f1_score, precision_score, recall_score, confusion_matrix\n", "\n", "random_state = 42" - ], - "metadata": { - "id": "5AIiw6rAUEWL" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Define Model Evaluation Function" - ], "metadata": { "id": "4MzBGJhdYP8T" - } + }, + "source": [ + "# Define Model Evaluation Function" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "zk6C5CJqYVXS" + }, + "outputs": [], "source": [ "def evaluate(y_test, y_pred):\n", " return {\n", @@ -100,90 +91,83 @@ " \"precision\": precision_score(y_test, y_pred),\n", " \"recall\": recall_score(y_test, y_pred),\n", " }" - ], - "metadata": { - "id": "zk6C5CJqYVXS" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Create an Experiment" - ], "metadata": { "id": "1U-IL7ZvXEmy" - } + }, + "source": [ + "# Create an Experiment" + ] }, { "cell_type": "code", - "source": [ - "experiment = comet_ml.Experiment()" - ], + "execution_count": null, "metadata": { "id": "maCrhWVZXGLD" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [ + "experiment = comet_ml.Experiment()" + ] }, { "cell_type": "markdown", - "source": [ - "# Load Data" - ], "metadata": { "id": "fpBNdj3rUOn2" - } + }, + "source": [ + "# Load Data" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "P59UYF7XUQmP" + }, + "outputs": [], "source": [ "cancer = load_breast_cancer()\n", "X_train, X_test, y_train, y_test = train_test_split(\n", " cancer.data, cancer.target, stratify=cancer.target, random_state=random_state\n", ")" - ], - "metadata": { - "id": "P59UYF7XUQmP" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Initialize Model" - ], "metadata": { "id": "fmEAnOXpWmn7" - } + }, + "source": [ + "# Initialize Model" + ] }, { "cell_type": "code", - "source": [ - "clf = RandomForestClassifier()" - ], + "execution_count": null, "metadata": { "id": "6bf79F-ZWgfF" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [ + "clf = RandomForestClassifier()" + ] }, { "cell_type": "markdown", - "source": [ - "# Fit Model" - ], "metadata": { "id": "vGUJ0peiWsUK" - } + }, + "source": [ + "# Fit Model" + ] }, { "cell_type": "code", - "source": [ - "clf.fit(X_train, y_train)" - ], + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -191,86 +175,102 @@ "id": "pmLtGXIoWoYR", "outputId": "196ef4cb-cbd7-4608-9886-4473045239c5" }, - "execution_count": null, "outputs": [ { - "output_type": "execute_result", "data": { "text/plain": [ "LogisticRegression()" ] }, + "execution_count": 18, "metadata": {}, - "execution_count": 18 + "output_type": "execute_result" } + ], + "source": [ + "clf.fit(X_train, y_train)" ] }, { "cell_type": "markdown", - "source": [ - "# Log Train Metrics" - ], "metadata": { "id": "WvDfx8ADXSLr" - } + }, + "source": [ + "# Log Train Metrics" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "okjZN0L0XUQX" + }, + "outputs": [], "source": [ "y_train_pred = clf.predict(X_train)\n", "with experiment.train():\n", " metrics = evaluate(y_train, y_train_pred)\n", " experiment.log_metrics(metrics)" - ], - "metadata": { - "id": "okjZN0L0XUQX" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# Log Test Metrics" - ], "metadata": { "id": "N3NMQxaZWx-A" - } + }, + "source": [ + "# Log Test Metrics" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "ouaSnKKuWwFR" + }, + "outputs": [], "source": [ "y_test_pred = clf.predict(X_test)\n", "\n", "with experiment.test():\n", " metrics = evaluate(y_test, y_test_pred)\n", " experiment.log_metrics(metrics)" - ], - "metadata": { - "id": "ouaSnKKuWwFR" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", - "source": [ - "# End Experiment" - ], "metadata": { "id": "RCPJqltgZAlg" - } + }, + "source": [ + "# End Experiment" + ] }, { "cell_type": "code", - "source": [ - "experiment.end()" - ], + "execution_count": null, "metadata": { "id": "lYzPnSz3ZBZV" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [ + "experiment.end()" + ] + } + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" } - ] -} \ No newline at end of file + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-training/scikit-learn/sklearn-classification-example/comet-scikit-classification-example.py b/integrations/model-training/scikit-learn/sklearn-classification-example/comet-scikit-classification-example.py index e1fe754..680003d 100644 --- a/integrations/model-training/scikit-learn/sklearn-classification-example/comet-scikit-classification-example.py +++ b/integrations/model-training/scikit-learn/sklearn-classification-example/comet-scikit-classification-example.py @@ -9,7 +9,7 @@ from sklearn.model_selection import GridSearchCV, train_test_split from sklearn.preprocessing import StandardScaler -comet_ml.init() +comet_ml.login() experiment = comet_ml.Experiment( project_name="comet-example-scikit-learn-classification" diff --git a/integrations/model-training/scikit-learn/sklearn-classification-example/requirements.txt b/integrations/model-training/scikit-learn/sklearn-classification-example/requirements.txt index aa9d200..38a16d3 100644 --- a/integrations/model-training/scikit-learn/sklearn-classification-example/requirements.txt +++ b/integrations/model-training/scikit-learn/sklearn-classification-example/requirements.txt @@ -1,2 +1,2 @@ -comet_ml>=3.32.9 +comet_ml>=3.44.0 scikit-learn diff --git a/integrations/model-training/scikit-learn/sklearn-model-saving-example/requirements.txt b/integrations/model-training/scikit-learn/sklearn-model-saving-example/requirements.txt index 24da2ec..18d2e1b 100644 --- a/integrations/model-training/scikit-learn/sklearn-model-saving-example/requirements.txt +++ b/integrations/model-training/scikit-learn/sklearn-model-saving-example/requirements.txt @@ -1,3 +1,3 @@ cloudpickle -comet_ml>=3.32.9 +comet_ml>=3.44.0 scikit_learn diff --git a/integrations/model-training/scikit-learn/sklearn-model-saving-example/sklearn-model-saving-example.py b/integrations/model-training/scikit-learn/sklearn-model-saving-example/sklearn-model-saving-example.py index 85a88a8..6b406be 100644 --- a/integrations/model-training/scikit-learn/sklearn-model-saving-example/sklearn-model-saving-example.py +++ b/integrations/model-training/scikit-learn/sklearn-model-saving-example/sklearn-model-saving-example.py @@ -14,7 +14,7 @@ # Login to comet and create an Experiment -comet_ml.init() +comet_ml.login() experiment = comet_ml.Experiment( project_name="comet-example-scikit-learn-model-saving-example" diff --git a/integrations/model-training/scikit-learn/sklearn-nlp-example/comet-scikit-nlp-example.py b/integrations/model-training/scikit-learn/sklearn-nlp-example/comet-scikit-nlp-example.py index 58f80cb..79a6655 100644 --- a/integrations/model-training/scikit-learn/sklearn-nlp-example/comet-scikit-nlp-example.py +++ b/integrations/model-training/scikit-learn/sklearn-nlp-example/comet-scikit-nlp-example.py @@ -8,7 +8,7 @@ from sklearn.metrics import accuracy_score from sklearn.pipeline import Pipeline -comet_ml.init() +comet_ml.login() experiment = comet_ml.Experiment(project_name="comet-example-scikit-learn-nlp") diff --git a/integrations/model-training/scikit-learn/sklearn-nlp-example/requirements.txt b/integrations/model-training/scikit-learn/sklearn-nlp-example/requirements.txt index aa9d200..38a16d3 100644 --- a/integrations/model-training/scikit-learn/sklearn-nlp-example/requirements.txt +++ b/integrations/model-training/scikit-learn/sklearn-nlp-example/requirements.txt @@ -1,2 +1,2 @@ -comet_ml>=3.32.9 +comet_ml>=3.44.0 scikit-learn diff --git a/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb b/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb index 8a44c5f..c0ef28e 100644 --- a/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb +++ b/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb @@ -1,20 +1,4 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [], - "toc_visible": true, - "machine_shape": "hm" - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", @@ -50,39 +34,27 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "L2ye-bu7yeTJ" }, + "outputs": [], "source": [ "# This is only to setup PySpark and Spark NLP on Colab\n", "!wget http://setup.johnsnowlabs.com/colab.sh -O - | bash" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", - "source": [ - "# Install Spark NLP Display for visualization\n", - "%pip install spark-nlp-display" - ], + "execution_count": null, "metadata": { "id": "XKbZHYav_Ond" }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "code", + "outputs": [], "source": [ - "# Installing Comet\n", - "%pip install comet_ml" - ], - "metadata": { - "id": "sXCTHd9N_QWx" - }, - "execution_count": null, - "outputs": [] + "# Install Spark NLP Display for visualization and Comet for login\n", + "%pip install -U spark-nlp-display \"comet_ml>=3.44.0\"" + ] }, { "cell_type": "markdown", @@ -95,9 +67,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "hukcCcW17kIx" }, + "outputs": [], "source": [ "# Import Spark NLP\n", "import sparknlp\n", @@ -114,9 +88,7 @@ "# Import Comet\n", "import comet_ml\n", "from sparknlp.logging.comet import CometLogger" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -138,14 +110,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "W6uDqwwTzTNY" }, + "outputs": [], "source": [ - "comet_ml.init(project_name=\"comet-example-sparknlp\")" - ], - "execution_count": null, - "outputs": [] + "comet_ml.login(project_name=\"comet-example-sparknlp\")" + ] }, { "cell_type": "markdown", @@ -176,14 +148,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "6ogPNh7zLR4B" }, + "outputs": [], "source": [ "OUTPUT_LOG_PATH = \"./run\"" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -196,14 +168,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "i0dpw910rDkJ" }, + "outputs": [], "source": [ "logger = CometLogger()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -216,14 +188,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "SYr7ho0LRefi" }, + "outputs": [], "source": [ "!curl -O 'https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/resources/en/classifier-dl/toxic_comments/toxic_train.snappy.parquet'" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -236,14 +208,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "SuAnuxj5Rmee" }, + "outputs": [], "source": [ "trainDataset = spark.read.parquet(\"toxic_train.snappy.parquet\").repartition(120)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -256,9 +228,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "37B1olK_Iy_C" }, + "outputs": [], "source": [ "# Let's use shrink to remove new lines in the comments\n", "document = (\n", @@ -293,9 +267,7 @@ " .setOutputLogsPath(OUTPUT_LOG_PATH)\n", " .setValidationSplit(0.1)\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -328,25 +300,25 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "thz1LBc0ES0a" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"charts\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "EncrR31RHmtH" }, + "outputs": [], "source": [ "logger.monitor(OUTPUT_LOG_PATH, multiClassifier)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -359,15 +331,15 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "WFujeSMH44y5" }, + "outputs": [], "source": [ "pipeline = Pipeline(stages=[document, use, multiClassifier])\n", "model = pipeline.fit(trainDataset)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -389,40 +361,40 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "FecUrluUJxLT" }, + "outputs": [], "source": [ "!ls ./run" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "-oDkX9RtMo1f" }, + "outputs": [], "source": [ "import glob\n", "\n", "logger = CometLogger()\n", "log_file = glob.glob(\"./run/MultiClassifierDLApproach_*.log\")\n", "logger.log_completed_run(log_file[0])" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "2s7O9e_IMvcg" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"charts\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -446,64 +418,66 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "egi4u_jTOp_I" }, + "outputs": [], "source": [ "logger = CometLogger()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "nbayBf41Nd55" }, + "outputs": [], "source": [ "!curl -O 'https://s3.amazonaws.com/auxdata.johnsnowlabs.com/public/resources/en/classifier-dl/toxic_comments/toxic_test.snappy.parquet'" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "nBXOhlgUN0ju" }, + "outputs": [], "source": [ "testDataset = spark.read.parquet(\"/content/toxic_test.snappy.parquet\").repartition(10)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "iIf9YDSt-QT9" }, + "outputs": [], "source": [ "prediction = model.transform(testDataset)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "4FerI_GeJT-Y" }, + "outputs": [], "source": [ "preds_df = prediction.select(\"labels\", \"category.result\").toPandas()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "GQ-o2FDwE9ba" }, + "outputs": [], "source": [ "from sklearn.preprocessing import MultiLabelBinarizer\n", "from sklearn.metrics import classification_report\n", @@ -512,43 +486,41 @@ "\n", "y_true = mlb.fit_transform(preds_df[\"labels\"])\n", "y_pred = mlb.fit_transform(preds_df[\"result\"])" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "2y5ZvKJvMTJz" }, + "outputs": [], "source": [ "report = classification_report(y_true, y_pred, output_dict=True)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "EbIGJVJ4N3QL" }, + "outputs": [], "source": [ "for key, value in report.items():\n", " logger.log_metrics(value, prefix=key)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "2IJEqUR4Ova-" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"metrics\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -570,14 +542,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "MwP3EkXwsd5_" }, + "outputs": [], "source": [ "logger = CometLogger()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -590,9 +562,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "0bWqEYrJrkEB" }, + "outputs": [], "source": [ "# If you change the model, re-run all the cells below\n", "# Other applicable models: ner_dl, ner_dl_bert\n", @@ -635,9 +609,7 @@ "\n", "empty_df = spark.createDataFrame([[\"\"]]).toDF(\"text\")\n", "pipeline_model = nlp_pipeline.fit(empty_df)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -650,14 +622,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "ZjvdsaSy3gTC" }, + "outputs": [], "source": [ "logger.log_pipeline_parameters(pipeline_model)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -670,14 +642,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "MtF-0mec_54S" }, + "outputs": [], "source": [ "logger.log_parameters({\"run-type\": \"training\"})" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -690,15 +662,15 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "v4QbtImGrzxw" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"parameters\")\n", "logger.end()" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -731,9 +703,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "1jEARtSE-XJY" }, + "outputs": [], "source": [ "# If you change the model, re-run all the cells below\n", "# Other applicable models: ner_dl, ner_dl_bert\n", @@ -776,9 +750,7 @@ "\n", "empty_df = spark.createDataFrame([[\"\"]]).toDF(\"text\")\n", "pipeline_model = nlp_pipeline.fit(empty_df)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -791,21 +763,23 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "bRq2rgCWCPpb" }, + "outputs": [], "source": [ "empty_df = spark.createDataFrame([[\"\"]]).toDF(\"text\")\n", "pipeline_model = nlp_pipeline.fit(empty_df)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "0jEqnP6JBlPK" }, + "outputs": [], "source": [ "text_list = [\n", " {\n", @@ -818,9 +792,7 @@ "\n", "df = spark.createDataFrame(text_list)\n", "results = pipeline_model.transform(df)" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -833,9 +805,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "BBTfftcN3uIs" }, + "outputs": [], "source": [ "from sparknlp_display import NerVisualizer\n", "\n", @@ -846,9 +820,7 @@ " result=result, label_col=\"ner_chunk\", document_col=\"document\", return_html=True\n", " )\n", " logger.log_visualization(viz, name=f\"viz-{idx}.html\")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -861,14 +833,30 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "x9saI2h6Cy5I" }, + "outputs": [], "source": [ "logger.experiment.display(tab=\"assets\")" - ], - "execution_count": null, - "outputs": [] + ] + } + ], + "metadata": { + "colab": { + "machine_shape": "hm", + "provenance": [], + "toc_visible": true + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" } - ] -} \ No newline at end of file + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb b/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb index ee1a045..a930eba 100644 --- a/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb +++ b/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb @@ -26,7 +26,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml tensorflow tensorflow-datasets" + "%pip install -U \"comet_ml>=3.44.0\" tensorflow tensorflow-datasets" ] }, { @@ -48,7 +48,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-tensorboard\")" + "comet_ml.login(project_name=\"comet-example-tensorboard\")" ] }, { diff --git a/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb b/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb index 2d56019..ae4d1f8 100644 --- a/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb +++ b/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb @@ -1,18 +1,4 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - } - }, "cells": [ { "cell_type": "markdown", @@ -25,15 +11,14 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "ebD0DKSh6ZgZ" }, + "outputs": [], "source": [ - "!pip install comet_ml --quiet\n", - "!pip install xgboost --quiet" - ], - "execution_count": null, - "outputs": [] + "%pip install \"comet_ml>=3.44.0\" xgboost" + ] }, { "cell_type": "markdown", @@ -46,6 +31,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -53,12 +39,6 @@ "id": "g3B9EA3w6hQl", "outputId": "27003f0c-88da-4427-f641-7912738277d9" }, - "source": [ - "import comet_ml\n", - "\n", - "comet_ml.init(project_name=\"comet-xgboost\")" - ], - "execution_count": null, "outputs": [ { "name": "stdout", @@ -70,13 +50,18 @@ ] }, { - "output_type": "stream", "name": "stderr", + "output_type": "stream", "text": [ "COMET INFO: Comet API key is valid\n", "COMET INFO: Comet API key saved in /root/.comet.config\n" ] } + ], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login(project_name=\"comet-xgboost\")" ] }, { @@ -90,9 +75,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "uKMTsXPI8o3x" }, + "outputs": [], "source": [ "import os\n", "import pandas as pd\n", @@ -100,9 +87,7 @@ "\n", "from sklearn.datasets import fetch_california_housing\n", "from sklearn.model_selection import train_test_split" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -115,9 +100,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "6akH-3LA62pu" }, + "outputs": [], "source": [ "california = fetch_california_housing()\n", "data = pd.DataFrame(california.data)\n", @@ -128,9 +115,7 @@ "X_train, X_test, y_train, y_test = train_test_split(\n", " X, y, test_size=0.2, random_state=123\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -152,6 +137,7 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/" @@ -159,14 +145,10 @@ "id": "D6TzQXLA-Uuo", "outputId": "e833775d-2e5a-49f1-bc70-d29b15f9432e" }, - "source": [ - "experiment = comet_ml.Experiment()" - ], - "execution_count": null, "outputs": [ { - "output_type": "stream", "name": "stderr", + "output_type": "stream", "text": [ "COMET WARNING: As you are running in a Jupyter environment, you will need to call `experiment.end()` when finished to ensure all metrics and code are logged before exiting.\n", "COMET INFO: Couldn't find a Git repository in '/content' nor in any parent directory. You can override where Comet is looking for a Git Patch by setting the configuration `COMET_GIT_DIRECTORY`\n", @@ -174,6 +156,9 @@ "\n" ] } + ], + "source": [ + "experiment = comet_ml.Experiment()" ] }, { @@ -187,9 +172,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "YNsILwyG86Iy" }, + "outputs": [], "source": [ "param = {\n", " \"objective\": \"reg:squarederror\",\n", @@ -199,9 +186,7 @@ " \"alpha\": 10,\n", " \"n_estimators\": 50,\n", "}" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -214,9 +199,11 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "bK7-MRj49Mp1" }, + "outputs": [], "source": [ "xg_reg = xgb.XGBRegressor(**param)\n", "xg_reg.fit(\n", @@ -225,9 +212,7 @@ " eval_set=[(X_train, y_train), (X_test, y_test)],\n", " eval_metric=\"rmse\",\n", ")" - ], - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -240,14 +225,28 @@ }, { "cell_type": "code", + "execution_count": null, "metadata": { "id": "LSPvvlny9YYi" }, + "outputs": [], "source": [ "experiment.end()" - ], - "execution_count": null, - "outputs": [] + ] } - ] -} \ No newline at end of file + ], + "metadata": { + "colab": { + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb b/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb index ced9e84..8e87e13 100644 --- a/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb +++ b/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb @@ -25,7 +25,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install xgboost comet_ml --quiet" + "%pip install -U \"comet_ml>=3.44.0\" comet_ml" ] }, { @@ -45,7 +45,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-xgboost-tutorial\")" + "comet_ml.login(project_name=\"comet-xgboost-tutorial\")" ] }, { @@ -61,9 +61,8 @@ "metadata": {}, "outputs": [], "source": [ - "\n", - "\n", "from xgboost import XGBClassifier\n", + "\n", "# read data\n", "from sklearn.datasets import load_iris\n", "from sklearn.model_selection import train_test_split\n", @@ -71,12 +70,20 @@ "experiment = comet_ml.Experiment()\n", "\n", "data = load_iris(as_frame=True)\n", - "X_train, X_test, y_train, y_test = train_test_split(data['data'], data['target'], test_size=.2)\n", + "X_train, X_test, y_train, y_test = train_test_split(\n", + " data[\"data\"], data[\"target\"], test_size=0.2\n", + ")\n", "# create model instance\n", - "bst = XGBClassifier(n_estimators=10, max_depth=5, learning_rate=0.1, objective='binary:logistic')\n", + "bst = XGBClassifier(\n", + " n_estimators=10, max_depth=5, learning_rate=0.1, objective=\"binary:logistic\"\n", + ")\n", "# fit model\n", - "bst.fit(X_train, y_train, eval_set=[(X_test, y_test)],\n", - " eval_metric=\"merror\",)" + "bst.fit(\n", + " X_train,\n", + " y_train,\n", + " eval_set=[(X_test, y_test)],\n", + " eval_metric=\"merror\",\n", + ")" ] }, { @@ -94,9 +101,7 @@ "metadata": {}, "outputs": [], "source": [ - "\n", - "\n", - "experiment.display(\"charts\")\n" + "experiment.display(\"charts\")" ] }, { @@ -119,10 +124,10 @@ "\n", "debug_df = X_test.copy()\n", "\n", - "debug_df['pred'] = y_pred\n", - "debug_df['ground_truth'] = y_test\n", + "debug_df[\"pred\"] = y_pred\n", + "debug_df[\"ground_truth\"] = y_test\n", "\n", - "experiment.log_table('prediction_debug_table.csv', debug_df)" + "experiment.log_table(\"prediction_debug_table.csv\", debug_df)" ] }, { diff --git a/integrations/model-training/xgboost/notebooks/xg_comet.ipynb b/integrations/model-training/xgboost/notebooks/xg_comet.ipynb index f73e7b2..dd4985f 100644 --- a/integrations/model-training/xgboost/notebooks/xg_comet.ipynb +++ b/integrations/model-training/xgboost/notebooks/xg_comet.ipynb @@ -31,7 +31,7 @@ }, "outputs": [], "source": [ - "%pip install xgboost comet_ml" + "%pip install -U xgboost \"comet_ml>=3.44.0\"" ] }, { @@ -55,7 +55,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-xgboost-tutorial\")" + "comet_ml.login(project_name=\"comet-xgboost-tutorial\")" ] }, { @@ -82,35 +82,40 @@ }, { "cell_type": "markdown", - "source": [ - "# Create a Comet Experiment" - ], "metadata": { "id": "3RJx33J7GUiE" - } + }, + "source": [ + "# Create a Comet Experiment" + ] }, { "cell_type": "code", - "source": [ - "experiment = comet_ml.Experiment()" - ], + "execution_count": null, "metadata": { "id": "4IUCQ21vGRZL" }, - "execution_count": null, - "outputs": [] + "outputs": [], + "source": [ + "experiment = comet_ml.Experiment()" + ] }, { "cell_type": "markdown", - "source": [ - "# Train A Classification Model on the Iris Dataset" - ], "metadata": { "id": "sFKxD6L7GZdJ" - } + }, + "source": [ + "# Train A Classification Model on the Iris Dataset" + ] }, { "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "Xv51yx3eGY4B" + }, + "outputs": [], "source": [ "data = load_iris(as_frame=True)\n", "\n", @@ -129,12 +134,7 @@ "\n", "# fit model\n", "bst.fit(X_train, y_train, eval_set=[(X_test, y_test)])" - ], - "metadata": { - "id": "Xv51yx3eGY4B" - }, - "execution_count": null, - "outputs": [] + ] }, { "cell_type": "markdown", @@ -210,6 +210,9 @@ } ], "metadata": { + "colab": { + "provenance": [] + }, "kernelspec": { "display_name": "Python 3.11.0 ('nb': venv)", "language": "python", @@ -232,11 +235,8 @@ "interpreter": { "hash": "8c9587381b2341d562742e36a89690be32a732b11830813473890249dd40a07d" } - }, - "colab": { - "provenance": [] } }, "nbformat": 4, "nbformat_minor": 0 -} \ No newline at end of file +} diff --git a/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb b/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb index f97b454..a90e28a 100644 --- a/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb +++ b/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb @@ -36,7 +36,7 @@ }, "outputs": [], "source": [ - "%pip install comet_ml" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -58,7 +58,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-yolov5\")" + "comet_ml.login(project_name=\"comet-example-yolov5\")" ] }, { diff --git a/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb b/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb index 1f99602..4b93d36 100644 --- a/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb +++ b/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb @@ -1,291 +1,292 @@ { - "nbformat": 4, - "nbformat_minor": 0, - "metadata": { - "colab": { - "provenance": [] - }, - "kernelspec": { - "name": "python3", - "display_name": "Python 3" - }, - "language_info": { - "name": "python" - }, - "accelerator": "GPU", - "gpuClass": "standard" + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "id": "wXv4o8i8jJgP" + }, + "source": [ + "![logo_comet.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK4AAABECAYAAAAY0w4KAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABRmSURBVHgB7V3PbxtJdn5VTWrs9S86QIAgQNbtQ5CZk+kgAYIAicnNHhLkYGkm2SSHrCggsb0nS5fsITsmZW+QoyUEQcaeBKLmskGys5KRS26idzZBgAAx/QcEagOb9cwmu6ItjWyL7Hp5r6qa7GZ3U6Qka8xlf0CL7Orq6mb316++eu9VS8AxYbNQKuSgU3RAXlIKiyhEUQgoACItUED6A4JrihYtnh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weJBwQrGURIplgpdBmzsP1APQEuMRpMdTVN+22dfIyxKdsoPY8LOl60f28/rIMGUaC/xAedS3uwxSfrYWVDxvB4Ex7GuLb1+izNmD/tSxgkYFxYIurdyZ3lwMwTUvJubLPvzA17q6SXSvZ9TBcWqapPO3lEq5dMuJmOL75YWxp+8vIZxs5vtW6nrgEQ8/2zDCZOE7isiegFCryiLgXIUOGA+BQUmEkYORlGR7wdKEMGcYF2eAqw1Hg/wEgj6xxdislLwAAAABJRU5ErkJggg==)" + ] }, - "cells": [ - { - "cell_type": "markdown", - "source": [ - "![logo_comet.png](data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAK4AAABECAYAAAAY0w4KAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAABRmSURBVHgB7V3PbxtJdn5VTWrs9S86QIAgQNbtQ5CZk+kgAYIAicnNHhLkYGkm2SSHrCggsb0nS5fsITsmZW+QoyUEQcaeBKLmskGys5KRS26idzZBgAAx/QcEagOb9cwmu6ItjWyL7Hp5r6qa7GZ3U6Qka8xlf0CL7Orq6mb316++eu9VS8AxYbNQKuSgU3RAXlIKiyhEUQgoACItUED6A4JrihYtnhDYAgVNKYXng3r8S60fNCBDBgsBrxE//PnfLCLKaTrIFSJoKTgck1REDo32VDB0WqZM0WfLAdiWCLtCNARC/auf/tsqZJhoHDlx2bK+dfLVrCLCGrKyJRWWk4aw2K0dEBaivEWEnZyALUcRWXmV/5gFuY4Sm2S9v1L+9D88yDCRODLibrqlwpR6OY8+3iRyFrjM0DJEzuCIGD8LtGUtB+EnOQRFZpkIKzRpFW8WbH419Ym4YJVFJbO+k4kjIe6P3F+bR5BV1qq6USG6RIzIABEwVPS2GV0LL0gDfEaEbSMLCclk1ZqCyauJywSmBtCQtkvkDojy732a6d9Jw6GI+8Nf/vWiQLFCNCUtawgZomRPqWq+oiZ0d6P9YD5+RpLg84gkMN9RBWXmk46FSnGzvXpEXm/7Zf7yTK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0NKErHWGLyStSc3xqP6esZ3lzEiMuBhg4NsJLSHXMSLvZbXgpIsIdBR95gAPzvwwon4rR9WDhZzvJ2MxwOsTeSE7GKIuXlER1fBx+W259AidwRV/Y6sEokjER8Ot/XPuFLdpsXlDu/Ha2Hj/SgrUUubA8yZBgR8ciZGpBYToQmYlZI027ol1w49LnRq99+qKXEmt22yRIhqRkiLU+ffsQLfR89cTvDxCNGXD9PQQORnGTNflyIhnxdcOASf2ECC57aE27cgZspRw1ydhNJS2R2aZmGDBlSECMu+3VV8ru/auzHpW091xaC99I3r78XZU32COFFaJ2lAT6GKi2zZNUXQehciBJJhZYmapM0cJSsb/IUlgxfMFLdYVvfATeXt9ZVQjPsi+1skFzIwYV+HUvSYJ6srMkQI1K3FZR5OxNTS4PAwiIsEGG7HgraXqHtPMhriiJchgwZjhskGdx+bcvEJIuKoWWjb3uBLPHdTB5kGBb7/vf0USGsBbaDriJZ1gb0p6mJaACC5QLAYHdaANtuIfNGZDgweEDmfwI3Oz+AyAvTrGbd0tb1kZkaw9ZU69jHvbfmsOWlZZO2lWJtU5nWw/3lTfJa9FnsDBlGAgUVNsk9hrwQgXuEjEqDxPeJ6cFaUOdx/BVQvJ8lfr/scPvLMkweJBwQrGURIplgpdBmzsP1APQEuMRpMdTVN+22dfIyxKdsoPY8LOl60f28/rIMGUaC/xAedS3uwxSfrYWVDxvB4Ex7GuLb1+izNmD/tSxgkYFxYIurdyZ3lwMwTUvJubLPvzA17q6SXSvZ9TBcWqapPO3lEq5dMuJmOL75YWxp+8vIZxs5vtW6nrgEQ8/2zDCZOE7isiegFCryiLgXIUOGA+BQUmEkYORlGR7wdKEMGcYF2eAqw1Hg/wEgj6xxdislLwAAAABJRU5ErkJggg==)" - ], - "metadata": { - "id": "wXv4o8i8jJgP" - } - }, - { - "cell_type": "markdown", - "source": [ - "Ultralytics YOLOv8 is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks.\n", - "\n", - "Data science and machine learning teams use [Comet](https://www.comet.com)โ€™s ML platform to track, compare, explain, and optimize their models across the complete ML lifecycle โ€“ from managing experiments to monitoring models in production. \n", - "\n", - "Comet works with Jupyter Notebooks and Scripts and most importantly it is 100% free to [get started](https://www.comet.com/signup)!\n" - ], - "metadata": { - "id": "OorDXQbLiyTU" - } - }, - { - "cell_type": "markdown", - "source": [ - "# Install dependencies" - ], - "metadata": { - "id": "4tHdCdy1iXJJ" - } - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "id": "eLuCFhOhhThw" - }, - "outputs": [], - "source": [ - "%pip install ultralytics comet_ml torch torchvision -qU" - ] - }, - { - "cell_type": "markdown", - "source": [ - "# Initialize Comet\n", - "\n", - "This will prompt you to enter your API key. You can grab that over [here](https://www.comet.com/signup)" - ], - "metadata": { - "id": "PUusb44jhYIj" - } - }, - { - "cell_type": "code", - "source": [ - "import comet_ml\n", - "comet_ml.init(project_name=\"comet-example-yolov8-coco128\")" - ], - "metadata": { - "id": "RN08xGhPhZpH" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Run Training" - ], - "metadata": { - "id": "JIku-HkBhhVt" - } - }, - { - "cell_type": "code", - "source": [ - "from ultralytics import YOLO\n", - "\n", - "# Load a model\n", - "model = YOLO(\"yolov8n.pt\") # load a pretrained model (recommended for training)\n", - "\n", - "# train the model\n", - "results = model.train(\n", - " data=\"coco128.yaml\",\n", - " project=\"comet-example-yolov8-coco128\",\n", - " batch=32,\n", - " save_period=1,\n", - " save_json=True,\n", - " epochs=3\n", - ")\n" - ], - "metadata": { - "id": "T8yGloEChVzQ" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "# Configuring Comet \n", - "\n", - "You can further configure Comet's logging behaviour with YOLOv8 through Comet specific environment variables. " - ], - "metadata": { - "id": "jghV0NaXlON9" - } - }, - { - "cell_type": "markdown", - "source": [ - "## Changing the number of logged image predictions\n", - "\n", - "By default Comet will log 100 image predictions from the validation set. You can change this by setting the `COMET_MAX_IMAGE_PREDICTIONS` environment variable" - ], - "metadata": { - "id": "z62rGg9wlSDM" - } - }, - { - "cell_type": "code", - "source": [ - "import os\n", - "from ultralytics import YOLO\n", - "\n", - "os.environ[\"COMET_MAX_IMAGE_PREDICTIONS\"] = \"200\"\n", - "\n", - "# Load a model\n", - "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", - "\n", - "# train the model\n", - "results = model.train(\n", - " data=\"coco128.yaml\",\n", - " project=\"comet-example-yolov8-coco128\",\n", - " batch=32,\n", - " save_period=1,\n", - " save_json=True,\n", - " epochs=1,\n", - ")" - ], - "metadata": { - "id": "8xLFNI8XmXxZ" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "## Changing the frequency of Image Prediction Logging\n", - "\n", - "You may want to change how often batches of image predictions are logged to Comet. \n", - "\n", - "Set the `COMET_EVAL_BATCH_LOGGING_INTERVAL` environment variable to control this frequency. By default it is set to `1`, which corresponds to logging predictions from every validation batch. e.g. Setting it to `4` will log every fourth batch\n", - "\n", - "**Note:** YOLOv8 will use a batch size that is double your training batch size when running evaluation. " - ], - "metadata": { - "id": "NJgZvJ0Qt_lp" - } - }, - { - "cell_type": "code", - "source": [ - "import os\n", - "from ultralytics import YOLO\n", - "\n", - "os.environ['COMET_EVAL_BATCH_LOGGING_INTERVAL'] = \"4\"\n", - "\n", - "# Load a model\n", - "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", - "\n", - "# train the model\n", - "results = model.train(\n", - " data=\"coco128.yaml\",\n", - " project=\"comet-example-yolov8-coco128\",\n", - " batch=16,\n", - " save_period=1,\n", - " save_json=True,\n", - " epochs=2,\n", - ")" - ], - "metadata": { - "id": "oXx0yTCtr5Au" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "## Disabling Logging the Confusion Matrix after every Epoch\n", - "\n", - "In case you do not want to log the confusion matrix from your validation set after every epoch, disable it by setting `COMET_EVAL_LOG_CONFUSION_MATRIX` to `false`\n", - "\n", - "The Confusion Matrix will only be logged once, after training is completed. " - ], - "metadata": { - "id": "FvFi71QQrE0V" - } - }, - { - "cell_type": "code", - "source": [ - "import os\n", - "from ultralytics import YOLO\n", - "\n", - "os.environ[\"COMET_EVAL_LOG_CONFUSION_MATRIX\"] = \"false\"\n", - "\n", - "# Load a model\n", - "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", - "\n", - "# train the model\n", - "results = model.train(\n", - " data=\"coco128.yaml\",\n", - " project=\"comet-example-yolov8-coco128\",\n", - " batch=32,\n", - " save_period=1,\n", - " save_json=True,\n", - " epochs=2,\n", - ")" - ], - "metadata": { - "id": "bnkwt2KYF3oM" - }, - "execution_count": null, - "outputs": [] - }, - { - "cell_type": "markdown", - "source": [ - "## Logging to an Offline Experiment\n", - "\n", - "In case you are in a situation where you are using a machine without public internet access you can still enable Comet logging by using an [OfflineExperiment](https://www.comet.com/docs/v2/api-and-sdk/python-sdk/advanced/running-offline/). \n", - "\n", - "Your run will be saved locally in a directory that you can upload to Comet. \n", - "\n", - "Set `COMET_MODE` to `offline` to enable this. " - ], - "metadata": { - "id": "vtIew6FtCtH5" - } - }, - { - "cell_type": "code", - "source": [ - "import os\n", - "from ultralytics import YOLO\n", - "\n", - "os.environ[\"COMET_MODE\"] = \"offline\"\n", - "\n", - "# Load a model\n", - "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", - "\n", - "# train the model\n", - "results = model.train(\n", - " data=\"coco128.yaml\",\n", - " project=\"comet-example-yolov8-coco128\",\n", - " batch=32,\n", - " save_period=1,\n", - " save_json=True,\n", - " epochs=1,\n", - ")" - ], - "metadata": { - "id": "TR7gEek_DPJN" - }, - "execution_count": null, - "outputs": [] - } - ] -} \ No newline at end of file + { + "cell_type": "markdown", + "metadata": { + "id": "OorDXQbLiyTU" + }, + "source": [ + "Ultralytics YOLOv8 is a cutting-edge, state-of-the-art (SOTA) model that builds upon the success of previous YOLO versions and introduces new features and improvements to further boost performance and flexibility. YOLOv8 is designed to be fast, accurate, and easy to use, making it an excellent choice for a wide range of object detection and tracking, instance segmentation, image classification and pose estimation tasks.\n", + "\n", + "Data science and machine learning teams use [Comet](https://www.comet.com)โ€™s ML platform to track, compare, explain, and optimize their models across the complete ML lifecycle โ€“ from managing experiments to monitoring models in production. \n", + "\n", + "Comet works with Jupyter Notebooks and Scripts and most importantly it is 100% free to [get started](https://www.comet.com/signup)!\n" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "4tHdCdy1iXJJ" + }, + "source": [ + "# Install dependencies" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "eLuCFhOhhThw" + }, + "outputs": [], + "source": [ + "%pip install -U ultralytics \"comet_ml>=3.44.0\" torch torchvision -qU" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "PUusb44jhYIj" + }, + "source": [ + "# Initialize Comet\n", + "\n", + "This will prompt you to enter your API key. You can grab that over [here](https://www.comet.com/signup)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "RN08xGhPhZpH" + }, + "outputs": [], + "source": [ + "import comet_ml\n", + "\n", + "comet_ml.login(project_name=\"comet-example-yolov8-coco128\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "JIku-HkBhhVt" + }, + "source": [ + "# Run Training" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "T8yGloEChVzQ" + }, + "outputs": [], + "source": [ + "from ultralytics import YOLO\n", + "\n", + "# Load a model\n", + "model = YOLO(\"yolov8n.pt\") # load a pretrained model (recommended for training)\n", + "\n", + "# train the model\n", + "results = model.train(\n", + " data=\"coco128.yaml\",\n", + " project=\"comet-example-yolov8-coco128\",\n", + " batch=32,\n", + " save_period=1,\n", + " save_json=True,\n", + " epochs=3,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "jghV0NaXlON9" + }, + "source": [ + "# Configuring Comet \n", + "\n", + "You can further configure Comet's logging behaviour with YOLOv8 through Comet specific environment variables. " + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "z62rGg9wlSDM" + }, + "source": [ + "## Changing the number of logged image predictions\n", + "\n", + "By default Comet will log 100 image predictions from the validation set. You can change this by setting the `COMET_MAX_IMAGE_PREDICTIONS` environment variable" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "8xLFNI8XmXxZ" + }, + "outputs": [], + "source": [ + "import os\n", + "from ultralytics import YOLO\n", + "\n", + "os.environ[\"COMET_MAX_IMAGE_PREDICTIONS\"] = \"200\"\n", + "\n", + "# Load a model\n", + "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", + "\n", + "# train the model\n", + "results = model.train(\n", + " data=\"coco128.yaml\",\n", + " project=\"comet-example-yolov8-coco128\",\n", + " batch=32,\n", + " save_period=1,\n", + " save_json=True,\n", + " epochs=1,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "NJgZvJ0Qt_lp" + }, + "source": [ + "## Changing the frequency of Image Prediction Logging\n", + "\n", + "You may want to change how often batches of image predictions are logged to Comet. \n", + "\n", + "Set the `COMET_EVAL_BATCH_LOGGING_INTERVAL` environment variable to control this frequency. By default it is set to `1`, which corresponds to logging predictions from every validation batch. e.g. Setting it to `4` will log every fourth batch\n", + "\n", + "**Note:** YOLOv8 will use a batch size that is double your training batch size when running evaluation. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "oXx0yTCtr5Au" + }, + "outputs": [], + "source": [ + "import os\n", + "from ultralytics import YOLO\n", + "\n", + "os.environ[\"COMET_EVAL_BATCH_LOGGING_INTERVAL\"] = \"4\"\n", + "\n", + "# Load a model\n", + "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", + "\n", + "# train the model\n", + "results = model.train(\n", + " data=\"coco128.yaml\",\n", + " project=\"comet-example-yolov8-coco128\",\n", + " batch=16,\n", + " save_period=1,\n", + " save_json=True,\n", + " epochs=2,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "FvFi71QQrE0V" + }, + "source": [ + "## Disabling Logging the Confusion Matrix after every Epoch\n", + "\n", + "In case you do not want to log the confusion matrix from your validation set after every epoch, disable it by setting `COMET_EVAL_LOG_CONFUSION_MATRIX` to `false`\n", + "\n", + "The Confusion Matrix will only be logged once, after training is completed. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "bnkwt2KYF3oM" + }, + "outputs": [], + "source": [ + "import os\n", + "from ultralytics import YOLO\n", + "\n", + "os.environ[\"COMET_EVAL_LOG_CONFUSION_MATRIX\"] = \"false\"\n", + "\n", + "# Load a model\n", + "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", + "\n", + "# train the model\n", + "results = model.train(\n", + " data=\"coco128.yaml\",\n", + " project=\"comet-example-yolov8-coco128\",\n", + " batch=32,\n", + " save_period=1,\n", + " save_json=True,\n", + " epochs=2,\n", + ")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "id": "vtIew6FtCtH5" + }, + "source": [ + "## Logging to an Offline Experiment\n", + "\n", + "In case you are in a situation where you are using a machine without public internet access you can still enable Comet logging by using an [OfflineExperiment](https://www.comet.com/docs/v2/api-and-sdk/python-sdk/advanced/running-offline/). \n", + "\n", + "Your run will be saved locally in a directory that you can upload to Comet. \n", + "\n", + "Set `COMET_MODE` to `offline` to enable this. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "id": "TR7gEek_DPJN" + }, + "outputs": [], + "source": [ + "import os\n", + "from ultralytics import YOLO\n", + "\n", + "os.environ[\"COMET_MODE\"] = \"offline\"\n", + "\n", + "# Load a model\n", + "model = YOLO(\"yolov8s.pt\") # load a pretrained model (recommended for training)\n", + "\n", + "# train the model\n", + "results = model.train(\n", + " data=\"coco128.yaml\",\n", + " project=\"comet-example-yolov8-coco128\",\n", + " batch=32,\n", + " save_period=1,\n", + " save_json=True,\n", + " epochs=1,\n", + ")" + ] + } + ], + "metadata": { + "accelerator": "GPU", + "colab": { + "provenance": [] + }, + "gpuClass": "standard", + "kernelspec": { + "display_name": "Python 3", + "name": "python3" + }, + "language_info": { + "name": "python" + } + }, + "nbformat": 4, + "nbformat_minor": 0 +} diff --git a/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb b/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb index 130bf3e..8c8303e 100644 --- a/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb +++ b/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb @@ -33,7 +33,7 @@ }, "outputs": [], "source": [ - "%pip install 'gymnasium[classic-control]' comet_ml stable-baselines3 \"numpy<2.0.0\"" + "%pip install -U \"gymnasium[classic-control]\" \"comet_ml>=3.44.0\" stable-baselines3 \"numpy<2.0.0\"" ] }, { @@ -57,7 +57,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-examples-gymnasium-notebook\")" + "comet_ml.login(project_name=\"comet-examples-gymnasium-notebook\")" ] }, { diff --git a/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/metaflow-model-evaluation.py b/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/metaflow-model-evaluation.py index 457665a..3b497e6 100644 --- a/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/metaflow-model-evaluation.py +++ b/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/metaflow-model-evaluation.py @@ -249,6 +249,6 @@ def end(self): if __name__ == "__main__": - comet_ml.init() + comet_ml.login() ModelEvaluationFlow() diff --git a/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/requirements.txt b/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/requirements.txt index 4ee6790..389225d 100644 --- a/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/requirements.txt +++ b/integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/requirements.txt @@ -1,4 +1,4 @@ -comet_ml>=3.31.15 +comet_ml>=3.44.0 datasets metaflow metaflow-card-html diff --git a/integrations/workflow-orchestration/metaflow/notebooks/metaflow_hello_world.ipynb b/integrations/workflow-orchestration/metaflow/notebooks/metaflow_hello_world.ipynb index 93232df..e256365 100644 --- a/integrations/workflow-orchestration/metaflow/notebooks/metaflow_hello_world.ipynb +++ b/integrations/workflow-orchestration/metaflow/notebooks/metaflow_hello_world.ipynb @@ -47,7 +47,7 @@ }, "outputs": [], "source": [ - "%pip install \"comet_ml>=3.31.15\" metaflow numpy" + "%pip install \"comet_ml>=3.44.0\" metaflow numpy" ] }, { @@ -73,7 +73,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-metaflow-hello-world-notebook\")" + "comet_ml.login(project_name=\"comet-example-metaflow-hello-world-notebook\")" ] }, { diff --git a/integrations/workflow-orchestration/metaflow/notebooks/metaflow_model_eval.ipynb b/integrations/workflow-orchestration/metaflow/notebooks/metaflow_model_eval.ipynb index 2f73512..479e54e 100644 --- a/integrations/workflow-orchestration/metaflow/notebooks/metaflow_model_eval.ipynb +++ b/integrations/workflow-orchestration/metaflow/notebooks/metaflow_model_eval.ipynb @@ -28,7 +28,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install \"comet_ml>=3.31.15\" datasets metaflow metaflow-card-html pandas plotly scikit-learn timm torch torchvision transformers" + "%pip install -U \"comet_ml>=3.44.0\" datasets metaflow metaflow-card-html pandas plotly scikit-learn timm torch torchvision transformers" ] }, { @@ -46,7 +46,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init(project_name=\"comet-example-metaflow-model-evaluation-notebook\")" + "comet_ml.login(project_name=\"comet-example-metaflow-model-evaluation-notebook\")" ] }, { @@ -349,7 +349,7 @@ "\n", "\n", "if __name__ == \"__main__\":\n", - " comet_ml.init()\n", + " comet_ml.login()\n", "\n", " ModelEvaluationFlow()\n" ] diff --git a/notebooks/Comet-Confusion-Matrix-Pytorch.ipynb b/notebooks/Comet-Confusion-Matrix-Pytorch.ipynb index da4a9c3..0b36788 100644 --- a/notebooks/Comet-Confusion-Matrix-Pytorch.ipynb +++ b/notebooks/Comet-Confusion-Matrix-Pytorch.ipynb @@ -1,756 +1,754 @@ { - "nbformat": 4, - "nbformat_minor": 5, - "metadata": { + "cells": [ + { + "cell_type": "markdown", + "id": "0ca5f47a-43c1-47ba-9322-c48f645b0908", + "metadata": { + "id": "0ca5f47a-43c1-47ba-9322-c48f645b0908" + }, + "source": [ + "# Pytorch Example with Confusion Matrix with Comet ML\n", + "\n", + "For this example, we will use Pytorch and create a interactive Confusion Matrix\n", + "in Comet ML. You'll need a Comet API key to log the Confusion Matrix, which is free for anyone.\n", + "\n", + "## Overview\n", + "\n", + "Our goal in this demonstration is to train a Pytorch model to categorize images of digits from the MNIST dataset, being able to see examples of each cell in a confusion matrix, like this:\n", + "\n", + "\n", + "\n", + "Comet provides a very easy way to make such confusion matrices. You can do that with a single command:\n", + "\n", + "```python\n", + "experiment.log_confusion_matrix(actual, predicted, images=images)\n", + "```\n", + "\n", + "where `actual` is the ground truth (given as vectors or labels), `predicted` is the ML's prediction (given as vectors or labels), and `images` is a list of image data.\n", + "\n", + "## End-to-End Example\n", + "\n", + "Let's explore a complete example from start to finish. \n", + "\n", + "First, we install the needed Python libraries:" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "dec1NN24O_MH", + "metadata": { + "id": "dec1NN24O_MH" + }, + "outputs": [], + "source": [ + "%pip install \"comet_ml>=3.44.0\" torch torchvision" + ] + }, + { + "cell_type": "markdown", + "id": "9aY1iWM88iUa", + "metadata": { + "id": "9aY1iWM88iUa" + }, + "source": [ + "Now we import Comet:" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "82048786-8d61-44c7-a6d2-0484a69779d0", + "metadata": { + "id": "82048786-8d61-44c7-a6d2-0484a69779d0" + }, + "outputs": [], + "source": [ + "import comet_ml" + ] + }, + { + "cell_type": "markdown", + "id": "65e82fc4-adda-4a7b-a84b-91d7cce363c4", + "metadata": { + "id": "65e82fc4-adda-4a7b-a84b-91d7cce363c4" + }, + "source": [ + "We can then make sure that our Comet API key is properly configured. The following command will give instructions if not:" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "406fa63d-8854-4812-a082-e3ad011ed3fc", + "metadata": { "colab": { - "name": "PytorchConfusionMatrixSimple.ipynb", - "provenance": [], - "collapsed_sections": [] - }, - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.5" + "base_uri": "https://localhost:8080/" + }, + "id": "406fa63d-8854-4812-a082-e3ad011ed3fc", + "outputId": "44a0adc9-12c7-4251-80ac-34bc8318644c" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET INFO: Comet API key is valid\n" + ] } + ], + "source": [ + "comet_ml.login()" + ] }, - "cells": [ - { - "cell_type": "markdown", - "metadata": { - "id": "0ca5f47a-43c1-47ba-9322-c48f645b0908" - }, - "source": [ - "# Pytorch Example with Confusion Matrix with Comet ML\n", - "\n", - "For this example, we will use Pytorch and create a interactive Confusion Matrix\n", - "in Comet ML. You'll need a Comet API key to log the Confusion Matrix, which is free for anyone.\n", - "\n", - "## Overview\n", - "\n", - "Our goal in this demonstration is to train a Pytorch model to categorize images of digits from the MNIST dataset, being able to see examples of each cell in a confusion matrix, like this:\n", - "\n", - "\n", - "\n", - "Comet provides a very easy way to make such confusion matrices. You can do that with a single command:\n", - "\n", - "```python\n", - "experiment.log_confusion_matrix(actual, predicted, images=images)\n", - "```\n", - "\n", - "where `actual` is the ground truth (given as vectors or labels), `predicted` is the ML's prediction (given as vectors or labels), and `images` is a list of image data.\n", - "\n", - "## End-to-End Example\n", - "\n", - "Let's explore a complete example from start to finish. \n", - "\n", - "First, we install the needed Python libraries:" - ], - "id": "0ca5f47a-43c1-47ba-9322-c48f645b0908" - }, - { - "cell_type": "code", - "metadata": { - "id": "dec1NN24O_MH" - }, - "source": [ - "%pip install comet_ml>=3.10.0 torch torchvision --quiet" - ], - "id": "dec1NN24O_MH", - "execution_count": 1, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "9aY1iWM88iUa" - }, - "source": [ - "Now we import Comet:" - ], - "id": "9aY1iWM88iUa" - }, - { - "cell_type": "code", - "metadata": { - "id": "82048786-8d61-44c7-a6d2-0484a69779d0" - }, - "source": [ - "import comet_ml" - ], - "id": "82048786-8d61-44c7-a6d2-0484a69779d0", - "execution_count": 2, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "65e82fc4-adda-4a7b-a84b-91d7cce363c4" - }, - "source": [ - "We can then make sure that our Comet API key is properly configured. The following command will give instructions if not:" - ], - "id": "65e82fc4-adda-4a7b-a84b-91d7cce363c4" - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "406fa63d-8854-4812-a082-e3ad011ed3fc", - "outputId": "44a0adc9-12c7-4251-80ac-34bc8318644c" - }, - "source": [ - "comet_ml.init()" - ], - "id": "406fa63d-8854-4812-a082-e3ad011ed3fc", - "execution_count": 3, - "outputs": [ - { - "output_type": "stream", - "text": [ - "COMET INFO: Comet API key is valid\n" - ], - "name": "stderr" - } - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "6cc97390-6fb2-45eb-9b81-47f25ae73cc7" - }, - "source": [ - "Now, we import the rest of the Python libraries that we will need:" - ], - "id": "6cc97390-6fb2-45eb-9b81-47f25ae73cc7" - }, - { - "cell_type": "code", - "metadata": { - "id": "f11f4599-c2d6-4356-9936-aab28ade436b" - }, - "source": [ - "import torch\n", - "import torch.nn as nn\n", - "import torchvision.datasets as dsets\n", - "import torchvision.transforms as transforms\n", - "from torch.utils.data import SubsetRandomSampler\n", - "from torch.autograd import Variable" - ], - "id": "f11f4599-c2d6-4356-9936-aab28ade436b", - "execution_count": 4, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "32a480fb-f40e-48ec-b27b-12a0cbe72efb" - }, - "source": [ - "## MNIST Dataset\n", - "\n" - ], - "id": "32a480fb-f40e-48ec-b27b-12a0cbe72efb" - }, - { - "cell_type": "markdown", - "metadata": { - "id": "b5b7c632-760c-490b-9d14-8e0e7dcbd277" - }, - "source": [ - "The first time this runs may take a few minutes to download, and then a couple more minutes to process:" - ], - "id": "b5b7c632-760c-490b-9d14-8e0e7dcbd277" - }, - { - "cell_type": "code", - "metadata": { - "id": "0cbb42ca-f73e-4de5-bb4a-d05dc45d6b47" - }, - "source": [ - "train_dataset = dsets.MNIST(\n", - " root='./data/',\n", - " train=True,\n", - " transform=transforms.ToTensor(),\n", - " download=True)\n", - "\n", - "test_dataset = dsets.MNIST(\n", - " root='./data/',\n", - " train=False,\n", - " transform=transforms.ToTensor())" - ], - "id": "0cbb42ca-f73e-4de5-bb4a-d05dc45d6b47", - "execution_count": 5, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "563109fd-e169-4238-ac70-519a1c00c633" - }, - "source": [ - "## Create the Model\n", - "\n", - "We'll now write a function that will create the model.\n", - "\n", - "In this example, we'll take advantage of Comet's `Experiment` to get access to the hyperparameters via `experiment.get_parameter()`. This will be very handy when we later use Comet's Hyperparameter Optimizer to generate the Experiments.\n", - "\n", - "This function will actually return the three components of the model: the rnn, the criterion, and the optimizer." - ], - "id": "563109fd-e169-4238-ac70-519a1c00c633" - }, - { - "cell_type": "code", - "metadata": { - "id": "71cc8afc-0b6e-42e4-a0aa-f66a5b2fe006" - }, - "source": [ - "def build_model(experiment):\n", - " input_size = experiment.get_parameter(\"input_size\")\n", - " hidden_size = experiment.get_parameter(\"hidden_size\")\n", - " num_layers = experiment.get_parameter(\"num_layers\")\n", - " num_classes = experiment.get_parameter(\"num_classes\")\n", - " learning_rate = experiment.get_parameter(\"learning_rate\")\n", - "\n", - " class RNN(nn.Module):\n", - " def __init__(self, input_size, hidden_size, num_layers, num_classes):\n", - " super(RNN, self).__init__()\n", - " self.hidden_size = hidden_size\n", - " self.num_layers = num_layers\n", - " self.lstm = nn.LSTM(\n", - " input_size, \n", - " hidden_size, \n", - " num_layers, \n", - " batch_first=True)\n", - " self.fc = nn.Linear(hidden_size, num_classes)\n", - "\n", - " def forward(self, x):\n", - " # Set initial states\n", - " h0 = Variable(torch.zeros(self.num_layers, x.size(0), \n", - " self.hidden_size))\n", - " c0 = Variable(torch.zeros(self.num_layers, x.size(0), \n", - " self.hidden_size))\n", - "\n", - " # Forward propagate RNN\n", - " self.out, _ = self.lstm(x, (h0, c0))\n", - "\n", - " # Decode hidden state of last time step\n", - " out = self.fc(self.out[:, -1, :])\n", - " return out\n", - "\n", - " rnn = RNN(\n", - " input_size,\n", - " hidden_size,\n", - " num_layers,\n", - " num_classes,\n", - " )\n", - "\n", - " # Loss and Optimizer\n", - " criterion = nn.CrossEntropyLoss()\n", - " optimizer = torch.optim.Adam(rnn.parameters(), lr=learning_rate)\n", - "\n", - " return (rnn, criterion, optimizer)" - ], - "id": "71cc8afc-0b6e-42e4-a0aa-f66a5b2fe006", - "execution_count": 6, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "53886701-7210-4895-b946-cfd7d788662b" - }, - "source": [ - "We'll call this function below, once we create an `Experiment`." - ], - "id": "53886701-7210-4895-b946-cfd7d788662b" - }, - { - "cell_type": "markdown", - "metadata": { - "id": "8114f369-7ba3-4783-93f4-c13ac1c70a4b" - }, - "source": [ - "## Train the Dataset on the Model\n", - "\n", - "Now we are ready to set up a Comet Experiment, and train the model.\n", - "\n", - "First, we can set all of the Hyperparameters of the model:" - ], - "id": "8114f369-7ba3-4783-93f4-c13ac1c70a4b" - }, - { - "cell_type": "code", - "metadata": { - "id": "c8b50453-3097-4a0b-9cf3-9b69f8b51df7" - }, - "source": [ - "hyper_params = {\n", - " \"epochs\": 10,\n", - " \"batch_size\": 120,\n", - " \"first_layer_units\": 128,\n", - " \"sequence_length\": 28,\n", - " \"input_size\": 28,\n", - " \"hidden_size\": 128,\n", - " \"num_layers\": 2,\n", - " \"num_classes\": 10,\n", - " \"learning_rate\": 0.01\n", - "}" - ], - "id": "c8b50453-3097-4a0b-9cf3-9b69f8b51df7", - "execution_count": 7, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "062c6192-5c29-41ca-8841-5ceb82b7d978" - }, - "source": [ - "Next we create the experiment, and log the Hyperparameters:" - ], - "id": "062c6192-5c29-41ca-8841-5ceb82b7d978" - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "174f3481-0798-4a11-acda-e651753a1caa", - "outputId": "b9038054-a7b9-483a-8a19-11eb7c2f114c" - }, - "source": [ - "experiment = comet_ml.Experiment(project_name=\"pytorch-confusion-matrix\")\n", - "experiment.log_parameters(hyper_params)" - ], - "id": "174f3481-0798-4a11-acda-e651753a1caa", - "execution_count": 8, - "outputs": [ - { - "output_type": "stream", - "text": [ - "COMET WARNING: As you are running in a Jupyter environment, you will need to call `experiment.end()` when finished to ensure all metrics and code are logged before exiting.\n", - "COMET INFO: Experiment is live on comet.ml https://www.comet.ml/dsblank/pytorch-confusion-matrix/819f19ee68ba4b91bab88421b795451d\n", - "\n" - ], - "name": "stderr" - } - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "4a5976cc-79e6-43ae-8301-8c39abf302a0" - }, - "source": [ - "We can now construct the model components:" - ], - "id": "4a5976cc-79e6-43ae-8301-8c39abf302a0" - }, - { - "cell_type": "code", - "metadata": { - "id": "8778542d-da44-4f7e-a01e-2e24d2dfec3e" - }, - "source": [ - "rnn, criterion, optimizer = build_model(experiment)" - ], - "id": "8778542d-da44-4f7e-a01e-2e24d2dfec3e", - "execution_count": 9, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "423e17c2-e9ef-473c-b2ee-055669033984" - }, - "source": [ - "To make this demonstration go a little faster, we'll just use a sample of the items from the training set:" - ], - "id": "423e17c2-e9ef-473c-b2ee-055669033984" - }, - { - "cell_type": "code", - "metadata": { - "id": "56724a82-9a93-4af8-b0d2-6492364d4be9" - }, - "source": [ - "SAMPLE_SIZE = 1000" - ], - "id": "56724a82-9a93-4af8-b0d2-6492364d4be9", - "execution_count": 10, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "acczEZl36Bml" - }, - "source": [ - "Now we can construct the loader:" - ], - "id": "acczEZl36Bml" - }, - { - "cell_type": "code", - "metadata": { - "id": "761fe054-c539-4883-a58f-ad46a0108fcb" - }, - "source": [ - "sampler = SubsetRandomSampler(list(range(SAMPLE_SIZE)))\n", - "train_loader = torch.utils.data.DataLoader(\n", - " dataset=train_dataset,\n", - " batch_size=experiment.get_parameter('batch_size'),\n", - " sampler=sampler,\n", - " #shuffle=True, # can't use shuffle with sampler\n", - ")" - ], - "id": "761fe054-c539-4883-a58f-ad46a0108fcb", - "execution_count": 11, - "outputs": [] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "EaVEhHpJC2nY" - }, - "source": [ - "Instead, if you would rather train on the entire dataset, you can:\n", - "\n", - "```python\n", - "train_loader = torch.utils.data.DataLoader(\n", - " dataset=train_dataset,\n", - " batch_size=experiment.get_parameter('batch_size'),\n", - " shuffle=True,\n", - ")\n", - "```" - ], - "id": "EaVEhHpJC2nY" - }, - { - "cell_type": "markdown", - "metadata": { - "id": "RZvVJzzE6FgW" - }, - "source": [ - "Now we can train the model. Some items to note:\n", - "\n", - "1. We use `experiment.train()` to provide the context for logged metrics\n", - "2. We collect the actual, predicted, and images for each batch\n", - "3. At the end of the epoch, compute and log the confusion matrix" - ], - "id": "RZvVJzzE6FgW" - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "8548f3f5-e1ef-4c35-b383-3dbe01941025", - "tags": [], - "outputId": "5df2bd81-5202-46b4-bb09-d3af5f07d5d3" - }, - "source": [ - "with experiment.train():\n", - " step = 0\n", - " for epoch in range(experiment.get_parameter('epochs')):\n", - " print(\"\\nepoch:\", epoch)\n", - " correct = 0\n", - " total = 0\n", - " for batch_step, (images, labels) in enumerate(train_loader):\n", - " print(\".\", end=\"\")\n", - " images = Variable(images.view(\n", - " -1,\n", - " experiment.get_parameter('sequence_length'),\n", - " experiment.get_parameter(\"input_size\")))\n", - "\n", - " labels = Variable(labels)\n", - "\n", - " # Forward + Backward + Optimize\n", - " optimizer.zero_grad()\n", - " outputs = rnn(images)\n", - " loss = criterion(outputs, labels)\n", - " loss.backward()\n", - " optimizer.step()\n", - "\n", - " # Compute train accuracy\n", - " _, predicted = torch.max(outputs.data, 1)\n", - " batch_total = labels.size(0)\n", - " total += batch_total\n", - "\n", - " batch_correct = (predicted == labels.data).sum()\n", - " correct += batch_correct\n", - "\n", - " # Log batch_accuracy to Comet.ml; step is each batch\n", - " step += 1\n", - " experiment.log_metric(\"batch_accuracy\", \n", - " batch_correct / batch_total, step=step)\n", - "\n", - " if (batch_step + 1) % 100 == 0:\n", - " print('Epoch [%d/%d], Step [%d/%d], Loss: %.4f' % (\n", - " epoch + 1,\n", - " experiment.get_parameter('epochs'),\n", - " batch_step + 1,\n", - " len(train_dataset) // experiment.get_parameter('batch_size'),\n", - " loss.item()))\n", - "\n", - " # Log epoch accuracy to Comet.ml; step is each epoch\n", - " experiment.log_metric(\"batch_accuracy\", correct / total, \n", - " step=epoch, epoch=epoch)" - ], - "id": "8548f3f5-e1ef-4c35-b383-3dbe01941025", - "execution_count": 12, - "outputs": [ - { - "output_type": "stream", - "text": [ - "\n", - "epoch: 0\n", - ".........\n", - "epoch: 1\n", - ".........\n", - "epoch: 2\n", - ".........\n", - "epoch: 3\n", - ".........\n", - "epoch: 4\n", - ".........\n", - "epoch: 5\n", - ".........\n", - "epoch: 6\n", - ".........\n", - "epoch: 7\n", - ".........\n", - "epoch: 8\n", - ".........\n", - "epoch: 9\n", - "........." - ], - "name": "stdout" - } - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "92436469-0313-46ca-817e-6f0ed4c6a663" - }, - "source": [ - "### Comet Confusion Matrix\n", - "\n", - "After the training loop, we can then test the test dataset with:\n", - "\n", - "```python\n", - "confusion_matrix = experiment.create_confusion_matrix()\n", - "for batch in batches:\n", - " ...\n", - " confusion_matrix.compute_matrix(actual, predicted, images=images)\n", - "experiment.log_confusion_matrix(matrix=confusion_matrix)\n", - "```\n", - "and that will create a nice Confusion Matrix visualization in Comet with image examples.\n", - "\n", - "Here is the actual code:" - ], - "id": "92436469-0313-46ca-817e-6f0ed4c6a663" - }, - { - "cell_type": "code", - "metadata": { - "id": "9d04c26b-94ad-4869-bbf7-7a817bad7dcb", - "colab": { - "base_uri": "https://localhost:8080/" - }, - "outputId": "9a3c00d9-ef1d-4b8a-9d36-137c834415ca" - }, - "source": [ - "test_loader = torch.utils.data.DataLoader(\n", - " dataset=test_dataset,\n", - " batch_size=32,\n", - " shuffle=False,\n", - ")\n", - "\n", - "confusion_matrix = experiment.create_confusion_matrix()\n", - "\n", - "for batch_step, (images, labels) in enumerate(test_loader):\n", - " print(\".\", end=\"\")\n", - " images = Variable(images.view(\n", - " -1,\n", - " experiment.get_parameter('sequence_length'),\n", - " experiment.get_parameter(\"input_size\")))\n", - " labels = Variable(labels)\n", - "\n", - " outputs = rnn(images)\n", - " _, predicted = torch.max(outputs.data, 1)\n", - " \n", - " confusion_matrix.compute_matrix(\n", - " labels.data, \n", - " predicted, \n", - " images=images)\n", - "\n", - "experiment.log_confusion_matrix(\n", - " matrix=confusion_matrix,\n", - " title=\"MNIST Confusion Matrix, Epoch #%d\" % (epoch + 1),\n", - " file_name=\"confusion-matrix-%03d.json\" % (epoch + 1),\n", - ");\n" - ], - "id": "9d04c26b-94ad-4869-bbf7-7a817bad7dcb", - "execution_count": 13, - "outputs": [ - { - "output_type": "stream", - "text": [ - "........................................................................................................................................................................................................................................................................................................................." - ], - "name": "stdout" - } - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "B9Rl3sOHJt8u" - }, - "source": [ - "Now, because we are in a Jupyter Notebook, we signal that the experiment has completed:" - ], - "id": "B9Rl3sOHJt8u" - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/" - }, - "id": "0d993454-6ea1-4b61-9cba-8425ba2c7eba", - "outputId": "5145f3dd-9e41-466c-ea56-923ea67306cd" - }, - "source": [ - "experiment.end()" - ], - "id": "0d993454-6ea1-4b61-9cba-8425ba2c7eba", - "execution_count": 14, - "outputs": [ - { - "output_type": "stream", - "text": [ - "COMET INFO: ---------------------------\n", - "COMET INFO: Comet.ml Experiment Summary\n", - "COMET INFO: ---------------------------\n", - "COMET INFO: Data:\n", - "COMET INFO: display_summary_level : 1\n", - "COMET INFO: url : https://www.comet.ml/dsblank/pytorch-confusion-matrix/819f19ee68ba4b91bab88421b795451d\n", - "COMET INFO: Metrics [count] (min, max):\n", - "COMET INFO: train_batch_accuracy [100] : (0.10000000149011612, 0.925000011920929)\n", - "COMET INFO: train_loss [9] : (0.4030756652355194, 2.309687614440918)\n", - "COMET INFO: Parameters:\n", - "COMET INFO: batch_size : 120\n", - "COMET INFO: epochs : 10\n", - "COMET INFO: first_layer_units : 128\n", - "COMET INFO: hidden_size : 128\n", - "COMET INFO: input_size : 28\n", - "COMET INFO: learning_rate : 0.01\n", - "COMET INFO: num_classes : 10\n", - "COMET INFO: num_layers : 2\n", - "COMET INFO: sequence_length : 28\n", - "COMET INFO: Uploads [count]:\n", - "COMET INFO: confusion-matrix : 1\n", - "COMET INFO: environment details : 1\n", - "COMET INFO: filename : 1\n", - "COMET INFO: images [1258] : 1258\n", - "COMET INFO: installed packages : 1\n", - "COMET INFO: model graph : 1\n", - "COMET INFO: notebook : 1\n", - "COMET INFO: os packages : 1\n", - "COMET INFO: source_code : 1\n", - "COMET INFO: ---------------------------\n", - "COMET INFO: Uploading metrics, params, and assets to Comet before program termination (may take several seconds)\n", - "COMET INFO: The Python SDK has 3600 seconds to finish before aborting...\n" - ], - "name": "stderr" - } - ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "4JAptoP87RW1" - }, - "source": [ - "Finally, we can explore the Confusion Matrix in the Comet UI. You can select the epoch by selecting the \"Confusion Matrix Name\" and click on a cell to see examples of that type." - ], - "id": "4JAptoP87RW1" - }, - { - "cell_type": "code", - "metadata": { - "colab": { - "base_uri": "https://localhost:8080/", - "height": 821 - }, - "id": "6af03e15-bc30-4d26-b743-ff425d789137", - "outputId": "4f40a1ae-fd2f-4cba-f09f-6709216086b2" - }, - "source": [ - "experiment.display(tab=\"confusion-matrix\")" - ], - "id": "6af03e15-bc30-4d26-b743-ff425d789137", - "execution_count": 15, - "outputs": [ - { - "output_type": "display_data", - "data": { - "text/html": [ - "\n", - " \n", - " " - ], - "text/plain": [ - "" - ] - }, - "metadata": { - "tags": [] - } - } + { + "cell_type": "markdown", + "id": "6cc97390-6fb2-45eb-9b81-47f25ae73cc7", + "metadata": { + "id": "6cc97390-6fb2-45eb-9b81-47f25ae73cc7" + }, + "source": [ + "Now, we import the rest of the Python libraries that we will need:" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "f11f4599-c2d6-4356-9936-aab28ade436b", + "metadata": { + "id": "f11f4599-c2d6-4356-9936-aab28ade436b" + }, + "outputs": [], + "source": [ + "import torch\n", + "import torch.nn as nn\n", + "import torchvision.datasets as dsets\n", + "import torchvision.transforms as transforms\n", + "from torch.utils.data import SubsetRandomSampler\n", + "from torch.autograd import Variable" + ] + }, + { + "cell_type": "markdown", + "id": "32a480fb-f40e-48ec-b27b-12a0cbe72efb", + "metadata": { + "id": "32a480fb-f40e-48ec-b27b-12a0cbe72efb" + }, + "source": [ + "## MNIST Dataset\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "id": "b5b7c632-760c-490b-9d14-8e0e7dcbd277", + "metadata": { + "id": "b5b7c632-760c-490b-9d14-8e0e7dcbd277" + }, + "source": [ + "The first time this runs may take a few minutes to download, and then a couple more minutes to process:" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "0cbb42ca-f73e-4de5-bb4a-d05dc45d6b47", + "metadata": { + "id": "0cbb42ca-f73e-4de5-bb4a-d05dc45d6b47" + }, + "outputs": [], + "source": [ + "train_dataset = dsets.MNIST(\n", + " root=\"./data/\", train=True, transform=transforms.ToTensor(), download=True\n", + ")\n", + "\n", + "test_dataset = dsets.MNIST(root=\"./data/\", train=False, transform=transforms.ToTensor())" + ] + }, + { + "cell_type": "markdown", + "id": "563109fd-e169-4238-ac70-519a1c00c633", + "metadata": { + "id": "563109fd-e169-4238-ac70-519a1c00c633" + }, + "source": [ + "## Create the Model\n", + "\n", + "We'll now write a function that will create the model.\n", + "\n", + "In this example, we'll take advantage of Comet's `Experiment` to get access to the hyperparameters via `experiment.get_parameter()`. This will be very handy when we later use Comet's Hyperparameter Optimizer to generate the Experiments.\n", + "\n", + "This function will actually return the three components of the model: the rnn, the criterion, and the optimizer." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "id": "71cc8afc-0b6e-42e4-a0aa-f66a5b2fe006", + "metadata": { + "id": "71cc8afc-0b6e-42e4-a0aa-f66a5b2fe006" + }, + "outputs": [], + "source": [ + "def build_model(experiment):\n", + " input_size = experiment.get_parameter(\"input_size\")\n", + " hidden_size = experiment.get_parameter(\"hidden_size\")\n", + " num_layers = experiment.get_parameter(\"num_layers\")\n", + " num_classes = experiment.get_parameter(\"num_classes\")\n", + " learning_rate = experiment.get_parameter(\"learning_rate\")\n", + "\n", + " class RNN(nn.Module):\n", + " def __init__(self, input_size, hidden_size, num_layers, num_classes):\n", + " super(RNN, self).__init__()\n", + " self.hidden_size = hidden_size\n", + " self.num_layers = num_layers\n", + " self.lstm = nn.LSTM(input_size, hidden_size, num_layers, batch_first=True)\n", + " self.fc = nn.Linear(hidden_size, num_classes)\n", + "\n", + " def forward(self, x):\n", + " # Set initial states\n", + " h0 = Variable(torch.zeros(self.num_layers, x.size(0), self.hidden_size))\n", + " c0 = Variable(torch.zeros(self.num_layers, x.size(0), self.hidden_size))\n", + "\n", + " # Forward propagate RNN\n", + " self.out, _ = self.lstm(x, (h0, c0))\n", + "\n", + " # Decode hidden state of last time step\n", + " out = self.fc(self.out[:, -1, :])\n", + " return out\n", + "\n", + " rnn = RNN(\n", + " input_size,\n", + " hidden_size,\n", + " num_layers,\n", + " num_classes,\n", + " )\n", + "\n", + " # Loss and Optimizer\n", + " criterion = nn.CrossEntropyLoss()\n", + " optimizer = torch.optim.Adam(rnn.parameters(), lr=learning_rate)\n", + "\n", + " return (rnn, criterion, optimizer)" + ] + }, + { + "cell_type": "markdown", + "id": "53886701-7210-4895-b946-cfd7d788662b", + "metadata": { + "id": "53886701-7210-4895-b946-cfd7d788662b" + }, + "source": [ + "We'll call this function below, once we create an `Experiment`." + ] + }, + { + "cell_type": "markdown", + "id": "8114f369-7ba3-4783-93f4-c13ac1c70a4b", + "metadata": { + "id": "8114f369-7ba3-4783-93f4-c13ac1c70a4b" + }, + "source": [ + "## Train the Dataset on the Model\n", + "\n", + "Now we are ready to set up a Comet Experiment, and train the model.\n", + "\n", + "First, we can set all of the Hyperparameters of the model:" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "id": "c8b50453-3097-4a0b-9cf3-9b69f8b51df7", + "metadata": { + "id": "c8b50453-3097-4a0b-9cf3-9b69f8b51df7" + }, + "outputs": [], + "source": [ + "hyper_params = {\n", + " \"epochs\": 10,\n", + " \"batch_size\": 120,\n", + " \"first_layer_units\": 128,\n", + " \"sequence_length\": 28,\n", + " \"input_size\": 28,\n", + " \"hidden_size\": 128,\n", + " \"num_layers\": 2,\n", + " \"num_classes\": 10,\n", + " \"learning_rate\": 0.01,\n", + "}" + ] + }, + { + "cell_type": "markdown", + "id": "062c6192-5c29-41ca-8841-5ceb82b7d978", + "metadata": { + "id": "062c6192-5c29-41ca-8841-5ceb82b7d978" + }, + "source": [ + "Next we create the experiment, and log the Hyperparameters:" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "id": "174f3481-0798-4a11-acda-e651753a1caa", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "174f3481-0798-4a11-acda-e651753a1caa", + "outputId": "b9038054-a7b9-483a-8a19-11eb7c2f114c" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET WARNING: As you are running in a Jupyter environment, you will need to call `experiment.end()` when finished to ensure all metrics and code are logged before exiting.\n", + "COMET INFO: Experiment is live on comet.ml https://www.comet.ml/dsblank/pytorch-confusion-matrix/819f19ee68ba4b91bab88421b795451d\n", + "\n" + ] + } + ], + "source": [ + "experiment = comet_ml.Experiment(project_name=\"pytorch-confusion-matrix\")\n", + "experiment.log_parameters(hyper_params)" + ] + }, + { + "cell_type": "markdown", + "id": "4a5976cc-79e6-43ae-8301-8c39abf302a0", + "metadata": { + "id": "4a5976cc-79e6-43ae-8301-8c39abf302a0" + }, + "source": [ + "We can now construct the model components:" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "id": "8778542d-da44-4f7e-a01e-2e24d2dfec3e", + "metadata": { + "id": "8778542d-da44-4f7e-a01e-2e24d2dfec3e" + }, + "outputs": [], + "source": [ + "rnn, criterion, optimizer = build_model(experiment)" + ] + }, + { + "cell_type": "markdown", + "id": "423e17c2-e9ef-473c-b2ee-055669033984", + "metadata": { + "id": "423e17c2-e9ef-473c-b2ee-055669033984" + }, + "source": [ + "To make this demonstration go a little faster, we'll just use a sample of the items from the training set:" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "id": "56724a82-9a93-4af8-b0d2-6492364d4be9", + "metadata": { + "id": "56724a82-9a93-4af8-b0d2-6492364d4be9" + }, + "outputs": [], + "source": [ + "SAMPLE_SIZE = 1000" + ] + }, + { + "cell_type": "markdown", + "id": "acczEZl36Bml", + "metadata": { + "id": "acczEZl36Bml" + }, + "source": [ + "Now we can construct the loader:" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "761fe054-c539-4883-a58f-ad46a0108fcb", + "metadata": { + "id": "761fe054-c539-4883-a58f-ad46a0108fcb" + }, + "outputs": [], + "source": [ + "sampler = SubsetRandomSampler(list(range(SAMPLE_SIZE)))\n", + "train_loader = torch.utils.data.DataLoader(\n", + " dataset=train_dataset,\n", + " batch_size=experiment.get_parameter(\"batch_size\"),\n", + " sampler=sampler,\n", + " # shuffle=True, # can't use shuffle with sampler\n", + ")" + ] + }, + { + "cell_type": "markdown", + "id": "EaVEhHpJC2nY", + "metadata": { + "id": "EaVEhHpJC2nY" + }, + "source": [ + "Instead, if you would rather train on the entire dataset, you can:\n", + "\n", + "```python\n", + "train_loader = torch.utils.data.DataLoader(\n", + " dataset=train_dataset,\n", + " batch_size=experiment.get_parameter('batch_size'),\n", + " shuffle=True,\n", + ")\n", + "```" + ] + }, + { + "cell_type": "markdown", + "id": "RZvVJzzE6FgW", + "metadata": { + "id": "RZvVJzzE6FgW" + }, + "source": [ + "Now we can train the model. Some items to note:\n", + "\n", + "1. We use `experiment.train()` to provide the context for logged metrics\n", + "2. We collect the actual, predicted, and images for each batch\n", + "3. At the end of the epoch, compute and log the confusion matrix" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "id": "8548f3f5-e1ef-4c35-b383-3dbe01941025", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "8548f3f5-e1ef-4c35-b383-3dbe01941025", + "outputId": "5df2bd81-5202-46b4-bb09-d3af5f07d5d3", + "tags": [] + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "epoch: 0\n", + ".........\n", + "epoch: 1\n", + ".........\n", + "epoch: 2\n", + ".........\n", + "epoch: 3\n", + ".........\n", + "epoch: 4\n", + ".........\n", + "epoch: 5\n", + ".........\n", + "epoch: 6\n", + ".........\n", + "epoch: 7\n", + ".........\n", + "epoch: 8\n", + ".........\n", + "epoch: 9\n", + "........." + ] + } + ], + "source": [ + "with experiment.train():\n", + " step = 0\n", + " for epoch in range(experiment.get_parameter(\"epochs\")):\n", + " print(\"\\nepoch:\", epoch)\n", + " correct = 0\n", + " total = 0\n", + " for batch_step, (images, labels) in enumerate(train_loader):\n", + " print(\".\", end=\"\")\n", + " images = Variable(\n", + " images.view(\n", + " -1,\n", + " experiment.get_parameter(\"sequence_length\"),\n", + " experiment.get_parameter(\"input_size\"),\n", + " )\n", + " )\n", + "\n", + " labels = Variable(labels)\n", + "\n", + " # Forward + Backward + Optimize\n", + " optimizer.zero_grad()\n", + " outputs = rnn(images)\n", + " loss = criterion(outputs, labels)\n", + " loss.backward()\n", + " optimizer.step()\n", + "\n", + " # Compute train accuracy\n", + " _, predicted = torch.max(outputs.data, 1)\n", + " batch_total = labels.size(0)\n", + " total += batch_total\n", + "\n", + " batch_correct = (predicted == labels.data).sum()\n", + " correct += batch_correct\n", + "\n", + " # Log batch_accuracy to Comet.ml; step is each batch\n", + " step += 1\n", + " experiment.log_metric(\n", + " \"batch_accuracy\", batch_correct / batch_total, step=step\n", + " )\n", + "\n", + " if (batch_step + 1) % 100 == 0:\n", + " print(\n", + " \"Epoch [%d/%d], Step [%d/%d], Loss: %.4f\"\n", + " % (\n", + " epoch + 1,\n", + " experiment.get_parameter(\"epochs\"),\n", + " batch_step + 1,\n", + " len(train_dataset) // experiment.get_parameter(\"batch_size\"),\n", + " loss.item(),\n", + " )\n", + " )\n", + "\n", + " # Log epoch accuracy to Comet.ml; step is each epoch\n", + " experiment.log_metric(\n", + " \"batch_accuracy\", correct / total, step=epoch, epoch=epoch\n", + " )" + ] + }, + { + "cell_type": "markdown", + "id": "92436469-0313-46ca-817e-6f0ed4c6a663", + "metadata": { + "id": "92436469-0313-46ca-817e-6f0ed4c6a663" + }, + "source": [ + "### Comet Confusion Matrix\n", + "\n", + "After the training loop, we can then test the test dataset with:\n", + "\n", + "```python\n", + "confusion_matrix = experiment.create_confusion_matrix()\n", + "for batch in batches:\n", + " ...\n", + " confusion_matrix.compute_matrix(actual, predicted, images=images)\n", + "experiment.log_confusion_matrix(matrix=confusion_matrix)\n", + "```\n", + "and that will create a nice Confusion Matrix visualization in Comet with image examples.\n", + "\n", + "Here is the actual code:" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "id": "9d04c26b-94ad-4869-bbf7-7a817bad7dcb", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "9d04c26b-94ad-4869-bbf7-7a817bad7dcb", + "outputId": "9a3c00d9-ef1d-4b8a-9d36-137c834415ca" + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "........................................................................................................................................................................................................................................................................................................................." + ] + } + ], + "source": [ + "test_loader = torch.utils.data.DataLoader(\n", + " dataset=test_dataset,\n", + " batch_size=32,\n", + " shuffle=False,\n", + ")\n", + "\n", + "confusion_matrix = experiment.create_confusion_matrix()\n", + "\n", + "for batch_step, (images, labels) in enumerate(test_loader):\n", + " print(\".\", end=\"\")\n", + " images = Variable(\n", + " images.view(\n", + " -1,\n", + " experiment.get_parameter(\"sequence_length\"),\n", + " experiment.get_parameter(\"input_size\"),\n", + " )\n", + " )\n", + " labels = Variable(labels)\n", + "\n", + " outputs = rnn(images)\n", + " _, predicted = torch.max(outputs.data, 1)\n", + "\n", + " confusion_matrix.compute_matrix(labels.data, predicted, images=images)\n", + "\n", + "experiment.log_confusion_matrix(\n", + " matrix=confusion_matrix,\n", + " title=\"MNIST Confusion Matrix, Epoch #%d\" % (epoch + 1),\n", + " file_name=\"confusion-matrix-%03d.json\" % (epoch + 1),\n", + ");" + ] + }, + { + "cell_type": "markdown", + "id": "B9Rl3sOHJt8u", + "metadata": { + "id": "B9Rl3sOHJt8u" + }, + "source": [ + "Now, because we are in a Jupyter Notebook, we signal that the experiment has completed:" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "0d993454-6ea1-4b61-9cba-8425ba2c7eba", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/" + }, + "id": "0d993454-6ea1-4b61-9cba-8425ba2c7eba", + "outputId": "5145f3dd-9e41-466c-ea56-923ea67306cd" + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "COMET INFO: ---------------------------\n", + "COMET INFO: Comet.ml Experiment Summary\n", + "COMET INFO: ---------------------------\n", + "COMET INFO: Data:\n", + "COMET INFO: display_summary_level : 1\n", + "COMET INFO: url : https://www.comet.ml/dsblank/pytorch-confusion-matrix/819f19ee68ba4b91bab88421b795451d\n", + "COMET INFO: Metrics [count] (min, max):\n", + "COMET INFO: train_batch_accuracy [100] : (0.10000000149011612, 0.925000011920929)\n", + "COMET INFO: train_loss [9] : (0.4030756652355194, 2.309687614440918)\n", + "COMET INFO: Parameters:\n", + "COMET INFO: batch_size : 120\n", + "COMET INFO: epochs : 10\n", + "COMET INFO: first_layer_units : 128\n", + "COMET INFO: hidden_size : 128\n", + "COMET INFO: input_size : 28\n", + "COMET INFO: learning_rate : 0.01\n", + "COMET INFO: num_classes : 10\n", + "COMET INFO: num_layers : 2\n", + "COMET INFO: sequence_length : 28\n", + "COMET INFO: Uploads [count]:\n", + "COMET INFO: confusion-matrix : 1\n", + "COMET INFO: environment details : 1\n", + "COMET INFO: filename : 1\n", + "COMET INFO: images [1258] : 1258\n", + "COMET INFO: installed packages : 1\n", + "COMET INFO: model graph : 1\n", + "COMET INFO: notebook : 1\n", + "COMET INFO: os packages : 1\n", + "COMET INFO: source_code : 1\n", + "COMET INFO: ---------------------------\n", + "COMET INFO: Uploading metrics, params, and assets to Comet before program termination (may take several seconds)\n", + "COMET INFO: The Python SDK has 3600 seconds to finish before aborting...\n" + ] + } + ], + "source": [ + "experiment.end()" + ] + }, + { + "cell_type": "markdown", + "id": "4JAptoP87RW1", + "metadata": { + "id": "4JAptoP87RW1" + }, + "source": [ + "Finally, we can explore the Confusion Matrix in the Comet UI. You can select the epoch by selecting the \"Confusion Matrix Name\" and click on a cell to see examples of that type." + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "6af03e15-bc30-4d26-b743-ff425d789137", + "metadata": { + "colab": { + "base_uri": "https://localhost:8080/", + "height": 821 + }, + "id": "6af03e15-bc30-4d26-b743-ff425d789137", + "outputId": "4f40a1ae-fd2f-4cba-f09f-6709216086b2" + }, + "outputs": [ + { + "data": { + "text/html": [ + "\n", + " \n", + " " + ], + "text/plain": [ + "" ] - }, - { - "cell_type": "markdown", - "metadata": { - "id": "fkZRIi8CJ7-G" - }, - "source": [ - "Clicking on a cell in the matrix should show up to 25 examples of that type of confusion or correct classification.\n", - "\n", - "For more information about Comet ML, please see:\n", - "\n", - "1. [Getting started in 30 seconds](https://www.comet.ml/docs/python-sdk/getting-started/)\n", - "2. [Experiments](https://www.comet.ml/docs/python-sdk/experiment-overview/)\n", - "3. [Working with Jupyter Notebooks](https://www.comet.ml/docs/python-sdk/JupyterNotebooks/)\n", - "4. [Confusion Matrix](https://www.comet.ml/docs/python-sdk/Comet-Confusion-Matrix/)" - ], - "id": "fkZRIi8CJ7-G" + }, + "metadata": { + "tags": [] + }, + "output_type": "display_data" } - ] -} \ No newline at end of file + ], + "source": [ + "experiment.display(tab=\"confusion-matrix\")" + ] + }, + { + "cell_type": "markdown", + "id": "fkZRIi8CJ7-G", + "metadata": { + "id": "fkZRIi8CJ7-G" + }, + "source": [ + "Clicking on a cell in the matrix should show up to 25 examples of that type of confusion or correct classification.\n", + "\n", + "For more information about Comet ML, please see:\n", + "\n", + "1. [Getting started in 30 seconds](https://www.comet.ml/docs/python-sdk/getting-started/)\n", + "2. [Experiments](https://www.comet.ml/docs/python-sdk/experiment-overview/)\n", + "3. [Working with Jupyter Notebooks](https://www.comet.ml/docs/python-sdk/JupyterNotebooks/)\n", + "4. [Confusion Matrix](https://www.comet.ml/docs/python-sdk/Comet-Confusion-Matrix/)" + ] + } + ], + "metadata": { + "colab": { + "collapsed_sections": [], + "name": "PytorchConfusionMatrixSimple.ipynb", + "provenance": [] + }, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/notebooks/Comet-Confusion-Matrix.ipynb b/notebooks/Comet-Confusion-Matrix.ipynb index 9f7e403..469d2ad 100644 --- a/notebooks/Comet-Confusion-Matrix.ipynb +++ b/notebooks/Comet-Confusion-Matrix.ipynb @@ -37,7 +37,7 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install --upgrade comet_ml>=3.10.0" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { @@ -100,7 +100,7 @@ } ], "source": [ - "comet_ml.init()" + "comet_ml.login()" ] }, { @@ -129,7 +129,7 @@ ], "source": [ "experiment = comet_ml.Experiment(\n", - " project_name=\"confusion-matrix\", \n", + " project_name=\"confusion-matrix\",\n", ")" ] }, @@ -184,7 +184,7 @@ " [0.3, 0.8, 0.3],\n", " [0.0, 0.5, 0.3],\n", " [0.1, 0.5, 0.5],\n", - " ]" + "]" ] }, { @@ -307,7 +307,7 @@ "from tensorflow.keras.optimizers import RMSprop\n", "from tensorflow.keras.utils import to_categorical\n", "\n", - "from keras.datasets import mnist\n" + "from keras.datasets import mnist" ] }, { @@ -418,7 +418,7 @@ ], "source": [ "experiment = comet_ml.Experiment(\n", - " project_name=\"confusion-matrix\", \n", + " project_name=\"confusion-matrix\",\n", ")" ] }, @@ -658,7 +658,7 @@ ], "source": [ "experiment = comet_ml.Experiment(\n", - " project_name=\"confusion-matrix\", \n", + " project_name=\"confusion-matrix\",\n", ")" ] }, @@ -897,7 +897,9 @@ "\n", " def on_epoch_end(self, epoch, logs={}):\n", " predicted = self.model.predict(self.inputs)\n", - " self.confusion_matrix.compute_matrix(self.targets, predicted, images=self.inputs)\n", + " self.confusion_matrix.compute_matrix(\n", + " self.targets, predicted, images=self.inputs\n", + " )\n", " self.experiment.log_confusion_matrix(\n", " matrix=self.confusion_matrix,\n", " title=\"Confusion Matrix, Epoch #%d\" % (epoch + 1),\n", @@ -929,7 +931,7 @@ ], "source": [ "experiment = comet_ml.Experiment(\n", - " project_name=\"confusion-matrix\", \n", + " project_name=\"confusion-matrix\",\n", ")" ] }, @@ -995,7 +997,9 @@ "metadata": {}, "outputs": [], "source": [ - "confusion_matrix.compute_matrix(y_test, y_predicted, images=x_test, image_shape=(28,28))" + "confusion_matrix.compute_matrix(\n", + " y_test, y_predicted, images=x_test, image_shape=(28, 28)\n", + ")" ] }, { @@ -1096,7 +1100,9 @@ } ], "source": [ - "callback = ConfusionMatrixCallbackReuseImages(experiment, x_test, y_test, confusion_matrix)\n", + "callback = ConfusionMatrixCallbackReuseImages(\n", + " experiment, x_test, y_test, confusion_matrix\n", + ")\n", "\n", "model.fit(\n", " x_train,\n", @@ -1301,7 +1307,7 @@ ], "source": [ "experiment = comet_ml.Experiment(\n", - " project_name=\"confusion-matrix\", \n", + " project_name=\"confusion-matrix\",\n", ")" ] }, @@ -1367,7 +1373,9 @@ "metadata": {}, "outputs": [], "source": [ - "confusion_matrix.compute_matrix(y_test, y_predicted, images=x_test, image_shape=(28, 28))" + "confusion_matrix.compute_matrix(\n", + " y_test, y_predicted, images=x_test, image_shape=(28, 28)\n", + ")" ] }, { @@ -1468,7 +1476,9 @@ } ], "source": [ - "callback = ConfusionMatrixCallbackReuseImages(experiment, x_test, y_test, confusion_matrix)\n", + "callback = ConfusionMatrixCallbackReuseImages(\n", + " experiment, x_test, y_test, confusion_matrix\n", + ")\n", "\n", "model.fit(\n", " x_train,\n", diff --git a/notebooks/Comet-Python-API.ipynb b/notebooks/Comet-Python-API.ipynb index 496897a..4118b35 100644 --- a/notebooks/Comet-Python-API.ipynb +++ b/notebooks/Comet-Python-API.ipynb @@ -31,14 +31,14 @@ "metadata": {}, "outputs": [], "source": [ - "%pip install comet_ml --quiet" + "%pip install -U \"comet_ml>=3.44.0\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "To run the following experiments, you'll need to set your COMET_API_KEY. The easiest way to to this is to use the `comet_ml.init()` function:" + "To run the following experiments, you'll need to set your COMET_API_KEY. The easiest way to to this is to use the `comet_ml.login()` function:" ] }, { @@ -49,7 +49,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.init()" + "comet_ml.login()" ] }, { @@ -86,6 +86,7 @@ "import comet_ml\n", "\n", "import matplotlib.pyplot as plt\n", + "\n", "%matplotlib inline" ] }, @@ -301,7 +302,7 @@ } ], "source": [ - "comet_api.get(\"cometpublic\", \"fasttext\", 'e64c5915920f481bab8f4cb4dbd615be')" + "comet_api.get(\"cometpublic\", \"fasttext\", \"e64c5915920f481bab8f4cb4dbd615be\")" ] }, { @@ -626,7 +627,7 @@ "metadata": {}, "outputs": [], "source": [ - "steps, acc = zip(*steps_acc[:100]) # just the first 100 for now" + "steps, acc = zip(*steps_acc[:100]) # just the first 100 for now" ] }, { @@ -636,7 +637,7 @@ "outputs": [ { "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD5CAYAAAA3Os7hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAe4UlEQVR4nO3de3Rc5Xnv8e8zMxpdbUm25ZtksA3mYsAGYwgpIRASuoAk0CY5p5C2adoE2pOS9JZzDjk5K01ZTbu6TlaTZh2aU9qkuTUQQpLGSUgot1xIAlg2xsZ3g7El+SLJ1l2a+3P+mLGrCBnJ9oy2Zs/vs5aWZ+95rXn2bOk3r9797r3N3RERkfIXCboAEREpDgW6iEhIKNBFREJCgS4iEhIKdBGRkFCgi4iERGyqBmb2ReAdQLe7XzrJ8wb8A3ArMAq83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VEYN/4CsNPd/37cUxuA3ys8/j3guzNdWym5+8fcvc3dl5Pfv0+5+28DTwPvKTQL43YfATrM7MLCqrcCOwj5/iY/1HKNmdUVfuZPbHeo9/c4p9q/G4D3FWa7XAMMjBuamR53n/VfwK3AHuBl4ONB11PC7XwT+T+/tgJbCl+3kh9PfhLYCzwBzAu61hK+BzcA3y88Xgk8D+wDvglUB11fCbb3cqC9sM//HWiuhP0N/BWwC3gJ+CpQHcb9DTxI/jhBmvxfZB841f4FjPyMvpeBbeRnAZ3W6+lMURGRkCiHIRcREZkGBbqISEgo0EVEQkKBLiISEgp0EZGQUKCLiISEAl1EJCQU6CIiIfH/AYDU7d+v19hvAAAAAElFTkSuQmCC", "text/plain": [ "
" ] @@ -790,7 +791,7 @@ "source": [ "project = comet_api.get(\"cometpublic\", \"comet-notebooks\")\n", "## OR:\n", - "#project = comet_api.get(\"cometpublic/comet-notebooks\")" + "# project = comet_api.get(\"cometpublic/comet-notebooks\")" ] }, { @@ -908,7 +909,9 @@ } ], "source": [ - "exp = comet_api.get(\"cometpublic\", \"comet-notebooks\", 'd21f94a1c71841d2961da1e6ddb5ab20')\n", + "exp = comet_api.get(\n", + " \"cometpublic\", \"comet-notebooks\", \"d21f94a1c71841d2961da1e6ddb5ab20\"\n", + ")\n", "## OR\n", "# exp = comet_api.get(\"cometpublic/comet-notebooks/d21f94a1c71841d2961da1e6ddb5ab20\")\n", "exp" @@ -931,7 +934,7 @@ } ], "source": [ - "exp = comet_api.get(\"cometpublic\", \"comet-notebooks\", 'example 001')\n", + "exp = comet_api.get(\"cometpublic\", \"comet-notebooks\", \"example 001\")\n", "## OR\n", "## exp = comet_api.get(\"cometpublic/comet-notebooks/example 001\")\n", "exp" @@ -1399,7 +1402,7 @@ "metadata": {}, "outputs": [], "source": [ - "api_experiment = comet_api.get(\"cometpublic\", \"comet-notebooks\", 'example 001')" + "api_experiment = comet_api.get(\"cometpublic\", \"comet-notebooks\", \"example 001\")" ] }, { @@ -1649,7 +1652,9 @@ } ], "source": [ - "comet_api.get('cometpublic/ludwig/02a0ed902ce2481fb6e2fc9009ee593c').get_asset_list(asset_type=\"image\")" + "comet_api.get(\"cometpublic/ludwig/02a0ed902ce2481fb6e2fc9009ee593c\").get_asset_list(\n", + " asset_type=\"image\"\n", + ")" ] }, { @@ -1676,7 +1681,9 @@ } ], "source": [ - "asset_list = comet_api.get('cometpublic/ludwig/02a0ed902ce2481fb6e2fc9009ee593c').get_asset_list(asset_type=\"image\")\n", + "asset_list = comet_api.get(\n", + " \"cometpublic/ludwig/02a0ed902ce2481fb6e2fc9009ee593c\"\n", + ").get_asset_list(asset_type=\"image\")\n", "url = asset_list[0][\"link\"]\n", "url" ] @@ -1793,7 +1800,10 @@ } ], "source": [ - "[[p[\"valueCurrent\"] for p in exp.get_parameters_summary()] for exp in comet_api.get(\"dsblank/pytorch\")]" + "[\n", + " [p[\"valueCurrent\"] for p in exp.get_parameters_summary()]\n", + " for exp in comet_api.get(\"dsblank/pytorch\")\n", + "]" ] }, { @@ -1802,10 +1812,14 @@ "metadata": {}, "outputs": [], "source": [ - "experiments = [[(exp, \"hidden_size\", int(param[\"valueCurrent\"])) \n", - " for param in exp.get_parameters_summary() \n", - " if param[\"name\"] == \"hidden_size\"]\n", - " for exp in comet_api.get(\"dsblank/pytorch\")]\n", + "experiments = [\n", + " [\n", + " (exp, \"hidden_size\", int(param[\"valueCurrent\"]))\n", + " for param in exp.get_parameters_summary()\n", + " if param[\"name\"] == \"hidden_size\"\n", + " ]\n", + " for exp in comet_api.get(\"dsblank/pytorch\")\n", + "]\n", "experiments = [e[0] for e in experiments if len(e) > 0]" ] }, @@ -1852,6 +1866,8 @@ " for exp in comet_api.get(ws, pj):\n", " if exp.get_asset_list() != []:\n", " return (exp, exp.get_asset_list())\n", + "\n", + "\n", "exp, elist = find_asset([\"cometpublic\"])" ] }, diff --git a/notebooks/ExpiringDataExample.ipynb b/notebooks/ExpiringDataExample.ipynb index 0c991d1..29fd6a4 100644 --- a/notebooks/ExpiringDataExample.ipynb +++ b/notebooks/ExpiringDataExample.ipynb @@ -25,7 +25,7 @@ } ], "source": [ - "%pip install --quiet comet_ml aitk.utils Pillow" + "%pip install -U \"comet_ml>=3.44.0\" aitk.utils Pillow" ] }, { @@ -81,7 +81,7 @@ " with open(filename, \"wb\") as f:\n", " f.write(g.read())\n", " if ext == \".zip\":\n", - " with zipfile.ZipFile(filename, 'r') as zip_ref:\n", + " with zipfile.ZipFile(filename, \"r\") as zip_ref:\n", " zip_ref.extractall(basename)" ] }, @@ -122,7 +122,7 @@ "metadata": {}, "outputs": [], "source": [ - "comet_ml.init()" + "comet_ml.login()" ] }, { @@ -144,7 +144,10 @@ " bg_color = random.choice([(120, 150, 180), (255, 225, 150)])\n", " image = Image.new(\"RGBA\", (24, 24), bg_color)\n", " for layer, probability in [\n", - " (\"0_face\", 1.0), (\"1_eye\", 1.0), (\"2_hair\", 0.8), (\"3_accessory\", 0.15)\n", + " (\"0_face\", 1.0),\n", + " (\"1_eye\", 1.0),\n", + " (\"2_hair\", 0.8),\n", + " (\"3_accessory\", 0.15),\n", " ]:\n", " if random.random() > probability:\n", " continue\n", @@ -285,12 +288,14 @@ " today = datetime.date.today()\n", " return add_days(today, random.randint(1, n))\n", "\n", + "\n", "def add_days(day, n):\n", " \"\"\"\n", " Method to do some date math.\n", " \"\"\"\n", " return day + datetime.timedelta(days=n)\n", - " \n", + "\n", + "\n", "def day_to_timestamp(day):\n", " \"\"\"\n", " Turn a day into an integer timestamp\n", @@ -298,6 +303,7 @@ " date = datetime.datetime(day.year, day.month, day.day)\n", " return date.timestamp()\n", "\n", + "\n", "def timestamp_to_day(timestamp):\n", " \"\"\"\n", " Turn a timestamp into a day\n", @@ -323,12 +329,7 @@ "outputs": [], "source": [ "for image in images:\n", - " experiment.log_image(\n", - " image, \n", - " metadata={\n", - " \"expires_on\": day_to_timestamp(random_day())\n", - " }\n", - " )" + " experiment.log_image(image, metadata={\"expires_on\": day_to_timestamp(random_day())})" ] }, { @@ -482,9 +483,7 @@ "outputs": [], "source": [ "# A date 90 days in the future:\n", - "expires_on = day_to_timestamp(\n", - " add_days(datetime.date.today(), 90)\n", - ")" + "expires_on = day_to_timestamp(add_days(datetime.date.today(), 90))" ] }, { From 7843cd1f4e27b10e56e93552066e8c7a2b97f1b5 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 8 Jul 2024 18:47:42 +0200 Subject: [PATCH 4/6] Fix parameter name for comet_llm.init --- integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb b/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb index 9d56c8a..528d407 100644 --- a/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb +++ b/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb @@ -59,7 +59,7 @@ "source": [ "import comet_llm\n", "\n", - "comet_llm.init(project_name=\"comet-example-llm-hello-world\")" + "comet_llm.init(project=\"comet-example-llm-hello-world\")" ] }, { From 6dba868fb2cc9b7cc42a2289666998b7adfee962 Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 8 Jul 2024 19:02:40 +0200 Subject: [PATCH 5/6] Use comet-example singular prefix for example project names --- guides/get-started/Comet_Quickstart.ipynb | 4 +--- .../fastai/fastai-hello-world/fastai_hello_world.py | 2 +- .../model-training/fastai/notebooks/fastai_hello_world.ipynb | 2 +- .../notebooks/Comet_with_Hugging_Face_Trainer.ipynb | 2 +- .../model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb | 2 +- .../notebooks/Comet_and_Pytorch_Lightning.ipynb | 2 +- .../gymnasium/notebooks/comet_gymnasium_example.ipynb | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/guides/get-started/Comet_Quickstart.ipynb b/guides/get-started/Comet_Quickstart.ipynb index f95a7b0..d940580 100644 --- a/guides/get-started/Comet_Quickstart.ipynb +++ b/guides/get-started/Comet_Quickstart.ipynb @@ -53,9 +53,7 @@ "source": [ "In this guide we will cover some of the basic features for logging data to Comet. \n", "\n", - "For a preview of what's possible with Comet, head over to one of our example projects on [Video Classification](If you'd like to take a look at a full project, click the link below:\n", - "\n", - "[Comet Video Classification](https://www.comet.com/maracomet/demo-video-classification/view/5jQkOgv2xebriYq8gdieVtMFy/panels?utm_medium=referral&utm_source=comet_notebook&utm_term=introduction_to_comet)\n", + "If you'd like to take a look at a full project, click on the following link: [Comet Video Classification](https://www.comet.com/maracomet/demo-video-classification/view/5jQkOgv2xebriYq8gdieVtMFy/panels?utm_medium=referral&utm_source=comet_notebook&utm_term=introduction_to_comet)\n", "\n" ] }, diff --git a/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py b/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py index 0b46bb5..4657ee1 100644 --- a/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py +++ b/integrations/model-training/fastai/fastai-hello-world/fastai_hello_world.py @@ -19,7 +19,7 @@ EPOCHS = 5 -comet_ml.login(project_name="comet-examples-fastai-hello-world") +comet_ml.login(project_name="comet-example-fastai-hello-world") experiment = comet_ml.Experiment() path = untar_data(URLs.MNIST_TINY) diff --git a/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb b/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb index 2a1f711..6b04c04 100644 --- a/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb +++ b/integrations/model-training/fastai/notebooks/fastai_hello_world.ipynb @@ -104,7 +104,7 @@ "outputs": [], "source": [ "# Create Comet Experiment\n", - "comet_ml.login(project_name=\"comet-examples-fastai-hello-world-notebook\")\n", + "comet_ml.login(project_name=\"comet-example-fastai-hello-world-notebook\")\n", "experiment = comet_ml.Experiment()" ] }, diff --git a/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb b/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb index eb4bb79..2c1417b 100644 --- a/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb +++ b/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb @@ -64,7 +64,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.login(project_name=\"comet-examples-transfomers-trainer\")" + "comet_ml.login(project_name=\"comet-example-transfomers-trainer\")" ] }, { diff --git a/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb b/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb index 8bdf76c..325f749 100644 --- a/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb +++ b/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb @@ -39,7 +39,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.login(project_name=\"comet-examples-mlflow-notebook\")" + "comet_ml.login(project_name=\"comet-example-mlflow-notebook\")" ] }, { diff --git a/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb b/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb index e269355..6111b7e 100644 --- a/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb +++ b/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb @@ -63,7 +63,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.login(project_name=\"comet-examples-pytorch-lightning\")" + "comet_ml.login(project_name=\"comet-example-pytorch-lightning\")" ] }, { diff --git a/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb b/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb index 8c8303e..3a2c084 100644 --- a/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb +++ b/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb @@ -57,7 +57,7 @@ "source": [ "import comet_ml\n", "\n", - "comet_ml.login(project_name=\"comet-examples-gymnasium-notebook\")" + "comet_ml.login(project_name=\"comet-example-gymnasium-notebook\")" ] }, { From 11041e8174724c48d3255cd21ff5e9b7f1f4567f Mon Sep 17 00:00:00 2001 From: Boris Feld Date: Mon, 8 Jul 2024 19:05:20 +0200 Subject: [PATCH 6/6] Update section name when login to Comet --- guides/computer_vision/Computer_Vision_with_Comet.ipynb | 2 +- guides/get-started/Comet_Quickstart.ipynb | 2 +- .../Using_Comet_with_Structured_Data_Churn_Prediction.ipynb | 2 +- .../snowflake/notebooks/Comet_and_Snowflake.ipynb | 2 +- integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb | 2 +- .../notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb | 2 +- integrations/llm/langchain/notebooks/Comet_with_Langchain.ipynb | 2 +- integrations/llm/openai/notebooks/Comet_and_OpenAI.ipynb | 2 +- integrations/llm/openai/notebooks/Comet_and_OpenAI_Vision.ipynb | 2 +- .../model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb | 2 +- .../Logging_Model_Inferences_with_Comet_and_Gradio.ipynb | 2 +- .../notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb | 2 +- .../model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb | 2 +- .../accelerate/notebooks/Comet_and_Accelerate.ipynb | 2 +- .../model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb | 2 +- .../model-training/composer/notebooks/comet_composer.ipynb | 2 +- .../model-training/deepspeed/notebooks/comet_deepspeed.ipynb | 2 +- .../notebooks/Comet_with_Hugging_Face_Trainer.ipynb | 2 +- .../model-training/keras/notebooks/Comet_with_Keras.ipynb | 2 +- .../model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb | 2 +- .../model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb | 2 +- .../model-training/prophet/notebooks/Comet_and_Prophet.ipynb | 2 +- .../model-training/pycaret/notebooks/comet_pycaret.ipynb | 2 +- .../notebooks/Comet_and_Pytorch_Lightning.ipynb | 2 +- .../pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb | 2 +- .../pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb | 2 +- .../model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb | 2 +- .../pytorch/notebooks/Histogram_Logging_Pytorch.ipynb | 2 +- .../ray-train/notebooks/Comet_with_ray_train_keras.ipynb | 2 +- .../ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb | 2 +- .../sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb | 2 +- .../train_text_classification.ipynb | 2 +- .../log_custom_scripts/pytorch-mnist/train_mnist.ipynb | 2 +- .../log_custom_scripts/tensorflow-mnist/train_mnist.ipynb | 2 +- .../scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb | 2 +- .../model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb | 2 +- .../tensorflow/notebooks/Comet_and_Tensorflow.ipynb | 2 +- .../model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb | 2 +- .../notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb | 2 +- integrations/model-training/xgboost/notebooks/xg_comet.ipynb | 2 +- .../model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb | 2 +- .../model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb | 2 +- .../gymnasium/notebooks/comet_gymnasium_example.ipynb | 2 +- 43 files changed, 43 insertions(+), 43 deletions(-) diff --git a/guides/computer_vision/Computer_Vision_with_Comet.ipynb b/guides/computer_vision/Computer_Vision_with_Comet.ipynb index 2761881..7d945b4 100644 --- a/guides/computer_vision/Computer_Vision_with_Comet.ipynb +++ b/guides/computer_vision/Computer_Vision_with_Comet.ipynb @@ -71,7 +71,7 @@ "id": "yV8haaSzUvOz" }, "source": [ - "# ๐Ÿ’ฅ Initialize Comet and create an Experiment\n", + "# ๐Ÿ’ฅ Login to Comet and create an Experiment\n", "\n", "Create your free account Comet Account [here](https://www.comet.com/signup?utm_source=website&utm_medium=referral&utm_campaign=Online_CV_2023&utm_content=colab-notebook) and grab your API Key from the account settings page. " ] diff --git a/guides/get-started/Comet_Quickstart.ipynb b/guides/get-started/Comet_Quickstart.ipynb index d940580..7d49fd0 100644 --- a/guides/get-started/Comet_Quickstart.ipynb +++ b/guides/get-started/Comet_Quickstart.ipynb @@ -83,7 +83,7 @@ "id": "pNBCl7sHJvz7" }, "source": [ - "# ๐Ÿ’ฅ Initialize Comet and grab your Credentials" + "# ๐Ÿ’ฅ Login to Comet and grab your Credentials" ] }, { diff --git a/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb b/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb index 60be42b..e439aaa 100644 --- a/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb +++ b/guides/get-started/Using_Comet_with_Structured_Data_Churn_Prediction.ipynb @@ -26,7 +26,7 @@ "id": "IWjxrVhSYxOG" }, "source": [ - "# Initialize Comet\n", + "# Login to Comet\n", "Set your API Key to enable logging to Comet from this notebook" ] }, diff --git a/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb b/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb index 34ed5c3..0380de3 100644 --- a/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb +++ b/integrations/data-management/snowflake/notebooks/Comet_and_Snowflake.ipynb @@ -68,7 +68,7 @@ "id": "Vl7tvoeQjBqf" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb b/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb index 528d407..3336bc7 100644 --- a/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb +++ b/integrations/llm/comet-llm/notebooks/CometLLM_hello_world.ipynb @@ -46,7 +46,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb b/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb index 128b622..c1d23b0 100644 --- a/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb +++ b/integrations/llm/finetuning/alpaca-lora/notebooks/Alpaca_Lora_Finetuning_with_Comet.ipynb @@ -46,7 +46,7 @@ "id": "YSrcBL_TqZij" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/llm/langchain/notebooks/Comet_with_Langchain.ipynb b/integrations/llm/langchain/notebooks/Comet_with_Langchain.ipynb index 5b9e2c4..86933d2 100644 --- a/integrations/llm/langchain/notebooks/Comet_with_Langchain.ipynb +++ b/integrations/llm/langchain/notebooks/Comet_with_Langchain.ipynb @@ -51,7 +51,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Initialize Comet and Set your Credentials" + "### Login to Comet and Set your Credentials" ] }, { diff --git a/integrations/llm/openai/notebooks/Comet_and_OpenAI.ipynb b/integrations/llm/openai/notebooks/Comet_and_OpenAI.ipynb index fe2e7ad..cbf71b8 100644 --- a/integrations/llm/openai/notebooks/Comet_and_OpenAI.ipynb +++ b/integrations/llm/openai/notebooks/Comet_and_OpenAI.ipynb @@ -54,7 +54,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/llm/openai/notebooks/Comet_and_OpenAI_Vision.ipynb b/integrations/llm/openai/notebooks/Comet_and_OpenAI_Vision.ipynb index 1cc3639..571523b 100644 --- a/integrations/llm/openai/notebooks/Comet_and_OpenAI_Vision.ipynb +++ b/integrations/llm/openai/notebooks/Comet_and_OpenAI_Vision.ipynb @@ -54,7 +54,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb b/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb index df25b06..3646c33 100644 --- a/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb +++ b/integrations/model-evaluation/gradio/notebooks/Gradio_and_Comet.ipynb @@ -64,7 +64,7 @@ "id": "Rsgj7AoYYCDD" }, "source": [ - "## Initialize Comet and Gradio" + "## Login to Comet and Gradio" ] }, { diff --git a/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb b/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb index ba9e72a..1d3ec4a 100644 --- a/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb +++ b/integrations/model-evaluation/gradio/notebooks/Logging_Model_Inferences_with_Comet_and_Gradio.ipynb @@ -51,7 +51,7 @@ "id": "3kMzU2I2ChdB" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb b/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb index 0ed7cb3..1e3ed04 100644 --- a/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb +++ b/integrations/model-evaluation/tensorflow-model-analysis/notebooks/Comet_with_Tensorflow_Model_Analysis_TFMA.ipynb @@ -26,7 +26,7 @@ "id": "vNAfoInQsxXz" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb b/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb index 0d60406..6995673 100644 --- a/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb +++ b/integrations/model-optimization/ray-tune/notebooks/Comet_and_Ray.ipynb @@ -54,7 +54,7 @@ "id": "HUYwD0WkcK4e" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb b/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb index fbe4780..1985683 100644 --- a/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb +++ b/integrations/model-training/accelerate/notebooks/Comet_and_Accelerate.ipynb @@ -55,7 +55,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb b/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb index e8cc002..349a8b6 100644 --- a/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb +++ b/integrations/model-training/catalyst/notebooks/Catalyst_x_Comet.ipynb @@ -46,7 +46,7 @@ "id": "Z6mx-zruvxRB" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/composer/notebooks/comet_composer.ipynb b/integrations/model-training/composer/notebooks/comet_composer.ipynb index 0340d69..1daca00 100644 --- a/integrations/model-training/composer/notebooks/comet_composer.ipynb +++ b/integrations/model-training/composer/notebooks/comet_composer.ipynb @@ -52,7 +52,7 @@ "id": "4_xqF2RNHv67" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb b/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb index e8f7b62..9f7fa6a 100644 --- a/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb +++ b/integrations/model-training/deepspeed/notebooks/comet_deepspeed.ipynb @@ -54,7 +54,7 @@ "id": "ivwmX4GCnY1N" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb b/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb index 2c1417b..978b22a 100644 --- a/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb +++ b/integrations/model-training/hugging_face/notebooks/Comet_with_Hugging_Face_Trainer.ipynb @@ -51,7 +51,7 @@ "id": "3VaHie31I3r_" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb b/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb index 31af670..b117c2a 100644 --- a/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb +++ b/integrations/model-training/keras/notebooks/Comet_with_Keras.ipynb @@ -51,7 +51,7 @@ "id": "crOcPHobwhGL" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb b/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb index e8e9527..e3be111 100644 --- a/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb +++ b/integrations/model-training/lightgbm/notebooks/Comet_and_LightGBM.ipynb @@ -30,7 +30,7 @@ "id": "Hsm_nLTe6hn0" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb b/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb index 325f749..218efba 100644 --- a/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb +++ b/integrations/model-training/mlflow/notebooks/Comet_and_MLFlow.ipynb @@ -26,7 +26,7 @@ "id": "A4aji9dozzbe" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb b/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb index 8a32725..c73a6c3 100644 --- a/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb +++ b/integrations/model-training/prophet/notebooks/Comet_and_Prophet.ipynb @@ -54,7 +54,7 @@ "id": "Hsm_nLTe6hn0" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb b/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb index 48fede7..2e2d3c9 100644 --- a/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb +++ b/integrations/model-training/pycaret/notebooks/comet_pycaret.ipynb @@ -42,7 +42,7 @@ "id": "ODmZPaEGRvUP" }, "source": [ - "# Initialize Comet\n", + "# Login to Comet\n", "\n", "Create your free account at [Comet.com](https://www.comet.com/signup?utm_source=pycaret&utm_medium=partner&utm_campaign=partner_pycaret_2023&utm_content=comet_colab) and grab your API key which can be found under your account settings\n" ] diff --git a/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb b/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb index 6111b7e..db746c6 100644 --- a/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb +++ b/integrations/model-training/pytorch-lightning/notebooks/Comet_and_Pytorch_Lightning.ipynb @@ -50,7 +50,7 @@ "id": "1t5bRSwdq_Hv" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb index 8f8ac0d..063fced 100644 --- a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb +++ b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_Tensorboard.ipynb @@ -54,7 +54,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb index b25bea6..765e992 100644 --- a/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb +++ b/integrations/model-training/pytorch/notebooks/Comet_Pytorch_TensorboardX.ipynb @@ -94,7 +94,7 @@ "id": "VBvM7G3vFdCO" }, "source": [ - "## Initialize Comet " + "## Login to Comet " ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb b/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb index a97e766..deafa5d 100644 --- a/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb +++ b/integrations/model-training/pytorch/notebooks/Comet_and_Pytorch.ipynb @@ -57,7 +57,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb b/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb index 41ce351..e9cc7f1 100644 --- a/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb +++ b/integrations/model-training/pytorch/notebooks/Histogram_Logging_Pytorch.ipynb @@ -57,7 +57,7 @@ "id": "lpCFdN33tday" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb index 6f171b5..3a34d78 100644 --- a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb +++ b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_keras.ipynb @@ -50,7 +50,7 @@ "id": "crOcPHobwhGL" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb index b37ba11..8e4646d 100644 --- a/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb +++ b/integrations/model-training/ray-train/notebooks/Comet_with_ray_train_xgboost.ipynb @@ -51,7 +51,7 @@ "id": "crOcPHobwhGL" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb b/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb index ef597b4..3f13c4a 100644 --- a/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb +++ b/integrations/model-training/sagemaker/log_completed_sagemaker_runs/train_mnist.ipynb @@ -166,7 +166,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Initialize Comet" + "### Login to Comet" ] }, { diff --git a/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb b/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb index 709a048..19f4a13 100644 --- a/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb +++ b/integrations/model-training/sagemaker/log_custom_scripts/huggingface-text-classification/train_text_classification.ipynb @@ -36,7 +36,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Initialize Comet " + "### Login to Comet " ] }, { diff --git a/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb b/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb index f022056..79f46cf 100644 --- a/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb +++ b/integrations/model-training/sagemaker/log_custom_scripts/pytorch-mnist/train_mnist.ipynb @@ -38,7 +38,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Initialize Comet " + "### Login to Comet " ] }, { diff --git a/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb b/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb index 67abb47..7cf8c10 100644 --- a/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb +++ b/integrations/model-training/sagemaker/log_custom_scripts/tensorflow-mnist/train_mnist.ipynb @@ -22,7 +22,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Initialize Comet" + "### Login to Comet" ] }, { diff --git a/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb b/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb index 6da3083..acdfa88 100644 --- a/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb +++ b/integrations/model-training/scikit-learn/notebooks/Comet_with_Scikit_Learn.ipynb @@ -26,7 +26,7 @@ "id": "86DWeNq3T7tb" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb b/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb index c0ef28e..b79e8e1 100644 --- a/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb +++ b/integrations/model-training/spark-nlp/notebooks/Comet_SparkNLP.ipynb @@ -96,7 +96,7 @@ "id": "aHfmcVlAZfjz" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb b/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb index a930eba..ccc8918 100644 --- a/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb +++ b/integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb @@ -35,7 +35,7 @@ "id": "Q9bAP3Xj0-lz" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb b/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb index ae4d1f8..df7be0b 100644 --- a/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb +++ b/integrations/model-training/xgboost/notebooks/Comet_and_XGBoost.ipynb @@ -26,7 +26,7 @@ "id": "Hsm_nLTe6hn0" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb b/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb index 8e87e13..5a8f219 100644 --- a/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb +++ b/integrations/model-training/xgboost/notebooks/how_to_use_comet_with_xgboost_tutorial.ipynb @@ -32,7 +32,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# ๐Ÿงช Initialize Comet\n", + "# ๐Ÿงช Login to Comet\n", "\n", "Create your free account at [Comet.com](https://www.comet.com/signup?utm_source=xgboost&utm_medium=colab&utm_content=signup_cell) and grab your API key which can be found under account settings." ] diff --git a/integrations/model-training/xgboost/notebooks/xg_comet.ipynb b/integrations/model-training/xgboost/notebooks/xg_comet.ipynb index dd4985f..1cacbeb 100644 --- a/integrations/model-training/xgboost/notebooks/xg_comet.ipynb +++ b/integrations/model-training/xgboost/notebooks/xg_comet.ipynb @@ -40,7 +40,7 @@ "id": "WtUkfOzSGHDR" }, "source": [ - "# Initialize Comet\n", + "# Login to Comet\n", "\n", "Create your free account at [Comet.com](https://www.comet.com/signup?utm_source=xgboost&utm_medium=colab&utm_content=signup_cell)." ] diff --git a/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb b/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb index a90e28a..be5b040 100644 --- a/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb +++ b/integrations/model-training/yolov5/notebooks/Comet_and_YOLOv5.ipynb @@ -45,7 +45,7 @@ "id": "cPuQc9WAEC08" }, "source": [ - "# Initialize Comet" + "# Login to Comet" ] }, { diff --git a/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb b/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb index 4b93d36..188738e 100644 --- a/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb +++ b/integrations/model-training/yolov8/notebooks/YOLOv8_and_Comet.ipynb @@ -48,7 +48,7 @@ "id": "PUusb44jhYIj" }, "source": [ - "# Initialize Comet\n", + "# Login to Comet\n", "\n", "This will prompt you to enter your API key. You can grab that over [here](https://www.comet.com/signup)" ] diff --git a/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb b/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb index 3a2c084..435cb8c 100644 --- a/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb +++ b/integrations/reinforcement-learning/gymnasium/notebooks/comet_gymnasium_example.ipynb @@ -42,7 +42,7 @@ "id": "cDi2frwiY6UA" }, "source": [ - "# Initialize Comet\n", + "# Login to Comet\n", "\n", "Create your free account at [Comet.com](https://www.comet.com/signup?utm_source=gymnasium&utm_medium=partner&utm_campaign=partner_gymnasium_2023&utm_content=comet_colab) and grab your API key which can be found under account settings." ]