litrl


Namelitrl JSON
Version 0.0.24 PyPI version JSON
download
home_page
SummaryImplementation of RL algorithms in PyTorch Lightning
upload_time2024-02-01 08:09:58
maintainer
docs_urlNone
authorClement Gohlke
requires_python>=3.8
license
keywords pytorch reinforcement-learning machine-learning mypy pytorch-lightning huggingface torchrl
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # LitRL

<table>
    <tr>
        <td>Compatibility</td>
        <td>
            <a href="https://pypi.python.org/pypi/litrl" target="_blank">
                <img src="https://img.shields.io/pypi/pyversions/litrl?color=%2334D058" alt="Python">
            </a>
            <a href="https://pypi.python.org/pypi/litrl" target="_blank">
                <img src="https://img.shields.io/pypi/v/litrl.svg?color=%2334D058" alt="Pypi">
            </a>
            <a href="https://pypi.python.org/pypi/litrl" target="_blank">
                <img src="https://img.shields.io/badge/os-linux%20%7C%20macOS%20%7C%20windows-2334D058" alt="Pypi">
            </a>
        </td>
    </tr>
    <tr>
        <td>CI</td>
        <td>
            <a href="https://github.com/c-gohlke/LitRL/actions/workflows/pytest.yaml" target="_blank">
                <img
                src="https://github.com/c-gohlke/LitRL/actions/workflows/pytest.yaml/badge.svg"
                alt="pytest">
            </a>
            <a href="https://github.com/c-gohlke/LitRL/actions/workflows/lint.yaml" target="_blank">
                <img
                src="https://github.com/c-gohlke/LitRL/actions/workflows/lint.yaml/badge.svg"
                alt="Lint">
            </a>
            <a href="https://codecov.io/gh/c-gohlke/LitRL" >
                <img
                src="https://codecov.io/gh/c-gohlke/LitRL/graph/badge.svg?token=NDPHZERUJJ"
                alt=coverage/>
            </a>
        </td>
    </tr>
    <tr>
        <td>Powered by</td>
        <td>
            <a href="https://github.com/Lightning-AI/lightning" target="_blank">
                <img
                src="https://img.shields.io/badge/-Lightning-792ee5?logo=pytorchlightning&logoColor=white"
                alt="PyTorch Lightning">
            </a>
            <a href="https://github.com/pytorch/rl" target="_blank">
                <img src="https://img.shields.io/badge/TorchRL-green" alt="TorchRL">
            </a>
            <a href="https://github.com/mlflow/mlflow" target="_blank">
                <img
                src="https://img.shields.io/badge/mlflow-%23d9ead3.svg?logo=mlflow&logoColor=blue"
                alt="MLFlow">
            </a>
            <a href="https://github.com/facebookresearch/hydra" target="_blank">
                <img src="https://img.shields.io/badge/Hydra-green" alt="Hydra">
            </a>
    </tr>
    </tr>
    <tr>
        <td>Contributing</td>
        <td>
            <a href="https://litrl.readthedocs.io/en/latest/" target="_blank">
                <img
                src="https://img.shields.io/readthedocs/litrl?color=%2334D058"
                alt="Docs">
            </a>
            <a href="https://pypi.python.org/pypi/litrl" target="_blank">
                <img
                src="https://img.shields.io/pypi/l/litrl.svg?color=%2334D058"
                alt="License">
            </a>
            <a href="http://mypy-lang.org" target="_blank">
                <img
                src="http://www.mypy-lang.org/static/mypy_badge.svg"
                alt="mypy">
            </a>
            <a href="https://github.com/psf/black" target="_blank">
                <img
                src="https://img.shields.io/badge/code%20style-black-000000.svg"
                alt="black">
            </a>
            <a href="https://github.com/astral-sh/ruff" target="_blank">
                <img
                src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json"
                alt="ruff">
            </a>
        </td>
        </td>
    </tr>
    <tr>
        <td>Try it out</td>
        <td>
            <a href="https://huggingface.co/c-gohlke/LitRL" target="_blank">
                <img
                src="https://img.shields.io/badge/%F0%9F%A4%97%20Models-Huggingface-F8D521"
                alt="Models">
            </a>
            <a href="https://c-gohlke-litrl-demo.hf.space/folder/ConnectFour" target="_blank">
                <img
                src="https://img.shields.io/badge/%F0%9F%A4%97%20Demo-Huggingface-F8D521"
                alt="Demo">
            </a>
            <a
            href="https://githubtocolab.com/c-gohlke/LitRL/blob/main/notebooks/colab/train_lunar_sac.ipynb"
            target="_blank">
                <img
                src="https://colab.research.google.com/assets/colab-badge.svg"
                alt="Colab">
            </a>
        </td>
    </tr>
</table>

LitRL is optimized for code readability and expandability. It also provides a structure

 for Reinforcement Learning research.

## Get Started

```bash
pip install LitRL[torchrl]
```

