From 4c8a24f1ffecd44b318dfe2a3617bdc0eb1a4925 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Wed, 30 Dec 2020 16:53:19 +0200 Subject: [PATCH] Update examples to ClearML --- examples/frameworks/keras/jupyter.ipynb | 12 ++++----- ...e.ipynb => jupyter_keras_TB_example.ipynb} | 14 +++++----- .../frameworks/keras/legacy/jupyter.ipynb | 12 ++++----- ...ipynb => jupyter_matplotlib_example.ipynb} | 20 +++++++------- .../audio/audio_classifier_UrbanSound8K.ipynb | 12 ++++----- .../audio/audio_preprocessing_example.ipynb | 6 ++--- .../image/hyperparameter_search.ipynb | 16 ++++++------ .../image/image_classification_CIFAR10.ipynb | 6 ++--- .../table/download_and_preprocessing.ipynb | 6 ++--- .../notebooks/table/download_and_split.ipynb | 12 ++++----- .../notebooks/table/pick_best_model.ipynb | 6 ++--- .../table/preprocessing_and_encoding.ipynb | 6 ++--- .../notebooks/table/tabular_ml_pipeline.ipynb | 6 ++--- .../table/train_tabular_predictor.ipynb | 6 ++--- .../text/text_classification_AG_NEWS.ipynb | 6 ++--- .../Allegro_Trains_logging_example.ipynb | 26 +++++++++---------- .../reporting/manual_matplotlib_reporting.py | 1 - 17 files changed, 86 insertions(+), 87 deletions(-) rename examples/frameworks/keras/{Allegro_Trains_keras_TB_example.ipynb => jupyter_keras_TB_example.ipynb} (92%) rename examples/frameworks/matplotlib/{Allegro_Trains_matplotlib_example.ipynb => jupyter_matplotlib_example.ipynb} (84%) delete mode 120000 examples/reporting/manual_matplotlib_reporting.py diff --git a/examples/frameworks/keras/jupyter.ipynb b/examples/frameworks/keras/jupyter.ipynb index ca4a671b..67ea2f5f 100644 --- a/examples/frameworks/keras/jupyter.ipynb +++ b/examples/frameworks/keras/jupyter.ipynb @@ -10,7 +10,7 @@ }, "outputs": [], "source": [ - "# Trains - Example of integrating plots and training on jupyter notebook. \n", + "# ClearML - Example of integrating plots and training on jupyter notebook. \n", "# In this example, simple graphs are shown, then an MNIST classifier is trained using Keras.\n", "import os\n", "import tempfile\n", @@ -35,14 +35,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "TRAINS Task: created new task id=2f9f2f08fa90427aa51e34b839e49fb6\n", - "TRAINS results page: https://demoapp.trains.allegro.ai/projects/0e152d03acf94ae4bb1f3787e293a9f5/experiments/2f9f2f08fa90427aa51e34b839e49fb6/output/log\n" + "ClearML Task: created new task id=2f9f2f08fa90427aa51e34b839e49fb6\n", + "ClearML results page: https://demoapp.clearml.allegro.ai/projects/0e152d03acf94ae4bb1f3787e293a9f5/experiments/2f9f2f08fa90427aa51e34b839e49fb6/output/log\n" ] } ], "source": [ - "# Connecting TRAINS\n", - "from trains import Task\n", + "# Connecting ClearML\n", + "from clearml import Task\n", "task = Task.init(project_name = 'examples', task_name = 'notebook example')\n" ] }, @@ -146,7 +146,7 @@ }, "outputs": [], "source": [ - "# Notice, Updating task_params is traced and updated in TRAINS\n", + "# Notice, Updating task_params is traced and updated in ClearML\n", "task_params['batch_size'] = 128\n", "task_params['nb_classes'] = 10\n", "task_params['nb_epoch'] = 6\n", diff --git a/examples/frameworks/keras/Allegro_Trains_keras_TB_example.ipynb b/examples/frameworks/keras/jupyter_keras_TB_example.ipynb similarity index 92% rename from examples/frameworks/keras/Allegro_Trains_keras_TB_example.ipynb rename to examples/frameworks/keras/jupyter_keras_TB_example.ipynb index b31a218b..4b6e3af3 100644 --- a/examples/frameworks/keras/Allegro_Trains_keras_TB_example.ipynb +++ b/examples/frameworks/keras/jupyter_keras_TB_example.ipynb @@ -7,11 +7,11 @@ "id": "wFJPLbY7w7Vj" }, "source": [ - "# Allegro Trains Keras with TensorBoard example\n", + "# Allegro ClearML Keras with TensorBoard example\n", "\n", - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/allegroai/trains/blob/master/examples/frameworks/keras/Allegro_Trains_keras_TB_example.ipynb)\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/allegroai/clearml/blob/master/examples/frameworks/keras/Allegro_Trains_keras_TB_example.ipynb)\n", "\n", - "This example introduces Trains with Keras and TensorBoard functionality, including automatic logging, models, and TensorBoard outputs. You can find more frameworks examples [here](https://github.com/allegroai/trains/tree/master/examples/frameworks).\n", + "This example introduces ClearML with Keras and TensorBoard functionality, including automatic logging, models, and TensorBoard outputs. You can find more frameworks examples [here](https://github.com/allegroai/clearml/tree/master/examples/frameworks).\n", "\n", "Note: This example is based on the Keras `mnist_mlp.py` example.\n" ] @@ -26,7 +26,7 @@ }, "outputs": [], "source": [ - "!pip install trains\n", + "!pip install clearml\n", "!pip install tensorflow>=2.0" ] }, @@ -38,7 +38,7 @@ }, "source": [ "### Create a new task.\n", - "To create a new Task object, call the `Task.init` method providing it with `project_name` (the project name for the experiment) and `task_name` (the name of the experiment). When `Task.init` executes, a link to the Web UI Results page for the newly generated Task will be printed, and the Task will be updated in real time in the Trains demo server.\n", + "To create a new Task object, call the `Task.init` method providing it with `project_name` (the project name for the experiment) and `task_name` (the name of the experiment). When `Task.init` executes, a link to the Web UI Results page for the newly generated Task will be printed, and the Task will be updated in real time in the ClearML demo server.\n", "\n", "You can read about the `Task` class in the docs [here](https://allegro.ai/docs/task.html)." ] @@ -60,7 +60,7 @@ "import tensorflow as tf\n", "from tensorflow import keras\n", "from tensorflow.keras import utils as np_utils\n", - "from trains import Task\n", + "from clearml import Task\n", "\n", "# Start a new task\n", "task = Task.init(project_name=\"Colab notebooks\", task_name=\"Keras with TensorBoard example\")\n" @@ -205,7 +205,7 @@ "metadata": { "colab": { "collapsed_sections": [], - "name": "Allegro Trains keras TB example.ipynb", + "name": "Allegro ClearML keras TB example.ipynb", "provenance": [] }, "kernelspec": { diff --git a/examples/frameworks/keras/legacy/jupyter.ipynb b/examples/frameworks/keras/legacy/jupyter.ipynb index 1aae066c..a5a53fa0 100644 --- a/examples/frameworks/keras/legacy/jupyter.ipynb +++ b/examples/frameworks/keras/legacy/jupyter.ipynb @@ -18,7 +18,7 @@ } ], "source": [ - "# Trains - Example of integrating plots and training on jupyter notebook. \n", + "# ClearML - Example of integrating plots and training on jupyter notebook. \n", "# In this example, simple graphs are shown, then an MNIST classifier is trained using Keras.\n", "\n", "from keras.callbacks import TensorBoard, ModelCheckpoint\n", @@ -41,14 +41,14 @@ "name": "stdout", "output_type": "stream", "text": [ - "TRAINS Task: overwriting (reusing) task id=6de40029e54c41d7a1a24a1f2dc9cad2\n", - "TRAINS results page: https://demoapp.trains.allegro.ai/projects/087f765c846c4c76a7e9f3d035667d82/experiments/6de40029e54c41d7a1a24a1f2dc9cad2/output/log\n" + "ClearML Task: overwriting (reusing) task id=6de40029e54c41d7a1a24a1f2dc9cad2\n", + "ClearML results page: https://demoapp.clearml.allegro.ai/projects/087f765c846c4c76a7e9f3d035667d82/experiments/6de40029e54c41d7a1a24a1f2dc9cad2/output/log\n" ] } ], "source": [ - "# Connecting TRAINS\n", - "from trains import Task\n", + "# Connecting ClearML\n", + "from clearml import Task\n", "task = Task.init(project_name = 'examples', task_name = 'notebook example')\n" ] }, @@ -152,7 +152,7 @@ }, "outputs": [], "source": [ - "# Notice, Updating task_params is traced and updated in TRAINS\n", + "# Notice, Updating task_params is traced and updated in ClearML\n", "task_params['batch_size'] = 128\n", "task_params['nb_classes'] = 10\n", "task_params['nb_epoch'] = 6\n", diff --git a/examples/frameworks/matplotlib/Allegro_Trains_matplotlib_example.ipynb b/examples/frameworks/matplotlib/jupyter_matplotlib_example.ipynb similarity index 84% rename from examples/frameworks/matplotlib/Allegro_Trains_matplotlib_example.ipynb rename to examples/frameworks/matplotlib/jupyter_matplotlib_example.ipynb index 2e0ad4fb..b5bb496a 100644 --- a/examples/frameworks/matplotlib/Allegro_Trains_matplotlib_example.ipynb +++ b/examples/frameworks/matplotlib/jupyter_matplotlib_example.ipynb @@ -7,13 +7,13 @@ "id": "NKas2cYws8F6" }, "source": [ - "# Allegro Trains matplotlib example\n", + "# Allegro ClearML matplotlib example\n", "\n", - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/allegroai/trains/blob/master/examples/frameworks/matplotlib/Allegro_Trains_matplotlib_example.ipynb)\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/allegroai/clearml/blob/master/examples/frameworks/matplotlib/Allegro_Trains_matplotlib_example.ipynb)\n", "\n", - "This example introduces Trains with matplotlib functionality. It also shows seaborn functionality. You can find more frameworks examples [here](https://github.com/allegroai/trains/tree/master/examples/frameworks).\n", + "This example introduces ClearML with matplotlib functionality. It also shows seaborn functionality. You can find more frameworks examples [here](https://github.com/allegroai/clearml/tree/master/examples/frameworks).\n", "\n", - "Note: This example is based on the Trains [matplotlib_example.py](https://github.com/allegroai/trains/blob/master/examples/frameworks/matplotlib/matplotlib_example.py) example." + "Note: This example is based on the ClearML [matplotlib_example.py](https://github.com/allegroai/clearml/blob/master/examples/frameworks/matplotlib/matplotlib_example.py) example." ] }, { @@ -26,7 +26,7 @@ }, "outputs": [], "source": [ - "!pip install trains\n", + "!pip install clearml\n", "!pip install numpy\n", "!pip install seaborn" ] @@ -40,7 +40,7 @@ "source": [ "## Create a new task.\n", "\n", - "To create a new Task object, call the `Task.init` method providing it with `project_name` (the project name for the experiment) and `task_name` (the name of the experiment). When `Task.init` executes, a link to the Web UI Results page for the newly generated Task will be printed, and the Task will be updated in real time in the Trains demo server.\n", + "To create a new Task object, call the `Task.init` method providing it with `project_name` (the project name for the experiment) and `task_name` (the name of the experiment). When `Task.init` executes, a link to the Web UI Results page for the newly generated Task will be printed, and the Task will be updated in real time in the ClearML demo server.\n", "\n", "You can read about the `Task` class in the docs [here](https://allegro.ai/docs/task.html)." ] @@ -59,7 +59,7 @@ "import numpy as np\n", "import seaborn as sns\n", "\n", - "from trains import Task\n", + "from clearml import Task\n", "\n", "# Start a new task\n", "task = Task.init(project_name=\"Colab notebooks\", task_name=\"Matplotlib example\")\n" @@ -74,7 +74,7 @@ "source": [ "## Matplotlib support\n", "\n", - "Trains automatically logs Matplotlib plots. They appear in the Web UI Results tab.\n" + "ClearML automatically logs Matplotlib plots. They appear in the Web UI Results tab.\n" ] }, { @@ -121,7 +121,7 @@ "id": "yKT5UjDk6DGB" }, "source": [ - "By calling the `imshow` method, Trains automatically reports plot images in Results tab." + "By calling the `imshow` method, ClearML automatically reports plot images in Results tab." ] }, { @@ -212,7 +212,7 @@ "metadata": { "colab": { "collapsed_sections": [], - "name": "Allegro Trains matplotlib example.ipynb", + "name": "Allegro ClearML matplotlib example.ipynb", "provenance": [] }, "kernelspec": { diff --git a/examples/frameworks/pytorch/notebooks/audio/audio_classifier_UrbanSound8K.ipynb b/examples/frameworks/pytorch/notebooks/audio/audio_classifier_UrbanSound8K.ipynb index 736fd7c9..c1a67972 100644 --- a/examples/frameworks/pytorch/notebooks/audio/audio_classifier_UrbanSound8K.ipynb +++ b/examples/frameworks/pytorch/notebooks/audio/audio_classifier_UrbanSound8K.ipynb @@ -15,7 +15,7 @@ "! pip install -U torchaudio==0.5.1\n", "! pip install -U torchvision==0.6.1\n", "! pip install -U matplotlib==3.2.1\n", - "! pip install -U trains>=0.16.1\n", + "! pip install -U clearml>=0.16.1\n", "! pip install -U pandas==1.0.4\n", "! pip install -U numpy==1.18.4\n", "! pip install -U tensorboard==2.2.1" @@ -50,8 +50,8 @@ "from torchvision.transforms import ToTensor\n", "from torchvision import models\n", "\n", - "from trains import Task\n", - "from trains.storage import StorageManager\n", + "from clearml import Task\n", + "from clearml.storage import StorageManager\n", "\n", "%matplotlib inline" ] @@ -65,7 +65,7 @@ "task = Task.init(project_name='Audio Example', task_name='audio classification UrbanSound8K')\n", "configuration_dict = {'number_of_epochs': 3, 'batch_size': 8, 'dropout': 0.3, 'base_lr': 0.005, \n", " 'number_of_mel_filters': 64, 'resample_freq': 22050}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, @@ -81,8 +81,8 @@ "outputs": [], "source": [ "# Download UrbanSound8K dataset (https://urbansounddataset.weebly.com/urbansound8k.html)\n", - "# For simplicity we will use here a subset of that dataset using trains StorageManager\n", - "path_to_UrbanSound8K = StorageManager.get_local_copy(\"https://allegro-datasets.s3.amazonaws.com/trains/UrbanSound8K.zip\", \n", + "# For simplicity we will use here a subset of that dataset using clearml StorageManager\n", + "path_to_UrbanSound8K = StorageManager.get_local_copy(\"https://allegro-datasets.s3.amazonaws.com/clearml/UrbanSound8K.zip\", \n", " extract_archive=True)\n", "path_to_UrbanSound8K_csv = Path(path_to_UrbanSound8K) / 'UrbanSound8K' / 'metadata' / 'UrbanSound8K.csv'\n", "path_to_UrbanSound8K_audio = Path(path_to_UrbanSound8K) / 'UrbanSound8K' / 'audio'" diff --git a/examples/frameworks/pytorch/notebooks/audio/audio_preprocessing_example.ipynb b/examples/frameworks/pytorch/notebooks/audio/audio_preprocessing_example.ipynb index 59e75f55..8a3ea9d4 100644 --- a/examples/frameworks/pytorch/notebooks/audio/audio_preprocessing_example.ipynb +++ b/examples/frameworks/pytorch/notebooks/audio/audio_preprocessing_example.ipynb @@ -12,7 +12,7 @@ "! pip install -U torch==1.5.1\n", "! pip install -U torchaudio==0.5.1\n", "! pip install -U matplotlib==3.2.1\n", - "! pip install -U trains>=0.16.1\n", + "! pip install -U clearml>=0.16.1\n", "! pip install -U tensorboard==2.2.1" ] }, @@ -28,7 +28,7 @@ "from torch.utils.tensorboard import SummaryWriter\n", "import matplotlib.pyplot as plt\n", "\n", - "from trains import Task\n", + "from clearml import Task\n", "\n", "%matplotlib inline" ] @@ -41,7 +41,7 @@ "source": [ "task = Task.init(project_name='Audio Example', task_name='data pre-processing')\n", "configuration_dict = {'number_of_samples': 3}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/frameworks/pytorch/notebooks/image/hyperparameter_search.ipynb b/examples/frameworks/pytorch/notebooks/image/hyperparameter_search.ipynb index aef32da0..c1cafd18 100644 --- a/examples/frameworks/pytorch/notebooks/image/hyperparameter_search.ipynb +++ b/examples/frameworks/pytorch/notebooks/image/hyperparameter_search.ipynb @@ -7,12 +7,12 @@ "outputs": [], "source": [ "# execute this in command line on all machines to be used as workers before initiating the hyperparamer search \n", - "# ! pip install -U trains-agent==0.15.0\n", - "# ! trains-agent daemon --queue default\n", + "# ! pip install -U clearml-agent==0.15.0\n", + "# ! clearml-agent daemon --queue default\n", "\n", "# pip install with locked versions\n", "! pip install -U pandas==1.0.3\n", - "! pip install -U trains>=0.16.2\n", + "! pip install -U clearml>=0.16.2\n", "! pip install -U optuna==2.0.0" ] }, @@ -22,11 +22,11 @@ "metadata": {}, "outputs": [], "source": [ - "from trains.automation import UniformParameterRange, UniformIntegerParameterRange\n", - "from trains.automation import HyperParameterOptimizer\n", - "from trains.automation.optuna import OptimizerOptuna\n", + "from clearml.automation import UniformParameterRange, UniformIntegerParameterRange\n", + "from clearml.automation import HyperParameterOptimizer\n", + "from clearml.automation.optuna import OptimizerOptuna\n", "\n", - "from trains import Task" + "from clearml import Task" ] }, { @@ -72,7 +72,7 @@ " objective_metric_series='total',\n", " objective_metric_sign='max', # maximize or minimize the objective metric\n", "\n", - " # setting optimizer - trains supports GridSearch, RandomSearch, OptimizerBOHB and OptimizerOptuna\n", + " # setting optimizer - clearml supports GridSearch, RandomSearch, OptimizerBOHB and OptimizerOptuna\n", " optimizer_class=OptimizerOptuna,\n", " \n", " # Configuring optimization parameters\n", diff --git a/examples/frameworks/pytorch/notebooks/image/image_classification_CIFAR10.ipynb b/examples/frameworks/pytorch/notebooks/image/image_classification_CIFAR10.ipynb index 49a64d28..c1c3cd50 100644 --- a/examples/frameworks/pytorch/notebooks/image/image_classification_CIFAR10.ipynb +++ b/examples/frameworks/pytorch/notebooks/image/image_classification_CIFAR10.ipynb @@ -15,7 +15,7 @@ "! pip install -U torch==1.5.1\n", "! pip install -U torchvision==0.6.1\n", "! pip install -U numpy==1.18.4\n", - "! pip install -U trains>=0.16.1\n", + "! pip install -U clearml>=0.16.1\n", "! pip install -U tensorboard==2.2.1" ] }, @@ -36,7 +36,7 @@ "import torchvision.datasets as datasets\n", "import torchvision.transforms as transforms\n", "\n", - "from trains import Task" + "from clearml import Task" ] }, { @@ -47,7 +47,7 @@ "source": [ "task = Task.init(project_name='Image Example', task_name='image classification CIFAR10')\n", "configuration_dict = {'number_of_epochs': 3, 'batch_size': 4, 'dropout': 0.25, 'base_lr': 0.001}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/frameworks/pytorch/notebooks/table/download_and_preprocessing.ipynb b/examples/frameworks/pytorch/notebooks/table/download_and_preprocessing.ipynb index f57a3ccc..67413e24 100644 --- a/examples/frameworks/pytorch/notebooks/table/download_and_preprocessing.ipynb +++ b/examples/frameworks/pytorch/notebooks/table/download_and_preprocessing.ipynb @@ -8,7 +8,7 @@ "source": [ "! pip install -U pip\n", "! pip install -U torch==1.5.1\n", - "! pip install -U trains>=0.15.1\n", + "! pip install -U clearml>=0.15.1\n", "! pip install -U pandas==1.0.4\n", "! pip install -U numpy==1.18.4\n", "! pip install -U pathlib2==2.3.5\n", @@ -28,7 +28,7 @@ "import torch\n", "from datetime import datetime\n", "from pathlib2 import Path\n", - "from trains import Task" + "from clearml import Task" ] }, { @@ -40,7 +40,7 @@ "task = Task.init(project_name='Table Example', task_name='tabular preprocessing')\n", "logger = task.get_logger()\n", "configuration_dict = {'test_size': 0.1, 'split_random_state': 0}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/frameworks/pytorch/notebooks/table/download_and_split.ipynb b/examples/frameworks/pytorch/notebooks/table/download_and_split.ipynb index 98a72e57..11edd7ea 100644 --- a/examples/frameworks/pytorch/notebooks/table/download_and_split.ipynb +++ b/examples/frameworks/pytorch/notebooks/table/download_and_split.ipynb @@ -7,7 +7,7 @@ "outputs": [], "source": [ "! pip install -U pip\n", - "! pip install -U trains==0.16.2rc0\n", + "! pip install -U clearml==0.16.2rc0\n", "! pip install -U pandas==1.0.4\n", "! pip install -U scikit-learn==0.23.1\n", "! pip install -U pathlib2==2.3.5" @@ -23,7 +23,7 @@ "from pathlib2 import Path\n", "from sklearn.model_selection import train_test_split\n", "\n", - "from trains import Task" + "from clearml import Task" ] }, { @@ -35,7 +35,7 @@ "task = Task.init(project_name='Tabular Example', task_name='Download and split tabular dataset')\n", "logger = task.get_logger()\n", "configuration_dict = {'test_size': 0.1, 'split_random_state': 0}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, @@ -54,9 +54,9 @@ "source": [ "# Download the shelter-animal-outcomes dataset (https://www.kaggle.com/c/shelter-animal-outcomes)\n", "# and save it to your cloud storage or your mounted local storage\n", - "# If the data is on your cloud storage, you can use trains' storage manager to get a local copy of it:\n", - "# from trains.storage import StorageManager\n", - "# path_to_ShelterAnimal = StorageManager.get_local_copy(\"https://allegro-datasets.s3.amazonaws.com/trains/UrbanSound8K.zip\", \n", + "# If the data is on your cloud storage, you can use clearml' storage manager to get a local copy of it:\n", + "# from clearml.storage import StorageManager\n", + "# path_to_ShelterAnimal = StorageManager.get_local_copy(\"https://allegro-datasets.s3.amazonaws.com/clearml/UrbanSound8K.zip\", \n", "# extract_archive=True)\n", "path_to_ShelterAnimal = '/home/sam/Datasets/shelter-animal-outcomes'" ] diff --git a/examples/frameworks/pytorch/notebooks/table/pick_best_model.ipynb b/examples/frameworks/pytorch/notebooks/table/pick_best_model.ipynb index e587addb..c45f6cf1 100644 --- a/examples/frameworks/pytorch/notebooks/table/pick_best_model.ipynb +++ b/examples/frameworks/pytorch/notebooks/table/pick_best_model.ipynb @@ -7,7 +7,7 @@ "outputs": [], "source": [ "! pip install -U pip\n", - "! pip install -U trains==0.16.2rc0" + "! pip install -U clearml==0.16.2rc0" ] }, { @@ -16,7 +16,7 @@ "metadata": {}, "outputs": [], "source": [ - "from trains import Task, OutputModel" + "from clearml import Task, OutputModel" ] }, { @@ -27,7 +27,7 @@ "source": [ "task = Task.init(project_name='Tabular Example', task_name='pick best model')\n", "configuration_dict = {'train_tasks_ids': ['c9bff3d15309487a9e5aaa00358ff091', 'c9bff3d15309487a9e5aaa00358ff091']}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/frameworks/pytorch/notebooks/table/preprocessing_and_encoding.ipynb b/examples/frameworks/pytorch/notebooks/table/preprocessing_and_encoding.ipynb index bdb5e5d2..5707a1ca 100644 --- a/examples/frameworks/pytorch/notebooks/table/preprocessing_and_encoding.ipynb +++ b/examples/frameworks/pytorch/notebooks/table/preprocessing_and_encoding.ipynb @@ -7,7 +7,7 @@ "outputs": [], "source": [ "! pip install -U pip\n", - "! pip install -U trains==0.16.2rc0\n", + "! pip install -U clearml==0.16.2rc0\n", "! pip install -U pandas==1.0.4\n", "! pip install -U numpy==1.18.4" ] @@ -22,7 +22,7 @@ "import numpy as np\n", "from collections import Counter\n", "\n", - "from trains import Task" + "from clearml import Task" ] }, { @@ -35,7 +35,7 @@ "logger = task.get_logger()\n", "configuration_dict = {'data_task_id': '39fbf86fc4a341359ac6df4aa70ff91b',\n", " 'fill_categorical_NA': True, 'fill_numerical_NA': True}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/frameworks/pytorch/notebooks/table/tabular_ml_pipeline.ipynb b/examples/frameworks/pytorch/notebooks/table/tabular_ml_pipeline.ipynb index 15795220..32292da1 100644 --- a/examples/frameworks/pytorch/notebooks/table/tabular_ml_pipeline.ipynb +++ b/examples/frameworks/pytorch/notebooks/table/tabular_ml_pipeline.ipynb @@ -8,7 +8,7 @@ "source": [ "# pip install with locked versions\n", "! pip install -U pip\n", - "! pip install -U trains==0.16.2rc0" + "! pip install -U clearml==0.16.2rc0" ] }, { @@ -17,8 +17,8 @@ "metadata": {}, "outputs": [], "source": [ - "from trains import Task\n", - "from trains.automation.controller import PipelineController" + "from clearml import Task\n", + "from clearml.automation.controller import PipelineController" ] }, { diff --git a/examples/frameworks/pytorch/notebooks/table/train_tabular_predictor.ipynb b/examples/frameworks/pytorch/notebooks/table/train_tabular_predictor.ipynb index 96b1b958..13c10036 100644 --- a/examples/frameworks/pytorch/notebooks/table/train_tabular_predictor.ipynb +++ b/examples/frameworks/pytorch/notebooks/table/train_tabular_predictor.ipynb @@ -8,7 +8,7 @@ "source": [ "! pip install -U pip\n", "! pip install -U torch==1.5.1\n", - "! pip install -U trains==0.16.2rc0\n", + "! pip install -U clearml==0.16.2rc0\n", "! pip install -U pandas==1.0.4\n", "! pip install -U numpy==1.18.4\n", "! pip install -U tensorboard==2.2.1" @@ -29,7 +29,7 @@ "from torch.utils.data import Dataset\n", "from torch.utils.tensorboard import SummaryWriter\n", "\n", - "from trains import Task" + "from clearml import Task" ] }, { @@ -42,7 +42,7 @@ "logger = task.get_logger()\n", "configuration_dict = {'data_task_id': 'b605d76398f941e69fc91b43420151d2', \n", " 'number_of_epochs': 15, 'batch_size': 100, 'dropout': 0.3, 'base_lr': 0.1}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/frameworks/pytorch/notebooks/text/text_classification_AG_NEWS.ipynb b/examples/frameworks/pytorch/notebooks/text/text_classification_AG_NEWS.ipynb index 5ab63d2b..dcbd6e44 100644 --- a/examples/frameworks/pytorch/notebooks/text/text_classification_AG_NEWS.ipynb +++ b/examples/frameworks/pytorch/notebooks/text/text_classification_AG_NEWS.ipynb @@ -10,7 +10,7 @@ "! pip install -U torch==1.5.0\n", "! pip install -U torchtext==0.6.0\n", "! pip install -U matplotlib==3.2.1\n", - "! pip install -U trains>=0.15.0\n", + "! pip install -U clearml>=0.15.0\n", "! pip install -U tensorboard==2.2.1" ] }, @@ -28,7 +28,7 @@ "from torchtext.datasets import text_classification\n", "from torch.utils.tensorboard import SummaryWriter\n", "\n", - "from trains import Task\n", + "from clearml import Task\n", "\n", "%matplotlib inline" ] @@ -41,7 +41,7 @@ "source": [ "task = Task.init(project_name='Text Example', task_name='text classifier')\n", "configuration_dict = {'number_of_epochs': 6, 'batch_size': 16, 'ngrams': 2, 'base_lr': 1.0}\n", - "configuration_dict = task.connect(configuration_dict) # enabling configuration override by trains\n", + "configuration_dict = task.connect(configuration_dict) # enabling configuration override by clearml\n", "print(configuration_dict) # printing actual configuration (after override in remote mode)" ] }, diff --git a/examples/reporting/Allegro_Trains_logging_example.ipynb b/examples/reporting/Allegro_Trains_logging_example.ipynb index 6b32eb0d..068a1222 100644 --- a/examples/reporting/Allegro_Trains_logging_example.ipynb +++ b/examples/reporting/Allegro_Trains_logging_example.ipynb @@ -7,13 +7,13 @@ "id": "RZiRah3QiR_G" }, "source": [ - "# Allegro Trains logging example\n", + "# Allegro ClearML logging example\n", "\n", - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/allegroai/trains/blob/master/examples/reporting/Allegro_Trains_logging_example.ipynb)\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/allegroai/clearml/blob/master/examples/reporting/Allegro_Trains_logging_example.ipynb)\n", "\n", - "This example introduces Trains [Logger](https://allegro.ai/docs/logger.html) functionality. Logger is the Trains console log and metric interface.\n", + "This example introduces ClearML [Logger](https://allegro.ai/docs/logger.html) functionality. Logger is the ClearML console log and metric interface.\n", "\n", - "You can find more reporting examples [here](https://github.com/allegroai/trains/tree/master/examples/reporting)." + "You can find more reporting examples [here](https://github.com/allegroai/clearml/tree/master/examples/reporting)." ] }, { @@ -26,7 +26,7 @@ }, "outputs": [], "source": [ - "!pip install trains\n", + "!pip install clearml\n", "!pip install numpy" ] }, @@ -40,7 +40,7 @@ "### Create a new Task\n", "Create a new Task and get a Logger object for the Task.\n", "\n", - "To create a new Task object, call the `Task.init` method providing it with `project_name` (the project name for the experiment) and `task_name` (the name of the experiment). When `Task.init` executes, a link to the Web UI Results page for the newly generated Task will be printed, and the Task will be updated in real time in the Trains demo server.\n", + "To create a new Task object, call the `Task.init` method providing it with `project_name` (the project name for the experiment) and `task_name` (the name of the experiment). When `Task.init` executes, a link to the Web UI Results page for the newly generated Task will be printed, and the Task will be updated in real time in the ClearML demo server.\n", "\n", "You can read about the `Task` class in the docs [here](https://allegro.ai/docs/task.html).\n", "\n", @@ -59,7 +59,7 @@ "source": [ "import numpy as np\n", "\n", - "from trains import Task\n", + "from clearml import Task\n", "\n", "# Start a new task\n", "task = Task.init(project_name=\"Colab notebooks\", task_name=\"Explicit Logging\")\n", @@ -77,7 +77,7 @@ }, "source": [ "### Explicit scalar logging\n", - "Use the [Logger.report_scalar](https://allegro.ai/docs/logger.html#trains.logger.Logger.report_scalar) method to explicitly log scalars. Scalar plots appear in the Web UI, Results > Scalars tab." + "Use the [Logger.report_scalar](https://allegro.ai/docs/logger.html#clearml.logger.Logger.report_scalar) method to explicitly log scalars. Scalar plots appear in the Web UI, Results > Scalars tab." ] }, { @@ -241,7 +241,7 @@ }, "outputs": [], "source": [ - "from trains.storage import StorageManager\n", + "from clearml.storage import StorageManager\n", "image_local_copy = StorageManager.get_local_copy(\n", " remote_url=\"https://pytorch.org/tutorials/_static/img/neural-style/picasso.jpg\",\n", " name=\"picasso.jpg\"\n", @@ -273,7 +273,7 @@ "source": [ "#### Report images and media\n", "\n", - "Use [Logger.report_image](https://allegro.ai/docs/logger.html?highlight=report_image#trains.logger.Logger.report_image) and [Logger.report_media](https://allegro.ai/docs/logger.html?highlight=report_media#trains.logger.Logger.report_media) to report the downloaded samples. The debug samples appear in the Results > Debug Samples tab." + "Use [Logger.report_image](https://allegro.ai/docs/logger.html?highlight=report_image#clearml.logger.Logger.report_image) and [Logger.report_media](https://allegro.ai/docs/logger.html?highlight=report_media#clearml.logger.Logger.report_media) to report the downloaded samples. The debug samples appear in the Results > Debug Samples tab." ] }, { @@ -316,7 +316,7 @@ }, "source": [ "### Explicit text logging\n", - "Use [Logger.report_text](https://allegro.ai/docs/logger.html?highlight=report_text#trains.logger.Logger.report_text) to log text message. They appear in Results > Log." + "Use [Logger.report_text](https://allegro.ai/docs/logger.html?highlight=report_text#clearml.logger.Logger.report_text) to log text message. They appear in Results > Log." ] }, { @@ -344,7 +344,7 @@ "\n", "Reports are flushed in the background every couple of seconds, and at the end of the process execution.\n", "\n", - "Or, flush the Logger by calling [Logger.flush](https://allegro.ai/docs/logger.html?highlight=report_text#trains.logger.Logger.flush)." + "Or, flush the Logger by calling [Logger.flush](https://allegro.ai/docs/logger.html?highlight=report_text#clearml.logger.Logger.flush)." ] }, { @@ -364,7 +364,7 @@ "metadata": { "colab": { "collapsed_sections": [], - "name": "Allegro Trains logging example.ipynb", + "name": "Allegro ClearML logging example.ipynb", "provenance": [] }, "kernelspec": { diff --git a/examples/reporting/manual_matplotlib_reporting.py b/examples/reporting/manual_matplotlib_reporting.py deleted file mode 120000 index 294d4d39..00000000 --- a/examples/reporting/manual_matplotlib_reporting.py +++ /dev/null @@ -1 +0,0 @@ -matplotlib_manual_reporting.py \ No newline at end of file