rewind-reward-pytorch


Namerewind-reward-pytorch JSON
Version 0.0.12 PyPI version JSON
download
home_pageNone
SummaryRewind Reward
upload_time2025-08-09 00:40:28
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) 2025 Phil Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords artificial intelligence deep learning robotics
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
<img src="./rewind.png" width="400px"></img>

<img src="./fig9.png" width="400px"></img>

## ReWiND Reward - Pytorch (wip)

Implementation of [ReWiND, "Language-Guided Rewards Teach Robot Policies without New Demonstrations"](https://rewind-reward.github.io/), from USC / Amazon Robotics

## Install

```bash
$ pip install rewind-reward-pytorch
```

## Usage

```python
import torch
from rewind_reward_pytorch import RewardModel

reward_model = RewardModel()

commands = [
  'pick up the blue ball and put it in the red tray',
  'pick up the red cube and put it in the green bin'
]

videos = torch.rand(2, 3, 16, 224, 224)

loss = reward_model(commands, videos, rewards = torch.randn(2, 16))

loss.backward()

# after much training

pred = reward_model(commands, videos)

assert pred.shape == (2, 16)
```

## Citations

```bibtex
@article{Zhang2025ReWiNDLR,
    title   = {ReWiND: Language-Guided Rewards Teach Robot Policies without New Demonstrations},
    author  = {Jiahui Zhang and Yusen Luo and Abrar Anwar and Sumedh Anand Sontakke and Joseph J. Lim and Jesse Thomason and Erdem Biyik and Jesse Zhang},
    journal = {ArXiv},
    year    = {2025},
    volume  = {abs/2505.10911},
    url     = {https://api.semanticscholar.org/CorpusID:278714746}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rewind-reward-pytorch",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "artificial intelligence, deep learning, robotics",
    "author": null,
    "author_email": "Phil Wang <lucidrains@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3d/4c/184ba6a86008f004d5846f7be8792e6fd24fe7131ce815ddef4f2ca68095/rewind_reward_pytorch-0.0.12.tar.gz",
    "platform": null,
    "description": "\n<img src=\"./rewind.png\" width=\"400px\"></img>\n\n<img src=\"./fig9.png\" width=\"400px\"></img>\n\n## ReWiND Reward - Pytorch (wip)\n\nImplementation of [ReWiND, \"Language-Guided Rewards Teach Robot Policies without New Demonstrations\"](https://rewind-reward.github.io/), from USC / Amazon Robotics\n\n## Install\n\n```bash\n$ pip install rewind-reward-pytorch\n```\n\n## Usage\n\n```python\nimport torch\nfrom rewind_reward_pytorch import RewardModel\n\nreward_model = RewardModel()\n\ncommands = [\n  'pick up the blue ball and put it in the red tray',\n  'pick up the red cube and put it in the green bin'\n]\n\nvideos = torch.rand(2, 3, 16, 224, 224)\n\nloss = reward_model(commands, videos, rewards = torch.randn(2, 16))\n\nloss.backward()\n\n# after much training\n\npred = reward_model(commands, videos)\n\nassert pred.shape == (2, 16)\n```\n\n## Citations\n\n```bibtex\n@article{Zhang2025ReWiNDLR,\n    title   = {ReWiND: Language-Guided Rewards Teach Robot Policies without New Demonstrations},\n    author  = {Jiahui Zhang and Yusen Luo and Abrar Anwar and Sumedh Anand Sontakke and Joseph J. Lim and Jesse Thomason and Erdem Biyik and Jesse Zhang},\n    journal = {ArXiv},\n    year    = {2025},\n    volume  = {abs/2505.10911},\n    url     = {https://api.semanticscholar.org/CorpusID:278714746}\n}\n```\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Phil Wang\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Rewind Reward",
    "version": "0.0.12",
    "project_urls": {
        "Homepage": "https://pypi.org/project/rewind-reward-pytorch/",
        "Repository": "https://github.com/lucidrains/rewind-reward-pytorch"
    },
    "split_keywords": [
        "artificial intelligence",
        " deep learning",
        " robotics"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "180dacfbc9bfda15215bc0acb667ba129431097db3bfb3bc4ad881fea9cf8f5e",
                "md5": "65b07724081b84532e1601f1cbd87dc5",
                "sha256": "b23fed30d093a0ef5f7c3c2d2e79041d29ddf6e4fa27c8fc4c18b62d7b03b0c7"
            },
            "downloads": -1,
            "filename": "rewind_reward_pytorch-0.0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "65b07724081b84532e1601f1cbd87dc5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6006,
            "upload_time": "2025-08-09T00:40:27",
            "upload_time_iso_8601": "2025-08-09T00:40:27.046549Z",
            "url": "https://files.pythonhosted.org/packages/18/0d/acfbc9bfda15215bc0acb667ba129431097db3bfb3bc4ad881fea9cf8f5e/rewind_reward_pytorch-0.0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3d4c184ba6a86008f004d5846f7be8792e6fd24fe7131ce815ddef4f2ca68095",
                "md5": "1578040a2fc4faba74c0907c449dd2b6",
                "sha256": "9828fbfd2be155a4ba9dfe64aa61c076cd9770d1ed596160c1d9f8c26acad7ba"
            },
            "downloads": -1,
            "filename": "rewind_reward_pytorch-0.0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "1578040a2fc4faba74c0907c449dd2b6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 908764,
            "upload_time": "2025-08-09T00:40:28",
            "upload_time_iso_8601": "2025-08-09T00:40:28.299000Z",
            "url": "https://files.pythonhosted.org/packages/3d/4c/184ba6a86008f004d5846f7be8792e6fd24fe7131ce815ddef4f2ca68095/rewind_reward_pytorch-0.0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-09 00:40:28",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lucidrains",
    "github_project": "rewind-reward-pytorch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "rewind-reward-pytorch"
}
        
Elapsed time: 0.85676s