Skip to content
This repository was archived by the owner on Jul 7, 2023. It is now read-only.

Commit 022387c

Browse files
T2T Teamcopybara-github
authored andcommitted
Automated refactoring to make code Python 3 compatible.
PiperOrigin-RevId: 308425160
1 parent 65c2178 commit 022387c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tensor2tensor/data_generators/wikisum/validate_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
import numpy as np
2525

26+
import six
27+
from six.moves import zip
2628
from tensor2tensor.data_generators.wikisum import wikisum
2729

2830
import tensorflow.compat.v1 as tf
@@ -44,7 +46,7 @@ def aggregate_stats(stats_files):
4446
for fname in stats_files:
4547
with tf.gfile.Open(fname) as f:
4648
stats = json.loads(f.read())
47-
for k, v in stats.iteritems():
49+
for k, v in six.iteritems(stats):
4850
if k not in all_stats:
4951
if isinstance(v, list):
5052
all_stats[k] = []

0 commit comments

Comments
 (0)