google-deepmind / bsuite

bsuite is a collection of carefully-designed experiments that investigate core capabilities of a reinforcement learning (RL) agent
Apache License 2.0
1.51k stars 181 forks source link

dependency on trfl breaks TF2 #22

Closed filangelos closed 4 years ago

filangelos commented 4 years ago

The public trfl builts don't support tf2.* and hence pip install bsuite[baselines] fails.

(base) ➜  Developer conda create -y -n bsuite python=3.6.9
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 4.7.12
  latest version: 4.8.3

Please update conda by running

    $ conda update -n base -c defaults conda

## Package Plan ##

  environment location: /usr/local/Caskroom/miniconda/base/envs/bsuite

  added / updated specs:
    - python=3.6.9

The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/osx-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/osx-64::certifi-2020.4.5.1-py36_0
  libcxx             pkgs/main/osx-64::libcxx-4.0.1-hcfea43d_1
  libcxxabi          pkgs/main/osx-64::libcxxabi-4.0.1-hcfea43d_1
  libedit            pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
  libffi             pkgs/main/osx-64::libffi-3.2.1-h475c297_4
  ncurses            pkgs/main/osx-64::ncurses-6.2-h0a44026_0
  openssl            pkgs/main/osx-64::openssl-1.1.1f-h1de35cc_0
  pip                pkgs/main/osx-64::pip-20.0.2-py36_1
  python             pkgs/main/osx-64::python-3.6.9-h359304d_0
  readline           pkgs/main/osx-64::readline-7.0-h1de35cc_5
  setuptools         pkgs/main/osx-64::setuptools-46.1.3-py36_0
  sqlite             pkgs/main/osx-64::sqlite-3.31.1-ha441bb4_0
  tk                 pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
  wheel              pkgs/main/osx-64::wheel-0.34.2-py36_0
  xz                 pkgs/main/osx-64::xz-5.2.4-h1de35cc_4
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate bsuite
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) ➜  Developer conda activate bsuite
(bsuite) ➜  Developer pip install git+https://github.com/deepmind/bsuite.git#egg=bsuite[baselines]
Collecting bsuite[baselines]
  Cloning https://github.com/deepmind/bsuite.git to /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/bsuite
  Running command git clone -q https://github.com/deepmind/bsuite.git /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/bsuite
Processing /Users/omega/Library/Caches/pip/wheels/8e/28/49/fad4e7f0b9a1227708cbbee4487ac8558a7334849cb81c813d/absl_py-0.9.0-cp36-none-any.whl
Collecting dm_env
  Using cached dm_env-1.2-py3-none-any.whl (22 kB)
Collecting matplotlib
  Using cached matplotlib-3.2.1-cp36-cp36m-macosx_10_9_x86_64.whl (12.4 MB)
Collecting numpy
  Using cached numpy-1.18.2-cp36-cp36m-macosx_10_9_x86_64.whl (15.2 MB)
Collecting pandas
  Using cached pandas-1.0.3-cp36-cp36m-macosx_10_9_x86_64.whl (10.2 MB)
Collecting plotnine
  Using cached plotnine-0.6.0-py3-none-any.whl (4.1 MB)
Collecting scipy
  Using cached scipy-1.4.1-cp36-cp36m-macosx_10_6_intel.whl (28.5 MB)
Collecting scikit-image
  Using cached scikit_image-0.16.2-cp36-cp36m-macosx_10_6_intel.whl (30.4 MB)
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Processing /Users/omega/Library/Caches/pip/wheels/7c/06/54/bc84598ba1daf8f970247f550b175aaaee85f68b4b0c5ab2c6/termcolor-1.1.0-cp36-none-any.whl
Collecting dm-sonnet
  Using cached dm_sonnet-2.0.0-py3-none-any.whl (254 kB)
Collecting dm-tree
  Using cached dm_tree-0.1.4-cp36-cp36m-macosx_10_9_x86_64.whl (93 kB)
Collecting tensorflow
  Using cached tensorflow-2.1.0-cp36-cp36m-macosx_10_11_x86_64.whl (120.8 MB)
Collecting tensorflow_probability
  Using cached tensorflow_probability-0.9.0-py2.py3-none-any.whl (3.2 MB)
