Skip to main content

A tool for easy data exploration in reinforcement learning environments.

Project description

#Replay Monitor

This is a tool for recording and observing data and measurements generated through the interactions between a reinforcement learning algorithm and an environment with an OpenAI Gym interface.

Currently, this tool offers two main features:

  • A convenient environment wrapper that allows the user to:

    • Record Tensorboard metrics during the training of the RL agent
    • Log the entire interaction with the environment in a local DB (for later use with the interactive tool below).
  • An interactive tool that visualize stored interactions (episodes and transitions) on-demand.

This tool supports complex state spaces, including tuple spaces.

Note: This is a premature release, keep in mind that since this package is still in development, bugs and changes are expected.

Installation

Install the package by

pip install replay-monitor

Usage Examples

Record Agent Interactions

To use the environment wrapper for storing interactions:

from replay_monitor import Monitor
import gym

env = gym.make('Breakout-v0')
env = Monitor(env, log_to_db=True)

Now, you can use the environment as usual, for example:

env.reset()
for i in range(300):
    action = env.action_space.sample()
    state, reward, done, info = env.step(action)

    if done:
        env.reset()
...

Use The Interactive Tool

Run the interactive tool by executing the following command in the command-line (make sure your environment is activated if you use virtualenv):

replay-monitor --db_path <db_path>

where <db_path> is the path to the .h5 file generated by the environment wrapper Monitor (you can omit --db_path if you use the default value).

Record Tensorboard Metrics

TODO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

replay-monitor-0.0.3.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

replay_monitor-0.0.3-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file replay-monitor-0.0.3.tar.gz.

File metadata

  • Download URL: replay-monitor-0.0.3.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for replay-monitor-0.0.3.tar.gz
Algorithm Hash digest
SHA256 5b79425fa9968ad7e2b1f38ff7f8167ab6101c86f8f3025b7645a94bf5e0f356
MD5 ed053ce4869b218e3c6f02e9c67b204c
BLAKE2b-256 81000836ca1dc525f13540c275776adf0a021898a8d5fc13ffcb794cdfcdd302

See more details on using hashes here.

File details

Details for the file replay_monitor-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: replay_monitor-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for replay_monitor-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e796fa977b4cc39d75ebc26c25dec4a7031863d9594edaa88326d120f134d0d9
MD5 ad7ee6a63f3ae7d36337a0dbca077b3c
BLAKE2b-256 ba2b41e33bfb9215aa2bd179ba013b67343a8213327af6a7668b12a211e39a8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page