Skip to main content

rld logo

Build and test

A development tool for evaluation and interpretability of reinforcement learning agents.

rld demo gif

Installation

pip install rld

Usage

Firstly, calculate attributations for your rollout using:

rld attribute [--rllib] [--out <ROLLOUT>] config.py <INPUT_ROLLOUT>

This will take INPUT_ROLLOUT (possibly in the Ray RLlib format, if --rllib is set) and calculate attributations for each timestep in each trajectory, using the configuration stored in config.py. The output file will be stored as ROLLOUT. See the Config class for possible configuration.

Once the attributations are calculated, you can visualize them using:

rld start --viewer <VIEWER_ID> <ROLLOUT>

See the examples for reference.

Description

rld provides a set of tools to evaluate and understand behaviors of reinforcement learning agents. Under the hood, rld uses Captum to calculate attributations of observation components. rld is also integrated with Ray RLlib library and allows to load agents trained in RLlib.

Current limitations

rld is currently in its early development stage, thus the functionality is very limited.

RL algorithms

rld is algorithm-agnostic, but currently it is more suitable for policy-based methods. This is due to the fact that the Model is now expected to output logits for a given observation. This, however, will change in the future, and rld will support more algorithms.

Viewers

This is the list of viewers, which ship with rld:

  • none
  • cartpole
  • atari

You can easily create your own viewer, for your own environment, but to make it visible for rld, you have to rebuild the project. This will be improved in the future.

Observation and action spaces

The table below presents currently supported observation and action spaces.

Action space
Discrete MultiDiscrete
Obs space Box :heavy_check_mark: :heavy_check_mark:
Dict :heavy_check_mark: :heavy_check_mark:

Roadmap

See the issues page to see the list of features planned for the future releases. If you have your own ideas, you are encouraged to post them there.

Metadata

Release files for rld 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rld 0.1.1
File Size Uploaded
rld-0.1.1.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for rld 0.1.1
File Interpreter ABI Platform
rld-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 3.2 MB

Release files / rld-0.1.1.tar.gz

Download URL rld-0.1.1.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
9e43143bbdb77adcddfb9cd32b3f6d7ae74bc53861f248cd8a08d2060725292c
BLAKE2b-256 checksum
How to use checksums
7aeea0c85d86b0b544acce86d47f4c22bce0e6c46b4eee1278f013d1741b08cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7

Release files / rld-0.1.1-py3-none-any.whl

Download URL rld-0.1.1-py3-none-any.whl
Size 1.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
276fee662325249697c134559556f17315753bd1d6329cd38afd1dcfa1d46ed8
BLAKE2b-256 checksum
How to use checksums
56012a4c3225392cffbf5da4d4341edfc7364dd9811af1efc89f665722cd366d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page