Skip to content

Commit 22f4e29

Browse files
committed
Fix tests and demo
1 parent 10793bf commit 22f4e29

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: tensorboard/plugins/pr_curve/pr_curve_demo.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def start_runs(
161161
weights = tf.cast(consecutive_indices % 2, dtype=tf.float32)
162162

163163
summary.op(
164-
tag=color,
164+
name=color,
165165
labels=labels[:, i],
166166
predictions=predictions[i],
167167
num_thresholds=thresholds,

Diff for: tensorboard/plugins/pr_curve/summary.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
_DEFAULT_NUM_THRESHOLDS = 200
3737

3838
def op(
39-
tag,
39+
name,
4040
labels,
4141
predictions,
4242
num_thresholds=None,
@@ -90,7 +90,7 @@ def op(
9090

9191
dtype = predictions.dtype
9292

93-
with tf.name_scope(tag, values=[labels, predictions, weights]):
93+
with tf.name_scope(name, values=[labels, predictions, weights]):
9494
tf.assert_type(labels, tf.bool)
9595
# We cast to float to ensure we have 0.0 or 1.0.
9696
f_labels = tf.cast(labels, dtype)

Diff for: tensorboard/plugins/pr_curve/summary_test.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ def test_many_values_with_weights(self):
221221
def test_raw_data_op(self):
222222
# We pass raw counts and precision/recall values.
223223
op = summary.raw_data_op(
224-
tag='foo',
224+
name='foo',
225225
true_positive_counts=tf.constant([75, 64, 21, 5, 0]),
226226
false_positive_counts=tf.constant([150, 105, 18, 0, 0]),
227227
true_negative_counts=tf.constant([0, 45, 132, 150, 150]),
@@ -282,11 +282,11 @@ def test_matches_op(self):
282282
predictions = tf.constant([0.2, 0.4, 0.5, 0.6, 0.8], dtype=tf.float32)
283283
labels = tf.constant([False, True, True, False, True], dtype=tf.bool)
284284

285-
pr_curve, update_op = summary.streaming_op(tag='pr_curve',
285+
pr_curve, update_op = summary.streaming_op(name='pr_curve',
286286
predictions=predictions,
287287
labels=labels,
288288
num_thresholds=10)
289-
expected_pr_curve = summary.op(tag='pr_curve',
289+
expected_pr_curve = summary.op(name='pr_curve',
290290
predictions=predictions,
291291
labels=labels,
292292
num_thresholds=10)

0 commit comments

Comments
 (0)