Collecting trfl@ git+git://github.com/deepmind/trfl.git#egg=trfl
  Cloning git://github.com/deepmind/trfl.git to /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl
  Running command git clone -q git://github.com/deepmind/trfl.git /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl
Collecting tqdm
  Using cached tqdm-4.45.0-py2.py3-none-any.whl (60 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (60 kB)
Collecting python-dateutil>=2.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Collecting cycler>=0.10
  Using cached cycler-0.10.0-py2.py3-none-any.whl (6.5 kB)
Collecting pytz>=2017.2
  Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Collecting descartes>=1.1.0
  Using cached descartes-1.1.0-py3-none-any.whl (5.8 kB)
Collecting statsmodels>=0.9.0
  Using cached statsmodels-0.11.1-cp36-cp36m-macosx_10_13_x86_64.whl (8.4 MB)
Collecting patsy>=0.4.1
  Using cached patsy-0.5.1-py2.py3-none-any.whl (231 kB)
Collecting mizani>=0.6.0
  Using cached mizani-0.6.0-py2.py3-none-any.whl (61 kB)
Collecting PyWavelets>=0.4.0
  Using cached PyWavelets-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl (4.3 MB)
Collecting imageio>=2.3.0
  Using cached imageio-2.8.0-py3-none-any.whl (3.3 MB)
Collecting networkx>=2.0
  Using cached networkx-2.4-py3-none-any.whl (1.6 MB)
Collecting pillow>=4.3.0
  Using cached Pillow-7.1.1-cp36-cp36m-macosx_10_10_x86_64.whl (2.2 MB)
Processing /Users/omega/Library/Caches/pip/wheels/32/42/7f/23cae9ff6ef66798d00dc5d659088e57dbba01566f6c60db63/wrapt-1.12.1-cp36-cp36m-macosx_10_7_x86_64.whl
Collecting tabulate>=0.7.5
  Using cached tabulate-0.8.7-py3-none-any.whl (24 kB)
Collecting keras-applications>=1.0.8
  Using cached Keras_Applications-1.0.8-py3-none-any.whl (50 kB)
Processing /Users/omega/Library/Caches/pip/wheels/5c/2e/7e/a1d4d4fcebe6c381f378ce7743a3ced3699feb89bcfbdadadd/gast-0.2.2-cp36-none-any.whl
Collecting grpcio>=1.8.6
  Using cached grpcio-1.28.1-cp36-cp36m-macosx_10_9_x86_64.whl (2.6 MB)
Collecting protobuf>=3.8.0
  Using cached protobuf-3.11.3-cp36-cp36m-macosx_10_9_x86_64.whl (1.3 MB)
Requirement already satisfied: wheel>=0.26; python_version >= "3" in /usr/local/Caskroom/miniconda/base/envs/bsuite/lib/python3.6/site-packages (from tensorflow->bsuite[baselines]) (0.34.2)
Collecting tensorboard<2.2.0,>=2.1.0
  Using cached tensorboard-2.1.1-py3-none-any.whl (3.8 MB)
Collecting keras-preprocessing>=1.1.0
  Using cached Keras_Preprocessing-1.1.0-py2.py3-none-any.whl (41 kB)
Collecting opt-einsum>=2.3.2
  Using cached opt_einsum-3.2.0-py3-none-any.whl (63 kB)
Collecting tensorflow-estimator<2.2.0,>=2.1.0rc0
  Using cached tensorflow_estimator-2.1.0-py2.py3-none-any.whl (448 kB)
Collecting astor>=0.6.0
  Using cached astor-0.8.1-py2.py3-none-any.whl (27 kB)
Collecting google-pasta>=0.1.6
  Using cached google_pasta-0.2.0-py3-none-any.whl (57 kB)
Collecting cloudpickle>=1.2.2
  Using cached cloudpickle-1.3.0-py2.py3-none-any.whl (26 kB)
Collecting decorator
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Collecting palettable
  Using cached palettable-3.3.0-py2.py3-none-any.whl (111 kB)
Collecting h5py
  Using cached h5py-2.10.0-cp36-cp36m-macosx_10_6_intel.whl (3.0 MB)
Requirement already satisfied: setuptools in /usr/local/Caskroom/miniconda/base/envs/bsuite/lib/python3.6/site-packages (from protobuf>=3.8.0->tensorflow->bsuite[baselines]) (46.1.3.post20200330)
Collecting google-auth-oauthlib<0.5,>=0.4.1
  Using cached google_auth_oauthlib-0.4.1-py2.py3-none-any.whl (18 kB)
Collecting google-auth<2,>=1.6.3
  Downloading google_auth-1.14.0-py2.py3-none-any.whl (88 kB)
     |████████████████████████████████| 88 kB 707 kB/s
Collecting werkzeug>=0.11.15
  Using cached Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting markdown>=2.6.8
  Using cached Markdown-3.2.1-py2.py3-none-any.whl (88 kB)
Collecting requests<3,>=2.21.0
  Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting requests-oauthlib>=0.7.0
  Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
Collecting rsa<4.1,>=3.1.4
  Using cached rsa-4.0-py2.py3-none-any.whl (38 kB)
Collecting pyasn1-modules>=0.2.1
  Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Collecting cachetools<5.0,>=2.0.0
  Using cached cachetools-4.1.0-py3-none-any.whl (10 kB)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/Caskroom/miniconda/base/envs/bsuite/lib/python3.6/site-packages (from requests<3,>=2.21.0->tensorboard<2.2.0,>=2.1.0->tensorflow->bsuite[baselines]) (2020.4.5.1)
Collecting idna<3,>=2.5
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached urllib3-1.25.8-py2.py3-none-any.whl (125 kB)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting oauthlib>=3.0.0
  Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB)
