google-deepmind / dqn_zoo

DQN Zoo is a collection of reference implementations of reinforcement learning agents developed at DeepMind based on the Deep Q-Network (DQN) agent.
Apache License 2.0
457 stars 78 forks source link

Instructions for Reproducing Results in results.tar.gz? #2

Closed RylanSchaeffer closed 4 years ago

RylanSchaeffer commented 4 years ago

The README helpfully contains instructions to launch a single agent (DQN) on a single Atari game (Pong). If I wanted to reproduce the results in results.tar.gz with all agents across all environments, what would I do? Could these instructions be added to the README?

RylanSchaeffer commented 4 years ago

@GeorgOstrovski can I ask you to take a look at this issue as well?

jqdm commented 4 years ago

I've updated the README.md to clarify that the default settings were used to generate the CSV data, and included some illustrative psuedocode. More specific instructions would of course depend on the user's own set up and what access they have to GPUs, so such instructions have been omitted.

RylanSchaeffer commented 4 years ago

Wonderful. Thank you!

RylanSchaeffer commented 4 years ago

@jqdm in your pseudocode, how do I run on CPU instead of GPU?


      python -m "dqn_zoo.${agent}.run_atari" \
          --environment_name="${game}" \
          --seed="${seed}" \
          --results="/tmp/dqn_zoo/${agent}/${game}/${seed}/results.csv"
RylanSchaeffer commented 4 years ago

When I try adding the flag --jax_platform_name=cpu I run into the error libcusolver.so.10: cannot open shared object file: No such file or directory which arises from from . import xla_extension as _xla inside jaxlib. This looks like a GPU problem.

RylanSchaeffer commented 4 years ago

Error and full stack trace:

~/Documents/dqn_zoo$ python -m dqn_zoo.c51.run_atari --environment_name=pong --seed=1 --results="/tmp/dqn_zoo/c51/pong/1/results.csv" --jax_platform_name=cpu
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo/c51/run_atari.py", line 32, in <module>
    import haiku as hk
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/haiku/__init__.py", line 18, in <module>
    from haiku import data_structures
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/haiku/data_structures.py", line 18, in <module>
    from haiku._src.data_structures import to_immutable_dict
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/haiku/_src/data_structures.py", line 24, in <module>
    from haiku._src import utils
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/haiku/_src/utils.py", line 24, in <module>
    import jax
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/jax/__init__.py", line 17, in <module>
    from .api import (
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/jax/api.py", line 38, in <module>
    from . import core
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/jax/core.py", line 31, in <module>
    from . import dtypes
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/jax/dtypes.py", line 31, in <module>
    from .lib import xla_client
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/jax/lib/__init__.py", line 52, in <module>
    from jaxlib import xla_client
  File "/home/rylan/Documents/dqn_zoo/dqn_zoo_venv/lib/python3.6/site-packages/jaxlib/xla_client.py", line 39, in <module>
    from . import xla_extension as _xla
ImportError: libcusolver.so.10: cannot open shared object file: No such file or directory