Skip to content

Commit

Permalink
Fix metaflow and tensorflow/tensorboard examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothiraldan committed Jul 9, 2024
1 parent cf71668 commit ed70718
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"outputs": [],
"source": [
"%pip install -U \"comet_ml>=3.44.0\" tensorflow tensorflow-datasets"
"%pip install -U \"comet_ml>=3.44.0\" tensorflow \"keras>=3.0.0\" tensorflow-datasets"
]
},
{
Expand All @@ -48,7 +48,7 @@
"source": [
"import comet_ml\n",
"\n",
"comet_ml.login(project_name=\"comet-example-tensorboard\")"
"comet_ml.login(project_name=\"comet-example-tensorboard-gradient-tape-notebook\")"
]
},
{
Expand Down Expand Up @@ -280,10 +280,10 @@
"\n",
"for epoch in range(EPOCHS):\n",
" # Reset the metrics at the start of the next epoch\n",
" train_loss.reset_states()\n",
" train_accuracy.reset_states()\n",
" test_loss.reset_states()\n",
" test_accuracy.reset_states()\n",
" train_loss.reset_state()\n",
" train_accuracy.reset_state()\n",
" test_loss.reset_state()\n",
" test_accuracy.reset_state()\n",
"\n",
" for images, labels in train_ds:\n",
" train_step(images, labels)\n",
Expand Down Expand Up @@ -346,9 +346,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.1"
"version": "3.10.12"
}
},
"nbformat": 4,
"nbformat_minor": 1
"nbformat_minor": 4
}
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def evaluate_classification_metrics(self):
)
accuracy = accuracy_score(labels, torch.argmax(predictions, dim=1))

self.comet_experiment.log_metrics(clf_metrics)
self.comet_experiment.log_metrics({"evaluation_by_class": clf_metrics})
self.comet_experiment.log_metrics({"accuracy": accuracy})

log_model(self.comet_experiment, model, self.input)
Expand Down

0 comments on commit ed70718

Please sign in to comment.