IntelLabs / coach

Reinforcement Learning Coach by Intel AI Lab enables easy experimentation with state of the art Reinforcement Learning algorithms
https://intellabs.github.io/coach/
Apache License 2.0
2.32k stars 461 forks source link

Error installing rl_coach with intel-tensorflow 1.9.0 #330

Closed jaimeff closed 5 years ago

jaimeff commented 5 years ago

(This a different issue from the one about tensorflow-gpu)

I have followed the requirements stated in the installation page:

Everything goes fine until the following command is executed pip3 install rl_coach

In the middle of the installation I can see that intel-tensorflow installs correctly, here's a fragment:

Collecting intel-tensorflow>=1.9.0 (from rl_coach) Downloading https://files.pythonhosted.org/packages/82/9c/d40c530f0d788d8c68a224d9252e9710289bcdb22ded454f9dce73dc453e/intel_tensorflow-1.13.1-cp35-cp35m-manylinux1_x86_64.whl (138.1MB) |████████████████████████████████| 138.1MB 2.0MB/s

But at the end of installation an error arises, although apparently everything was installed correctly (ERROR: rl-coach 0.12.0 requires intel-tensorflow>=1.9.0, which is not installed)

` Building wheel for absl-py (setup.py) ... done Stored in directory: /home/jauma/.cache/pip/wheels/ee/98/38/46cbcc5a93cfea5492d19c38562691ddb23b940176c14f7b48 Building wheel for future (setup.py) ... done Stored in directory: /home/jauma/.cache/pip/wheels/0c/61/d2/d6b7317325828fbb39ee6ad559dbe4664d0896da4721bf379e Building wheel for pycparser (setup.py) ... done Stored in directory: /home/jauma/.cache/pip/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511 Successfully built rl-coach annoy PyOpenGL gym bokeh futures psutil networkx PyYAML tornado termcolor gast absl-py future pycparser

ERROR: rl-coach 0.12.0 requires intel-tensorflow>=1.9.0, which is not installed.

Installing collected packages: annoy, Pillow, pyparsing, six, python-dateutil, numpy, cycler, kiwisolver, matplotlib, pytz, pandas, pygame, PyOpenGL, scipy, PyWavelets, decorator, networkx, imageio, scikit-image, future, pyglet, gym, PyYAML, MarkupSafe, Jinja2, packaging, tornado, bokeh, futures, cachetools, pyasn1, pyasn1-modules, rsa, google-auth, urllib3, certifi, idna, chardet, requests, oauthlib, requests-oauthlib, PyJWT, asn1crypto, pycparser, cffi, cryptography, adal, websocket-client, kubernetes, redis, minio, atomicwrites, wcwidth, more-itertools, attrs, pluggy, pathlib2, py, pytest, psutil, termcolor, absl-py, mock, tensorflow-estimator, protobuf, grpcio, werkzeug, markdown, tensorboard, astor, gast, keras-preprocessing, h5py, keras-applications, intel-tensorflow, rl-coach Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 Pillow-6.0.0 PyJWT-1.7.1 PyOpenGL-3.1.0 PyWavelets-1.0.3 PyYAML-5.1 absl-py-0.7.1 adal-1.2.1 annoy-1.15.2 asn1crypto-0.24.0 astor-0.8.0 atomicwrites-1.3.0 attrs-19.1.0 bokeh-1.1.0 cachetools-3.1.1 certifi-2019.3.9 cffi-1.12.3 chardet-3.0.4 cryptography-2.6.1 cycler-0.10.0 decorator-4.4.0 future-0.17.1 futures-3.1.1 gast-0.2.2 google-auth-1.6.3 grpcio-1.21.1 gym-0.12.4 h5py-2.9.0 idna-2.8 imageio-2.5.0 intel-tensorflow-1.13.1 keras-applications-1.0.7 keras-preprocessing-1.0.9 kiwisolver-1.1.0 kubernetes-8.0.1 markdown-3.1.1 matplotlib-3.0.3 minio-4.0.17 mock-3.0.5 more-itertools-7.0.0 networkx-2.3 numpy-1.16.3 oauthlib-3.0.1 packaging-19.0 pandas-0.24.2 pathlib2-2.3.3 pluggy-0.11.0 protobuf-3.7.1 psutil-5.6.2 py-1.8.0 pyasn1-0.4.5 pyasn1-modules-0.2.5 pycparser-2.19 pygame-1.9.6 pyglet-1.3.2 pyparsing-2.4.0 pytest-4.5.0 python-dateutil-2.8.0 pytz-2019.1 redis-3.2.1 requests-2.22.0 requests-oauthlib-1.2.0 rl-coach-0.12.0 rsa-4.0 scikit-image-0.15.0 scipy-1.3.0 six-1.12.0 tensorboard-1.13.1 tensorflow-estimator-1.13.0 termcolor-1.1.0 tornado-6.0.2 urllib3-1.25.3 wcwidth-0.1.7 websocket-client-0.56.0 werkzeug-0.15.4 (coach_env) jauma@jauma-VirtualBox:~/src/coach$`

