Make clearml installation in jupyter notebooks optional

This commit is contained in:
Alex Burlacu 2023-04-03 18:30:57 +03:00
parent 202d93ce21
commit f9b370b947
18 changed files with 157 additions and 85 deletions

View File

@ -36,8 +36,9 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"!pip install clearml\n", "# If you don't have ClearML and ClearML Agent installed then uncomment these line\n",
"!pip install clearml-agent" "# !pip install clearml\n",
"# !pip install clearml-agent"
] ]
}, },
{ {
@ -137,15 +138,6 @@
" \n" " \n"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "DStY3iZnRpYb"
},
"outputs": [],
"source": []
},
{ {
"cell_type": "markdown", "cell_type": "markdown",
"metadata": { "metadata": {

File diff suppressed because one or more lines are too long

View File

@ -26,7 +26,16 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"!pip install clearml\n", "# If you don't have ClearML installed then uncomment this line\n",
"# !pip install clearml"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install tensorflow>=2.0" "!pip install tensorflow>=2.0"
] ]
}, },
@ -63,7 +72,7 @@
"from clearml import Task\n", "from clearml import Task\n",
"\n", "\n",
"# Start a new task\n", "# Start a new task\n",
"task = Task.init(project_name=\"Colab notebooks\", task_name=\"Keras with TensorBoard example\")\n" "task = Task.init(project_name=\"Colab notebooks\", task_name=\"Keras with TensorBoard example\")"
] ]
}, },
{ {
@ -118,7 +127,7 @@
"X_train = X_train.reshape(60000, 784).astype('float32') / 255.\n", "X_train = X_train.reshape(60000, 784).astype('float32') / 255.\n",
"X_test = X_test.reshape(10000, 784).astype('float32') / 255.\n", "X_test = X_test.reshape(10000, 784).astype('float32') / 255.\n",
"print(X_train.shape[0], 'train samples')\n", "print(X_train.shape[0], 'train samples')\n",
"print(X_test.shape[0], 'test samples')\n" "print(X_test.shape[0], 'test samples')"
] ]
}, },
{ {
@ -173,8 +182,7 @@
"output_folder = os.path.join(tempfile.gettempdir(), 'keras_example')\n", "output_folder = os.path.join(tempfile.gettempdir(), 'keras_example')\n",
"\n", "\n",
"board = keras.callbacks.TensorBoard(histogram_freq=1, log_dir=output_folder, write_images=False)\n", "board = keras.callbacks.TensorBoard(histogram_freq=1, log_dir=output_folder, write_images=False)\n",
"model_store = keras.callbacks.ModelCheckpoint(filepath=os.path.join(output_folder, 'weight.{epoch}.hdf5'))\n", "model_store = keras.callbacks.ModelCheckpoint(filepath=os.path.join(output_folder, 'weight.{epoch}.hdf5'))"
"\n"
] ]
}, },
{ {

File diff suppressed because one or more lines are too long

View File

@ -26,8 +26,16 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"!pip install clearml\n", "# If you don't have ClearML installed then uncomment this line\n",
"!pip install numpy\n", "# !pip install clearml"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install seaborn" "!pip install seaborn"
] ]
}, },
@ -62,7 +70,7 @@
"from clearml import Task\n", "from clearml import Task\n",
"\n", "\n",
"# Start a new task\n", "# Start a new task\n",
"task = Task.init(project_name=\"Colab notebooks\", task_name=\"Matplotlib example\")\n" "task = Task.init(project_name=\"Colab notebooks\", task_name=\"Matplotlib example\")"
] ]
}, },
{ {
@ -94,7 +102,7 @@
"colors = np.random.rand(N)\n", "colors = np.random.rand(N)\n",
"area = (30 * np.random.rand(N))**2 # 0 to 15 point radii\n", "area = (30 * np.random.rand(N))**2 # 0 to 15 point radii\n",
"plt.scatter(x, y, s=area, c=colors, alpha=0.5)\n", "plt.scatter(x, y, s=area, c=colors, alpha=0.5)\n",
"plt.show()\n" "plt.show()"
] ]
}, },
{ {

View File

@ -1,5 +1,17 @@
{ {
"cells": [ "cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install -U pip\n",
"\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# !pip install -U clearml>=0.16.1"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@ -10,12 +22,10 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n",
"!pip install -U torch==1.5.1\n", "!pip install -U torch==1.5.1\n",
"!pip install -U torchaudio==0.5.1\n", "!pip install -U torchaudio==0.5.1\n",
"!pip install -U torchvision==0.6.1\n", "!pip install -U torchvision==0.6.1\n",
"!pip install -U matplotlib==3.2.1\n", "!pip install -U matplotlib==3.2.1\n",
"! pip install -U clearml>=0.16.1\n",
"!pip install -U pandas==1.0.4\n", "!pip install -U pandas==1.0.4\n",
"!pip install -U numpy==1.18.4\n", "!pip install -U numpy==1.18.4\n",
"!pip install -U tensorboard==2.2.1" "!pip install -U tensorboard==2.2.1"

View File

@ -1,5 +1,17 @@
{ {
"cells": [ "cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install -U pip\n",
"\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# !pip install -U clearml>=0.16.1"
]
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
@ -8,11 +20,9 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n",
"!pip install -U torch==1.5.1\n", "!pip install -U torch==1.5.1\n",
"!pip install -U torchaudio==0.5.1\n", "!pip install -U torchaudio==0.5.1\n",
"!pip install -U matplotlib==3.2.1\n", "!pip install -U matplotlib==3.2.1\n",
"! pip install -U clearml>=0.16.1\n",
"!pip install -U tensorboard==2.2.1" "!pip install -U tensorboard==2.2.1"
] ]
}, },

View File

@ -10,9 +10,11 @@
"# ! pip install -U clearml-agent==0.15.0\n", "# ! pip install -U clearml-agent==0.15.0\n",
"# ! clearml-agent daemon --queue default\n", "# ! clearml-agent daemon --queue default\n",
"\n", "\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml>=0.16.2\n",
"\n",
"# pip install with locked versions\n", "# pip install with locked versions\n",
"! pip install -U pandas==1.0.3\n", "! pip install -U pandas==1.0.3\n",
"! pip install -U clearml>=0.16.2\n",
"! pip install -U optuna==2.0.0" "! pip install -U optuna==2.0.0"
] ]
}, },

