The class_preds will be used to compare them to the real labels in add_pr_curve_tensorboard:
tensorboard_preds = test_preds == class_index
tensorboard_probs = test_probs[:, class_index]

If you would store the labels instead, you would just compare the ground truth to itself, wouldn’t you?
EDIT: I misunderstood the code and it should indeed compare the class_index to the targets.
The issue is tracked here 4.