PyTorch version of Stable Baselines, reliable implementations of reinforcement learning algorithms.
Find a file
Dormann, Noah 1f0dd60b97 Fix saving on GPU - Loading on CPU (#45)
* removed policy from save, changed th.loads to map to device

* found hack: catch pickle exception and trying th.load with mapping instead, otherwise raise exception with more information -> loading cuda on cpu raises exception -> leads to th.load with map being called

* deleted todo

* updated changelog

* start of saving refactor

* first working c

* all tests pass, save refactored

* - backwards compatibilty not always
- make pytest all passing
- make typing all passing

* Fixes and simplify the save method

* Remove unused param

* Fix backward compat

* Fix docstring
2020-01-31 13:06:55 +01:00
docs Fix saving on GPU - Loading on CPU (#45) 2020-01-31 13:06:55 +01:00
scripts Bug fixes + add evaluate script 2019-09-06 10:44:55 +02:00
tests Fix saving on GPU - Loading on CPU (#45) 2020-01-31 13:06:55 +01:00
torchy_baselines Fix saving on GPU - Loading on CPU (#45) 2020-01-31 13:06:55 +01:00
.coveragerc Bug fixes + add evaluate script 2019-09-06 10:44:55 +02:00
.gitignore Revert all changes for python 2 2020-01-22 16:18:27 +01:00
LICENSE Init: TD3 2019-09-05 17:29:41 +02:00
Makefile Fix typing errors and typos 2020-01-22 17:17:12 +01:00
README.md Update changelog and README 2020-01-22 17:23:42 +01:00
setup.cfg Revert all changes for python 2 2020-01-22 16:18:27 +01:00
setup.py Partially type base class 2020-01-22 17:51:27 +01:00

Build Status Documentation Status

Torchy Baselines

PyTorch version of Stable Baselines, a set of improved implementations of reinforcement learning algorithms.

NOTE: Python 3.6 is required!

Implemented Algorithms

  • A2C

  • CEM-RL (with TD3)

  • PPO

  • SAC

  • TD3

  • SDE support for A2C, PPO, SAC and TD3.

Roadmap

  • cf github Roadmap

Run the Tests

pip install -e .[tests]
make pytest

Type check

pip install -e .[tests]
make type

Build the Documentation

pip install -e .[docs]
make docs

Spell check for the documentation:

make spelling

Citing the Project

To cite this repository in publications:

@misc{torchy-baselines,
  author = {Raffin, Antonin and Dormann, Noah and Hill, Ashley and Ernestus, Maximilian and Gleave, Adam and Kanervisto, Anssi},
  title = {Torchy Baselines},
  year = {2019},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/araffin/torchy-baselines}},
}