View File

@ -11,11 +11,13 @@
"# pip install -U ipywidgets==7.5.1\n", "# pip install -U ipywidgets==7.5.1\n",
"# jupyter nbextension enable --py widgetsnbextension\n", "# jupyter nbextension enable --py widgetsnbextension\n",
"\n", "\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml>=0.16.1\n",
"\n",
"# pip install with locked versions\n", "# pip install with locked versions\n",
"! pip install -U torch==1.5.1\n", "! pip install -U torch==1.5.1\n",
"! pip install -U torchvision==0.6.1\n", "! pip install -U torchvision==0.6.1\n",
"! pip install -U numpy==1.18.4\n", "! pip install -U numpy==1.18.4\n",
"! pip install -U clearml>=0.16.1\n",
"! pip install -U tensorboard==2.2.1" "! pip install -U tensorboard==2.2.1"
] ]
}, },

View File

@ -7,8 +7,18 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n", "! pip install -U pip\n",
"\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml>=0.15.1"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! pip install -U torch==1.5.1\n", "! pip install -U torch==1.5.1\n",
"! pip install -U clearml>=0.15.1\n",
"! pip install -U pandas==1.0.4\n", "! pip install -U pandas==1.0.4\n",
"! pip install -U numpy==1.18.4\n", "! pip install -U numpy==1.18.4\n",
"! pip install -U pathlib2==2.3.5\n", "! pip install -U pathlib2==2.3.5\n",

View File

@ -7,7 +7,17 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n", "! pip install -U pip\n",
"! pip install -U clearml==0.16.2rc0\n", "\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml==0.16.2rc0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! pip install -U pandas==1.0.4\n", "! pip install -U pandas==1.0.4\n",
"! pip install -U scikit-learn==0.23.1\n", "! pip install -U scikit-learn==0.23.1\n",
"! pip install -U pathlib2==2.3.5" "! pip install -U pathlib2==2.3.5"

View File

@ -14,7 +14,9 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n", "! pip install -U pip\n",
"! pip install -U clearml==0.16.2rc0" "\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml==0.16.2rc0"
] ]
}, },
{ {

View File

@ -14,7 +14,17 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n", "! pip install -U pip\n",
"! pip install -U clearml==0.16.2rc0\n", "\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml==0.16.2rc0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! pip install -U pandas==1.0.4\n", "! pip install -U pandas==1.0.4\n",
"! pip install -U numpy==1.18.4" "! pip install -U numpy==1.18.4"
] ]

View File

@ -33,7 +33,9 @@
"source": [ "source": [
"# pip install with locked versions\n", "# pip install with locked versions\n",
"! pip install -U pip\n", "! pip install -U pip\n",
"! pip install -U clearml" "\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml"
] ]
}, },
{ {

View File

@ -14,8 +14,18 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n", "! pip install -U pip\n",
"\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml==0.16.2rc0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! pip install -U torch==1.5.1\n", "! pip install -U torch==1.5.1\n",
"! pip install -U clearml==0.16.2rc0\n",
"! pip install -U pandas==1.0.4\n", "! pip install -U pandas==1.0.4\n",
"! pip install -U numpy==1.18.4\n", "! pip install -U numpy==1.18.4\n",
"! pip install -U tensorboard==2.2.1" "! pip install -U tensorboard==2.2.1"

View File

@ -7,10 +7,20 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"! pip install -U pip\n", "! pip install -U pip\n",
"\n",
"# If you don't have ClearML installed then uncomment this line\n",
"# ! pip install -U clearml>=0.15.0"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"! pip install -U torch==1.5.0\n", "! pip install -U torch==1.5.0\n",
"! pip install -U torchtext==0.6.0\n", "! pip install -U torchtext==0.6.0\n",
"! pip install -U matplotlib==3.2.1\n", "! pip install -U matplotlib==3.2.1\n",
"! pip install -U clearml>=0.15.0\n",
"! pip install -U tensorboard==2.2.1" "! pip install -U tensorboard==2.2.1"
] ]
}, },

View File

@ -26,8 +26,8 @@
}, },
"outputs": [], "outputs": [],
"source": [ "source": [
"!pip install clearml\n", "# If you don't have ClearML installed then uncomment this line\n",
"!pip install numpy" "# !pip install clearml"
] ]
}, },
{ {