Collecting pyasn1>=0.1.3
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Building wheels for collected packages: bsuite, trfl
  Building wheel for bsuite (setup.py) ... done
  Created wheel for bsuite: filename=bsuite-0.0.0-py3-none-any.whl size=177123 sha256=1d0d8738f92032e854e3ec9211a76fbc031b484dbd62dc75b27acfaf729bab93
  Stored in directory: /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-ephem-wheel-cache-mkj55_9i/wheels/7b/5e/ac/15fb44dea4f625a5cf4801445436f8a50d023233f734fc7d41
  Building wheel for trfl (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/Caskroom/miniconda/base/envs/bsuite/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/setup.py'"'"'; __file__='"'"'/private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-wheel-7q14rby_
       cwd: /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/
  Complete output (5 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  error: could not create 'build': File exists
  ----------------------------------------
  ERROR: Failed building wheel for trfl
  Running setup.py clean for trfl
Successfully built bsuite
Failed to build trfl
Installing collected packages: six, absl-py, dm-tree, numpy, dm-env, kiwisolver, python-dateutil, pyparsing, cycler, matplotlib, pytz, pandas, scipy, descartes, patsy, statsmodels, palettable, mizani, plotnine, PyWavelets, pillow, imageio, decorator, networkx, scikit-image, termcolor, wrapt, tabulate, dm-sonnet, h5py, keras-applications, gast, grpcio, protobuf, pyasn1, rsa, pyasn1-modules, cachetools, google-auth, idna, urllib3, chardet, requests, oauthlib, requests-oauthlib, google-auth-oauthlib, werkzeug, markdown, tensorboard, keras-preprocessing, opt-einsum, tensorflow-estimator, astor, google-pasta, tensorflow, cloudpickle, tensorflow-probability, trfl, tqdm, bsuite
    Running setup.py install for trfl ... error
    ERROR: Command errored out with exit status 1:
     command: /usr/local/Caskroom/miniconda/base/envs/bsuite/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/setup.py'"'"'; __file__='"'"'/private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-record-_kglrl6r/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Caskroom/miniconda/base/envs/bsuite/include/python3.6m/trfl
         cwd: /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/
    Complete output (5 lines):
    running install
    running build
    running build_py
    creating build
    error: could not create 'build': File exists
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/Caskroom/miniconda/base/envs/bsuite/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/setup.py'"'"'; __file__='"'"'/private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-install-picf14vk/trfl/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/24/1z9y7lhs7371zshgyqfgrzb40000gn/T/pip-record-_kglrl6r/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/Caskroom/miniconda/base/envs/bsuite/include/python3.6m/trfl Check the logs for full command output.
(bsuite) ➜  Developer python -c "import trfl"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'trfl'
aslanides commented 4 years ago

Thanks for the bug report -- we're aware of this issue and will update trfl soon.

aslanides commented 4 years ago

This should be fixed by d2e5ad647aeb76b663a765d525d33179ea387421