Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit ed70718

Browse files
committedJul 9, 2024·
Fix metaflow and tensorflow/tensorboard examples
1 parent cf71668 commit ed70718

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed
 

‎integrations/model-training/tensorflow/notebooks/Comet_and_Tensorflow.ipynb

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
"outputs": [],
2828
"source": [
29-
"%pip install -U \"comet_ml>=3.44.0\" tensorflow tensorflow-datasets"
29+
"%pip install -U \"comet_ml>=3.44.0\" tensorflow \"keras>=3.0.0\" tensorflow-datasets"
3030
]
3131
},
3232
{
@@ -48,7 +48,7 @@
4848
"source": [
4949
"import comet_ml\n",
5050
"\n",
51-
"comet_ml.login(project_name=\"comet-example-tensorboard\")"
51+
"comet_ml.login(project_name=\"comet-example-tensorboard-gradient-tape-notebook\")"
5252
]
5353
},
5454
{
@@ -280,10 +280,10 @@
280280
"\n",
281281
"for epoch in range(EPOCHS):\n",
282282
" # Reset the metrics at the start of the next epoch\n",
283-
" train_loss.reset_states()\n",
284-
" train_accuracy.reset_states()\n",
285-
" test_loss.reset_states()\n",
286-
" test_accuracy.reset_states()\n",
283+
" train_loss.reset_state()\n",
284+
" train_accuracy.reset_state()\n",
285+
" test_loss.reset_state()\n",
286+
" test_accuracy.reset_state()\n",
287287
"\n",
288288
" for images, labels in train_ds:\n",
289289
" train_step(images, labels)\n",
@@ -346,9 +346,9 @@
346346
"name": "python",
347347
"nbconvert_exporter": "python",
348348
"pygments_lexer": "ipython3",
349-
"version": "3.9.1"
349+
"version": "3.10.12"
350350
}
351351
},
352352
"nbformat": 4,
353-
"nbformat_minor": 1
353+
"nbformat_minor": 4
354354
}

‎integrations/workflow-orchestration/metaflow/metaflow-model-evaluation/metaflow-model-evaluation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def evaluate_classification_metrics(self):
215215
)
216216
accuracy = accuracy_score(labels, torch.argmax(predictions, dim=1))
217217

218-
self.comet_experiment.log_metrics(clf_metrics)
218+
self.comet_experiment.log_metrics({"evaluation_by_class": clf_metrics})
219219
self.comet_experiment.log_metrics({"accuracy": accuracy})
220220

221221
log_model(self.comet_experiment, model, self.input)

0 commit comments

Comments
 (0)
Please sign in to comment.