From 98f107eaa0c1c8a6aa7831d17029334a649734a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sun, 17 Oct 2021 19:21:13 +1300 Subject: [PATCH] Auto download atari ROMs --- 17_reinforcement_learning.ipynb | 6 +++--- environment.yml | 2 ++ requirements.txt | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/17_reinforcement_learning.ipynb b/17_reinforcement_learning.ipynb index 369b2a7..668736a 100644 --- a/17_reinforcement_learning.ipynb +++ b/17_reinforcement_learning.ipynb @@ -58,8 +58,8 @@ "\n", "if IS_COLAB or IS_KAGGLE:\n", " !apt update && apt install -y libpq-dev libsdl2-dev swig xorg-dev xvfb\n", - " %pip install -q -U tf-agents pyvirtualdisplay gym[box2d]\n", - " %pip install -q -U atari_py==0.2.5\n", + " %pip install -q -U tf-agents pyvirtualdisplay gym[box2d,atari,accept-rom-license]\n", + " !AutoROM --quiet --accept-license\n", "\n", "# Common imports\n", "import numpy as np\n", @@ -3228,5 +3228,5 @@ } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/environment.yml b/environment.yml index 83bb162..11197f7 100644 --- a/environment.yml +++ b/environment.yml @@ -46,6 +46,8 @@ dependencies: - tfx~=1.3.0 # platform to deploy production ML pipelines - transformers~=4.11.3 # Natural Language Processing lib for TF or PyTorch - urlextract~=1.4.0 # optionally used in chapter 3, exercise 4 + - ale-py~=0.7.2 # used only in chapter 17 + - AutoROM~=0.4.2 # used only in chapter 17 # Specific lib versions to avoid conflicts - attrs=20.3 diff --git a/requirements.txt b/requirements.txt index c0a494f..6e47ff1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -49,13 +49,13 @@ tensorflow-addons~=0.14.0 # There are a few dependencies you need to install first, check out: # https://github.com/openai/gym#installing-everything -gym[Box2D]~=0.21.0 -atari-py~=0.2.9 +gym[Box2D,atari,accept-rom-license]~=0.21.0 # On Windows, install atari_py using: # pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py tf-agents~=0.10.0 +ale-py~=0.7.2 ##### Image manipulation Pillow~=8.4.0