mirror of
https://github.com/clearml/clearml
synced 2025-06-26 18:16:07 +00:00
Make clearml installation in jupyter notebooks optional
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -26,7 +26,16 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"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"
|
||||
]
|
||||
},
|
||||
@@ -63,7 +72,7 @@
|
||||
"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"
|
||||
"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_test = X_test.reshape(10000, 784).astype('float32') / 255.\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",
|
||||
"\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",
|
||||
"\n"
|
||||
"model_store = keras.callbacks.ModelCheckpoint(filepath=os.path.join(output_folder, 'weight.{epoch}.hdf5'))"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -228,4 +236,4 @@
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user