tensorflow / agents

TF-Agents: A reliable, scalable and easy to use TensorFlow library for Contextual Bandits and Reinforcement Learning.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeError: configurable() got an unexpected keyword argument 'blacklist'

ParamB11 opened this issue · comments

Hi,

I wanted to use tf-agents with gpu and since the gpu I have supports CUDA=10.1 I installed tf=2.3.0 and tf-agents=0.6.0 to make sure everything is comaptible.
I am able to import tf_agents but when I try to run the following command:
from tf_agents.environments import suite_gym
I get the following error:
Traceback (most recent call last):
File "", line 1, in
File "/home/param/anaconda3/envs/tf_trial/lib/python3.8/site-packages/tf_agents/environments/init.py", line 26, in
from tf_agents.environments import utils
File "/home/param/anaconda3/envs/tf_trial/lib/python3.8/site-packages/tf_agents/environments/utils.py", line 28, in
from tf_agents.policies import random_py_policy
File "/home/param/anaconda3/envs/tf_trial/lib/python3.8/site-packages/tf_agents/policies/init.py", line 20, in
from tf_agents.policies import epsilon_greedy_policy
File "/home/param/anaconda3/envs/tf_trial/lib/python3.8/site-packages/tf_agents/policies/epsilon_greedy_policy.py", line 33, in
from tf_agents.policies import greedy_policy
File "/home/param/anaconda3/envs/tf_trial/lib/python3.8/site-packages/tf_agents/policies/greedy_policy.py", line 42, in
@gin.configurable(module='tf_agents', blacklist=['policy'])
TypeError: configurable() got an unexpected keyword argument 'blacklist'.

I couldn't find any issue with the same error. Any help is appreciated.
The packages installed in my environment are as follows:
packages in environment at /home/user/anaconda3/envs/tf_trial:

Name Version Build Channel
_libgcc_mutex 0.1 main
_openmp_mutex 5.1 1_gnu
absl-py 2.0.0 pypi_0 pypi
astunparse 1.6.3 pypi_0 pypi
ca-certificates 2023.7.22 hbcca054_0 conda-forge
cachetools 5.3.1 pypi_0 pypi
certifi 2023.7.22 pypi_0 pypi
charset-normalizer 3.2.0 pypi_0 pypi
cloudpickle 1.3.0 pypi_0 pypi
cudatoolkit 10.1.243 h8cb64d8_10 conda-forge
cudnn 7.6.5.32 hc0a50b0_1 conda-forge
decorator 5.1.1 pypi_0 pypi
dm-tree 0.1.8 pypi_0 pypi
gast 0.3.3 pypi_0 pypi
gin-config 0.5.0 pypi_0 pypi
google-auth 2.23.0 pypi_0 pypi
google-auth-oauthlib 1.0.0 pypi_0 pypi
google-pasta 0.2.0 pypi_0 pypi
grpcio 1.58.0 pypi_0 pypi
gym 0.23.0 pypi_0 pypi
gym-notices 0.0.8 pypi_0 pypi
h5py 2.10.0 pypi_0 pypi
idna 3.4 pypi_0 pypi
importlib-metadata 6.8.0 pypi_0 pypi
keras-preprocessing 1.1.2 pypi_0 pypi
ld_impl_linux-64 2.38 h1181459_1
libffi 3.4.4 h6a678d5_0
libgcc-ng 11.2.0 h1234567_1
libgomp 11.2.0 h1234567_1
libstdcxx-ng 11.2.0 h1234567_1
markdown 3.4.4 pypi_0 pypi
markupsafe 2.1.3 pypi_0 pypi
ncurses 6.4 h6a678d5_0
numpy 1.23.5 pypi_0 pypi
oauthlib 3.2.2 pypi_0 pypi
openssl 3.0.10 h7f8727e_2
opt-einsum 3.3.0 pypi_0 pypi
pillow 10.0.1 pypi_0 pypi
pip 23.2.1 py38h06a4308_0
protobuf 3.20.3 pypi_0 pypi
pyasn1 0.5.0 pypi_0 pypi
pyasn1-modules 0.3.0 pypi_0 pypi
pygame 2.1.3 pypi_0 pypi
python 3.8.18 h955ad1f_0
readline 8.2 h5eee18b_0
requests 2.31.0 pypi_0 pypi
requests-oauthlib 1.3.1 pypi_0 pypi
rsa 4.9 pypi_0 pypi
scipy 1.4.1 pypi_0 pypi
setuptools 68.0.0 py38h06a4308_0
six 1.16.0 pypi_0 pypi
sqlite 3.41.2 h5eee18b_0
tensorboard 2.14.0 pypi_0 pypi
tensorboard-data-server 0.7.1 pypi_0 pypi
tensorflow 2.3.0 pypi_0 pypi
tensorflow-estimator 2.3.0 pypi_0 pypi
tensorflow-probability 0.11.1 pypi_0 pypi
termcolor 2.3.0 pypi_0 pypi
tf-agents 0.6.0 pypi_0 pypi
tk 8.6.12 h1ccaba5_0
typing-extensions 4.5.0 pypi_0 pypi
urllib3 1.26.16 pypi_0 pypi
werkzeug 2.3.7 pypi_0 pypi
wheel 0.38.4 py38h06a4308_0
wrapt 1.15.0 pypi_0 pypi
xz 5.4.2 h5eee18b_0
zipp 3.17.0 pypi_0 pypi
zlib 1.2.13 h5eee18b_0

The problem got solved when I downgraded the gin-config version to 0.3.0. Most likely this is the version compatible with tensorflow=2.3.0.