TorchRL may not be found in PyPI depending on your Python version/OS. If that occurs,
 you can download the package using:

```bash
bash scripts/install_torchrl
pip install LitRL
```

## Run demo locally

```bash
python demo/backend/run.py
```

In a separate terminal

```bash
npm install --prefix demo/frontend
npm run dev --prefix demo/frontend
```

## Getting Started Windows

[C++ build tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)

## Acknowledgments

The code structure was influenced by implementations in:

- [CleanRL](https://github.com/vwxyzjn/cleanrl/tree/master)
- [Lizhi-sjtu](https://github.com/Lizhi-sjtu/DRL-code-pytorch)
- [lightning_bolts](https://github.com/Lightning-Universe/lightning-bolts/tree/master/src/pl_bolts/models/rl)

Specific algorithms were also influenced by:

- SAC: [Haarnooja SAC](https://github.com/haarnoja/sac)
- Online Decision Transformer: [ODT](https://github.com/facebookresearch/online-dt)
- AlphaGo/Zero/MuZero: [Muzero](https://github.com/werner-duvaud/muzero-general)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "litrl",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "pytorch,reinforcement-learning,machine-learning,mypy,pytorch-lightning,huggingface,torchrl",
    "author": "Clement Gohlke",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/58/f2/927a3c77ff6936e7202da84024669444063aa6a812d776c83734692fbfc9/litrl-0.0.24.tar.gz",
    "platform": null,
    "description": "# LitRL\n\n<table>\n    <tr>\n        <td>Compatibility</td>\n        <td>\n            <a href=\"https://pypi.python.org/pypi/litrl\" target=\"_blank\">\n                <img src=\"https://img.shields.io/pypi/pyversions/litrl?color=%2334D058\" alt=\"Python\">\n            </a>\n            <a href=\"https://pypi.python.org/pypi/litrl\" target=\"_blank\">\n                <img src=\"https://img.shields.io/pypi/v/litrl.svg?color=%2334D058\" alt=\"Pypi\">\n            </a>\n            <a href=\"https://pypi.python.org/pypi/litrl\" target=\"_blank\">\n                <img src=\"https://img.shields.io/badge/os-linux%20%7C%20macOS%20%7C%20windows-2334D058\" alt=\"Pypi\">\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <td>CI</td>\n        <td>\n            <a href=\"https://github.com/c-gohlke/LitRL/actions/workflows/pytest.yaml\" target=\"_blank\">\n                <img\n                src=\"https://github.com/c-gohlke/LitRL/actions/workflows/pytest.yaml/badge.svg\"\n                alt=\"pytest\">\n            </a>\n            <a href=\"https://github.com/c-gohlke/LitRL/actions/workflows/lint.yaml\" target=\"_blank\">\n                <img\n                src=\"https://github.com/c-gohlke/LitRL/actions/workflows/lint.yaml/badge.svg\"\n                alt=\"Lint\">\n            </a>\n            <a href=\"https://codecov.io/gh/c-gohlke/LitRL\" >\n                <img\n                src=\"https://codecov.io/gh/c-gohlke/LitRL/graph/badge.svg?token=NDPHZERUJJ\"\n                alt=coverage/>\n            </a>\n        </td>\n    </tr>\n    <tr>\n        <td>Powered by</td>\n        <td>\n            <a href=\"https://github.com/Lightning-AI/lightning\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/badge/-Lightning-792ee5?logo=pytorchlightning&logoColor=white\"\n                alt=\"PyTorch Lightning\">\n            </a>\n            <a href=\"https://github.com/pytorch/rl\" target=\"_blank\">\n                <img src=\"https://img.shields.io/badge/TorchRL-green\" alt=\"TorchRL\">\n            </a>\n            <a href=\"https://github.com/mlflow/mlflow\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/badge/mlflow-%23d9ead3.svg?logo=mlflow&logoColor=blue\"\n                alt=\"MLFlow\">\n            </a>\n            <a href=\"https://github.com/facebookresearch/hydra\" target=\"_blank\">\n                <img src=\"https://img.shields.io/badge/Hydra-green\" alt=\"Hydra\">\n            </a>\n    </tr>\n    </tr>\n    <tr>\n        <td>Contributing</td>\n        <td>\n            <a href=\"https://litrl.readthedocs.io/en/latest/\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/readthedocs/litrl?color=%2334D058\"\n                alt=\"Docs\">\n            </a>\n            <a href=\"https://pypi.python.org/pypi/litrl\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/pypi/l/litrl.svg?color=%2334D058\"\n                alt=\"License\">\n            </a>\n            <a href=\"http://mypy-lang.org\" target=\"_blank\">\n                <img\n                src=\"http://www.mypy-lang.org/static/mypy_badge.svg\"\n                alt=\"mypy\">\n            </a>\n            <a href=\"https://github.com/psf/black\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/badge/code%20style-black-000000.svg\"\n                alt=\"black\">\n            </a>\n            <a href=\"https://github.com/astral-sh/ruff\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\"\n                alt=\"ruff\">\n            </a>\n        </td>\n        </td>\n    </tr>\n    <tr>\n        <td>Try it out</td>\n        <td>\n            <a href=\"https://huggingface.co/c-gohlke/LitRL\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Models-Huggingface-F8D521\"\n                alt=\"Models\">\n            </a>\n            <a href=\"https://c-gohlke-litrl-demo.hf.space/folder/ConnectFour\" target=\"_blank\">\n                <img\n                src=\"https://img.shields.io/badge/%F0%9F%A4%97%20Demo-Huggingface-F8D521\"\n                alt=\"Demo\">\n            </a>\n            <a\n            href=\"https://githubtocolab.com/c-gohlke/LitRL/blob/main/notebooks/colab/train_lunar_sac.ipynb\"\n            target=\"_blank\">\n                <img\n                src=\"https://colab.research.google.com/assets/colab-badge.svg\"\n                alt=\"Colab\">\n            </a>\n        </td>\n    </tr>\n</table>\n\nLitRL is optimized for code readability and expandability. It also provides a structure\n\n for Reinforcement Learning research.\n\n## Get Started\n\n```bash\npip install LitRL[torchrl]\n```\n\nTorchRL may not be found in PyPI depending on your Python version/OS. If that occurs,\n you can download the package using:\n\n```bash\nbash scripts/install_torchrl\npip install LitRL\n```\n\n## Run demo locally\n\n```bash\npython demo/backend/run.py\n```\n\nIn a separate terminal\n\n```bash\nnpm install --prefix demo/frontend\nnpm run dev --prefix demo/frontend\n```\n\n## Getting Started Windows\n\n[C++ build tools](https://visualstudio.microsoft.com/visual-cpp-build-tools/)\n\n## Acknowledgments\n\nThe code structure was influenced by implementations in:\n\n- [CleanRL](https://github.com/vwxyzjn/cleanrl/tree/master)\n- [Lizhi-sjtu](https://github.com/Lizhi-sjtu/DRL-code-pytorch)\n- [lightning_bolts](https://github.com/Lightning-Universe/lightning-bolts/tree/master/src/pl_bolts/models/rl)\n\nSpecific algorithms were also influenced by:\n\n- SAC: [Haarnooja SAC](https://github.com/haarnoja/sac)\n- Online Decision Transformer: [ODT](https://github.com/facebookresearch/online-dt)\n- AlphaGo/Zero/MuZero: [Muzero](https://github.com/werner-duvaud/muzero-general)\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Implementation of RL algorithms in PyTorch Lightning",
    "version": "0.0.24",
    "project_urls": {
        "Demo": "https://huggingface.co/spaces/c-gohlke/litrl-demo",
        "Documentation": "https://litrl.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/c-gohlke/LightningRL",
        "Repository": "https://github.com/c-gohlke/LightningRL"
    },
    "split_keywords": [
        "pytorch",
        "reinforcement-learning",
        "machine-learning",
        "mypy",
        "pytorch-lightning",
        "huggingface",
        "torchrl"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f360a6fc43a8cc75685904ec4885a1c5e95172c0bdb845770cf9208180d149fd",
                "md5": "66d1fd60348a9d33cef30e5afa4e2f6f",
                "sha256": "d258bfca42da317b7d4b7cb235daa688c9048b59d5dea32b8ff6cabb8f64cf9a"
            },
            "downloads": -1,
            "filename": "litrl-0.0.24-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "66d1fd60348a9d33cef30e5afa4e2f6f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 41516,
            "upload_time": "2024-02-01T08:09:56",
            "upload_time_iso_8601": "2024-02-01T08:09:56.522881Z",
            "url": "https://files.pythonhosted.org/packages/f3/60/a6fc43a8cc75685904ec4885a1c5e95172c0bdb845770cf9208180d149fd/litrl-0.0.24-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58f2927a3c77ff6936e7202da84024669444063aa6a812d776c83734692fbfc9",
                "md5": "039ffe08b32ca98e3ff2b3e75712a396",
                "sha256": "d031cd66365d8207188294d097e2146038b90fe4306746a9eaf083a9accea475"
            },
            "downloads": -1,
            "filename": "litrl-0.0.24.tar.gz",
            "has_sig": false,
            "md5_digest": "039ffe08b32ca98e3ff2b3e75712a396",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 31008,
            "upload_time": "2024-02-01T08:09:58",
            "upload_time_iso_8601": "2024-02-01T08:09:58.350401Z",
            "url": "https://files.pythonhosted.org/packages/58/f2/927a3c77ff6936e7202da84024669444063aa6a812d776c83734692fbfc9/litrl-0.0.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-01 08:09:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "c-gohlke",
    "github_project": "LightningRL",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "litrl"
}
        
Elapsed time: 3.55099s