My understanding is that this table has to be created using wandb.log() in the training code, but I can’t access the notebook used for the run in the example workspace.
Is there a code snippet or collab example for doing this? I’ve seen the docs for logging a table, but I need a specific example like the one in the example workspace that shows clothing images, and metrics e.g. ‘guess’. ‘truth’ etc.
I’m glad to hear you’re excited to log a wandb.Table. You can create a wandb.Table with wandb.Image, strings and floats for the values in each row, and then log it using wandb.log({'my_eval_table': table}).
# create a Table with the same columns as above,
# plus confidence scores for all labels
columns=["id", "image", "guess", "truth"]
for digit in range(10):
columns.append("score_" + str(digit))
test_table = wandb.Table(columns=columns)
# run inference on every image, assuming my_model returns the
# predicted label, and the ground truth labels are available
for img_id, img in enumerate(mnist_test_data):
true_label = mnist_test_data_labels[img_id]
guess_label = my_model.predict(img)
test_table.add_data(img_id, wandb.Image(img), \
guess_label, true_label)