deepmind-research icon indicating copy to clipboard operation
deepmind-research copied to clipboard

In rl_unplugged, is your dependencies right?

Open weihongwei0586 opened this issue 4 years ago • 15 comments

The TF version in my Linux env is 2.2, i installed the dependencies based on your requirement.txt, when i run your atari demo, it note me that 'no moudle named tf.contrib', so i down the TF version to 1.15, and Then it note me that 'the version of Reverb require TF version >=2.3.0, and then i upgrade the TF to 2.3.0. Now it notes me 'no moudle named tf.contrib'

weihongwei0586 avatar Jul 28 '20 16:07 weihongwei0586

which version of TF should i install ?

weihongwei0586 avatar Jul 28 '20 16:07 weihongwei0586

Thanks for reporting this.

I think your problem can be fixed by upgrading the dopamine-rl package to version >=3.1.0: pip install dopamine-rl==3.1.2

Please let me know if that works for you. I am investigating in more detail and will update the requirements.txt file and the atari colab noteboook soon.

sergomezcol avatar Jul 29 '20 08:07 sergomezcol

Thanks for reporting this.

I think your problem can be fixed by upgrading the dopamine-rl package to version >=3.1.0: pip install dopamine-rl==3.1.2

Please let me know if that works for you. I am investigating in more detail and will update the requirements.txt file and the atari colab noteboook soon.

But, Which Version of TF should I install ?

weihongwei0586 avatar Jul 29 '20 09:07 weihongwei0586

TF 2.3.0 as required by Reverb should work

sergomezcol avatar Jul 29 '20 10:07 sergomezcol

TF 2.3.0 as required by Reverb should work

but in atari, it use tf.contrib moudle, which has been removed in TF >=2.0 Also, in your requirement.txt the package 'pkg-resources==0.0.0' is very strange, how can a package's version is 0.0.0, of course, it can not be installed by pip nor conda.

weihongwei0586 avatar Jul 29 '20 13:07 weihongwei0586

The contrib module is imported by an older version of the dopamine-rl dependency. Upgrading that to version 3.1.2 should fix the problem since that will be compatible with TF 2.3

sergomezcol avatar Jul 30 '20 15:07 sergomezcol

The contrib module is imported by an older version of the dopamine-rl dependency. Upgrading that to version 3.1.2 should fix the problem since that will be compatible with TF 2.3

Thank you very much, i have figure out the problem by upgrade dopamine to 3.1.2 and upgrade TF to 2.3.0. And your demo has ran on my machine.

weihongwei0586 avatar Jul 30 '20 15:07 weihongwei0586

That's great to hear, thanks for confirming this works for you. We will update the requirements file soon and then we will mark this as closed.

sergomezcol avatar Jul 31 '20 07:07 sergomezcol

Is the problem about requirements file solved? I encountered many problems during the installation, such as the version of tf-nightly.

thkkk avatar May 10 '21 13:05 thkkk

Is the problem about requirements file solved? I encountered many problems during the installation, such as the version of tf-nightly.

@thkkk Can you suggest the fixes to the requirements.txt? tf-nightly is also causing me problems

arcticriki avatar May 11 '21 13:05 arcticriki

Is the problem about requirements file solved? I encountered many problems during the installation, such as the version of tf-nightly.

@thkkk Can you suggest the fixes to the requirements.txt? tf-nightly is also causing me problems

I have not solved it completely. I tried to delete "==" and the version number behind in the requirements.txt, but another problem occurred.

thkkk avatar May 11 '21 14:05 thkkk

Is the problem about requirements file solved? I encountered many problems during the installation, such as the version of tf-nightly.

@thkkk Can you suggest the fixes to the requirements.txt? tf-nightly is also causing me problems

I have not solved it completely. I tried to delete "==" and the version number behind in the requirements.txt, but another problem occurred.

Please post here if you end up with a working requirements.txt. For the moment, I've replaced the tf-nightly with standard tensorflow (version 2.3, as suggested above). Installation went smooth, but then, at running time, dm-reverb is raising the following error:

