Skip to content

Commit 9e2c285

Browse files
yileicopybara-github
authored andcommitted
Make this code compatible with Python 3.10.
PiperOrigin-RevId: 472846465 Change-Id: Ie84b14fa2ddf0d355303daf3faddcd27b74086b7
1 parent 62a026b commit 9e2c285

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tf_agents/utils/example_encoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from __future__ import division
2020
from __future__ import print_function
2121

22-
import collections
22+
from collections import abc
2323
import io
2424
import gin
2525

@@ -171,7 +171,7 @@ def _example_decoder(serialized):
171171

172172
def _validate_shape(shape):
173173
"""Check that shape is a valid array shape."""
174-
if not isinstance(shape, collections.Iterable):
174+
if not isinstance(shape, abc.Iterable):
175175
raise TypeError('shape must be a tuple or other iterable object, not %s' %
176176
type(shape).__name__)
177177

0 commit comments

Comments
 (0)