Metadata-Version: 2.4
Name: rlrom
Version: 0.2.0
Summary: RLROM is a library for testing and training reinforcement learning agent using online monitoring of signal temporal logics formulas, and more.
Author-email: Alexandre Donze <alexandre.donze@univ-grenoble-alpes.fr>
License: BSD-3-Clauses
License-File: LICENSE
Requires-Python: >=3.10
Requires-Dist: bokeh<4.0.0,>=3.6.0
Requires-Dist: gymnasium[classic-control]<2.0.0,>=1.2.0
Requires-Dist: huggingface-hub<0.35.0,>=0.34.4
Requires-Dist: huggingface-sb3<4.0,>=3.0
Requires-Dist: kaleido>=1.1.0
Requires-Dist: minigrid<4.0.0,>=3.0.0
Requires-Dist: plotly>=6.3.1
Requires-Dist: polars>=1.34.0
Requires-Dist: rich<15.0.0,>=14.1.0
Requires-Dist: ruamel-yaml>=0.18.15
Requires-Dist: sb3-contrib<3.0.0,>=2.7.0
Requires-Dist: shimmy<3.0.0,>=2.0.0
Requires-Dist: stable-baselines3<3.0.0,>=2.7.0
Requires-Dist: stlrom<0.3.0,>=0.2.3
Requires-Dist: tensorboard<3.0.0,>=2.20.0
Requires-Dist: tensorboard>=2.20.0
Requires-Dist: tensorflow>=2.20.0
Requires-Dist: tqdm<5.0.0,>=4.67.1
Provides-Extra: highway-env
Requires-Dist: highway-env<2.0.0,>=1.10.1; extra == 'highway-env'
Provides-Extra: old-gym
Requires-Dist: gym<0.27.0,>=0.26.2; extra == 'old-gym'
Description-Content-Type: text/markdown

# RLRom

This module integrates Robust Online Monitoring methods with Reinforcement Learning stuff. The motivation is first to test RL agents using interpretable monitors, then use these monitors to train models to perform complex tasks, and/or converge toward behaviors that reliably satisfy certain requirements. 

## Install

Make sure build tools are installed, e.g., with `apt`:
```
$ sudo apt install build-essential
```
Then install with pip: 
```
pip install rlrom 
``` 
## Getting Started

### Command Line Interface
RLRom reads configuration files in the YAML format as inputs. Examples are provided in the examples folder. A command line interface is provided through command `rlr` which can be called with various arguments. For instance, the `rlr test` command reads a configuration file and runs tests:
```bash
$ rlr test examples/cartpole/cfg0_hug.cfg
```
will run a few episode of the cartpole classic environment, fetching a model on huggingface and monitor a formula on these episodes. 

For training with or without STL specifications, use the `rlr train` command, e.g.:

```bash
$ rlr train examples/cartpole/cfg0tr_ppo_specs.cfg
```
More details are provided in the notebooks (see below.)

### Notebook Examples

More programmatic features are demonstrated in notebooks, in particular

- [The Cart Pole notebook](examples/cartpole/cartpole_notebook.ipynb) presents a case study around the classic Cart Pole Gymnasium environment.

- [The Highway-env notebook](examples/highway-env/highway_env_notebook.ipynb) presents a slightly more involved autonomous driving example based on the [highway-env](https://github.com/Farama-Foundation/HighwayEnv) environment.