google / trax

Trax — Deep Learning with Clear Code and Speed
Apache License 2.0
8.1k stars 816 forks source link

TypeError: configurable() got an unexpected keyword argument 'denylist' #1393

Open ZeynabR opened 3 years ago

ZeynabR commented 3 years ago

Description

I get this error when I import trax. Can someone help me to fix it?

Environment information

OS: macOS Big Sur

$ pip freeze | grep trax
trax==1.3.7
$ pip freeze | grep tensor
mesh-tensorflow==0.1.16
tensor2tensor==1.15.7
tensorboard==2.3.0
tensorboard-plugin-wit==1.7.0
tensorflow==2.3.0
tensorflow-addons==0.11.2
tensorflow-datasets==3.2.1
tensorflow-estimator==2.3.0
tensorflow-gan==2.0.0
tensorflow-hub==0.9.0
tensorflow-metadata==0.23.0
tensorflow-probability==0.7.0
tensorflow-text==2.3.0

$ pip freeze | grep jax
jax==0.1.75
jaxlib==0.1.52

$ python -V
Python 3.7.4```

### For bugs: reproduction and error logs

import trax ...

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/zeynab/opt/anaconda3/lib/python3.7/site-packages/trax/__init__.py", line 18, in <module>
    from trax import data
  File "/Users/zeynab/opt/anaconda3/lib/python3.7/site-packages/trax/data/__init__.py", line 20, in <module>
    from trax.data import tf_inputs
  File "/Users/zeynab/opt/anaconda3/lib/python3.7/site-packages/trax/data/tf_inputs.py", line 506, in <module>
    @gin.configurable(denylist=['dataset', 'training'])
TypeError: configurable() got an unexpected keyword argument 'denylist'
...
ZeynabR commented 3 years ago

The solution: !pip install --upgrade -q gin git+https://github.com/google/trax.git@v1.2.3

aniquetahir commented 3 years ago

It's because they replaced 'blacklist' with 'denylist' ...

arjung128 commented 3 years ago

I am getting this error while using dopamine. I tried the pip install command above but that didn't help.

Any ideas?

arjung128 commented 3 years ago

Nevermind, fixed by upgrading gin-config: pip install --upgrade gin-config