google-deepmind / deepmind-research

This repository contains implementations and illustrative code to accompany DeepMind publications
Apache License 2.0
13.26k stars 2.6k forks source link

In rl_unplugged, is your dependencies right? #66

Open weihongwei0586 opened 4 years ago

weihongwei0586 commented 4 years ago

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 commented 4 years ago

which version of TF should i install ?

sergomezcol commented 4 years ago

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.

weihongwei0586 commented 4 years ago

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 ?

sergomezcol commented 4 years ago

TF 2.3.0 as required by Reverb should work

weihongwei0586 commented 4 years ago

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.

sergomezcol commented 4 years ago

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

weihongwei0586 commented 4 years ago

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.

sergomezcol commented 4 years ago

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.

thkkk commented 3 years ago

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

arcticriki commented 3 years ago

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

thkkk commented 3 years ago

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.

arcticriki commented 3 years ago

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
DuaneNielsen commented 3 years ago

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 commented 3 years ago

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
IantheChan commented 3 years ago

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.