Now I cannot even run any preset:

`(coach_env) jauma@jauma-VirtualBox:~/src/coach$ coach -r -p CartPole_PG Please enter an experiment name: exp1

Creating graph - name: BasicRLGraphManager Traceback (most recent call last): File "/home/jauma/src/coach/coach_env/bin/coach", line 10, in sys.exit(main()) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/coach.py", line 727, in main launcher.launch() File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/coach.py", line 223, in launch self.run_graph_manager(graph_manager, args) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/coach.py", line 646, in run_graph_manager self.start_single_threaded(task_parameters, graph_manager, args) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/coach.py", line 653, in start_single_threaded start_graph(graph_manager=graph_manager, task_parameters=task_parameters) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/coach.py", line 78, in start_graph graph_manager.create_graph(task_parameters) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/graph_managers/graph_manager.py", line 149, in create_graph self.level_managers, self.environments = self._create_graph(task_parameters) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/graph_managers/basic_rl_graph_manager.py", line 63, in _create_graph visualization_parameters=self.visualization_parameters) File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/rl_coach/environments/gym_environment.py", line 410, in init self.timestep_limit = self.env.spec.timestep_limit AttributeError: 'EnvSpec' object has no attribute 'timestep_limit'


Results stored at: ./experiments/exp1/26_05_2019-18_54 Total runtime: 0:00:12.763852


Do you want to discard the experiment results (Warning: this cannot be undone)? (y/N)^[[y Exception ignored in: <bound method Viewer.del of <gym.envs.classic_control.rendering.Viewer object at 0x7fcaadab7ef0>> Traceback (most recent call last): File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/gym/envs/classic_control/rendering.py", line 152, in del File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/gym/envs/classic_control/rendering.py", line 71, in close File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/pyglet/window/xlib/init.py", line 480, in close File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/pyglet/gl/xlib.py", line 345, in destroy File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/pyglet/gl/base.py", line 334, in destroy File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/pyglet/gl/xlib.py", line 335, in detach File "/home/jauma/src/coach/coach_env/lib/python3.5/site-packages/pyglet/gl/lib.py", line 97, in errcheck File "", line 969, in _find_and_load File "", line 954, in _find_and_load_unlocked File "", line 887, in _find_spec TypeError: 'NoneType' object is not iterable (coach_env) jauma@jauma-VirtualBox:~/src/coach$ ` Any ideas? I have followed the instructions in the same environment as stated in the installation section.

galnov commented 5 years ago

The error you see when running the preset is due to changes in the last gym release. This commit fixed that error, so you may want to pull master's head and install from the cloned repository (pip3 install -e .) until we update the pip package. If you still see Tensorflow related failures - please update.

galnov commented 5 years ago

rl_coach 0.12.1 released - please install and let us know if you still see the failure.