Traceback (most recent call last):
  File "rl_unplugged/atari_example.py", line 29, in <module>
    from rl_unplugged import atari
  File "/home/riccardo.belluzzo/RL/benchmarks/rl_unplugged/deepmind-research/rl_unplugged/atari.py", line 47, in <module>
    import reverb
  File "/opt/conda/envs/deepmind-research/lib/python3.7/site-packages/reverb/__init__.py", line 27, in <module>
    from reverb import item_selectors as selectors
  File "/opt/conda/envs/deepmind-research/lib/python3.7/site-packages/reverb/item_selectors.py", line 19, in <module>
    from reverb import pybind
  File "/opt/conda/envs/deepmind-research/lib/python3.7/site-packages/reverb/pybind.py", line 1, in <module>
    import tensorflow as _tf; from .libpybind import *; del _tf
ImportError: libpython3.7m.so.1.0: cannot open shared object file: No such file or directory

arcticriki avatar May 11 '21 15:05 arcticriki

Indeed. The requirements seem rather lengthy and over-complex for what essentially is just a bunch of compressed files. Any chance we can get a refactor to make this a bit easier to install?

DuaneNielsen avatar May 11 '21 19:05 DuaneNielsen

Here is the requirements.txt I ended up with

Not making any claims as to it's correctness, but I managed to load the atari example, no nightly builds.

absl-py>=0.9.0
astunparse==1.6.3
atari-py==0.2.6
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
cloudpickle==1.3.0
decorator==4.4.2
dm-acme==0.1.7
dm-control==0.0.319497192
dm-env==1.2
dm-reverb
dm-sonnet==2.0.0
dm-tree==0.1.5
dopamine-rl==3.1.2
future==0.18.2
gast==0.3.3
gin-config==0.3.0
glfw==1.11.2
google-auth==1.18.0
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio>=1.30.0
gym==0.17.2
h5py==2.10.0
idna==2.10
Keras-Preprocessing==1.1.2
lxml==4.5.1
Markdown==3.2.2
numpy>=1.19.0
oauthlib==3.1.0
opencv-python==4.3.0.36
Pillow==7.2.0
portpicker==1.3.1
protobuf==3.12.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyglet==1.5.0
PyOpenGL==3.1.5
pyparsing==2.4.7
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scipy==1.4.1
six==1.15.0
tabulate==0.8.7
tensorboard>=2.3.0
tensorboard-plugin-wit==1.7.0
termcolor==1.1.0
tensorflow==2.4.0
tensorflow-probability
trfl==1.1.0
urllib3==1.25.9
Werkzeug==1.0.1
wrapt==1.12.1

DuaneNielsen avatar May 12 '21 00:05 DuaneNielsen

Here is the requirements.txt I ended up with

Not making any claims as to it's correctness, but I managed to load the atari example, no nightly builds.

absl-py>=0.9.0
astunparse==1.6.3
atari-py==0.2.6
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
cloudpickle==1.3.0
decorator==4.4.2
dm-acme==0.1.7
dm-control==0.0.319497192
dm-env==1.2
dm-reverb
dm-sonnet==2.0.0
dm-tree==0.1.5
dopamine-rl==3.1.2
future==0.18.2
gast==0.3.3
gin-config==0.3.0
glfw==1.11.2
google-auth==1.18.0
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio>=1.30.0
gym==0.17.2
h5py==2.10.0
idna==2.10
Keras-Preprocessing==1.1.2
lxml==4.5.1
Markdown==3.2.2
numpy>=1.19.0
oauthlib==3.1.0
opencv-python==4.3.0.36
Pillow==7.2.0
portpicker==1.3.1
protobuf==3.12.2
pyasn1==0.4.8
pyasn1-modules==0.2.8
pyglet==1.5.0
PyOpenGL==3.1.5
pyparsing==2.4.7
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scipy==1.4.1
six==1.15.0
tabulate==0.8.7
tensorboard>=2.3.0
tensorboard-plugin-wit==1.7.0
termcolor==1.1.0
tensorflow==2.4.0
tensorflow-probability
trfl==1.1.0
urllib3==1.25.9
Werkzeug==1.0.1
wrapt==1.12.1

I used this requirement file. Though the installation went smooth, I encountered the same question as @arcticriki when running the codes. I fixed this by using pip install dm-reverb==0.1.0 and pip install tensorflow==2.3.

IantheChan avatar Aug 19 '21 06:08 IantheChan