mirror of
https://github.com/google-deepmind/deepmind-research.git
synced 2026-08-17 08:32:43 +08:00
Make this code compatible with Python 3.10.
PiperOrigin-RevId: 473700513
This commit is contained in:
committed by
Diego de las Casas
parent
3af71dd9a7
commit
58fb45db7e
@@ -19,6 +19,7 @@ from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
import collections
|
||||
from collections import abc
|
||||
import numpy as np
|
||||
from six.moves import range
|
||||
|
||||
@@ -36,7 +37,7 @@ class EpsilonGreedyPolicy(object):
|
||||
Raises:
|
||||
ValueError: if `actions` agument is not an iterable.
|
||||
"""
|
||||
if not isinstance(actions, collections.Iterable):
|
||||
if not isinstance(actions, abc.Iterable):
|
||||
raise ValueError('`actions` argument must be an iterable.')
|
||||
|
||||
self._value_function = value_function
|
||||
|
||||
Reference in New Issue
Block a user