{"id":18549055,"url":"https://github.com/typoverflow/wiserl","last_synced_at":"2025-04-09T21:32:31.228Z","repository":{"id":247317999,"uuid":"740971938","full_name":"typoverflow/WiseRL","owner":"typoverflow","description":"PyTorch implementations for Offline Preference-Based RL (PbRL) algorithms","archived":false,"fork":false,"pushed_at":"2025-03-04T02:57:13.000Z","size":6339,"stargazers_count":19,"open_issues_count":4,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T11:56:53.795Z","etag":null,"topics":["preference-learning","pytorch","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/typoverflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-09T12:56:48.000Z","updated_at":"2024-12-16T06:42:43.000Z","dependencies_parsed_at":"2024-11-06T20:42:29.604Z","dependency_job_id":"684d8c9c-17ce-43dc-a0da-bf9f2e0e8782","html_url":"https://github.com/typoverflow/WiseRL","commit_stats":null,"previous_names":["typoverflow/wiserl"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2FWiseRL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2FWiseRL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2FWiseRL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/typoverflow%2FWiseRL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/typoverflow","download_url":"https://codeload.github.com/typoverflow/WiseRL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248114860,"owners_count":21050130,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["preference-learning","pytorch","reinforcement-learning"],"created_at":"2024-11-06T20:37:52.746Z","updated_at":"2025-04-09T21:32:30.600Z","avatar_url":"https://github.com/typoverflow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\n\u003cimg src=\"assets/banner.png\"\u003e\n\n\u003c/p\u003e\n\n\nWiseRL provides banchmarked PyTorch implementations for Offline Preference-Based RL algorithms, including:\n- Oracle-IQL \u0026 Oracle AWAC\n- Supervised Finetuning\n- Bradley-Terry Model + IQL/AWAC\n- Contrastive Prefereing Learning\n- Inverse Preference Learning + IQL/AWAC\n- Preference Transformer + IQL/AWAC\n- [Hindsight Preference Learning](https://arxiv.org/abs/2407.04451) + IQL/AWAC\n\n## Usage\n```bash\n# for reward-model free algorithms\npython3 scripts/main.py --config /path/to/config.yaml\n\n# for reward-model-based algorithms\npython3 scripts/rmb_main.py --config /path/to/config.yaml\n```\n\n\n## Installation\n+ clone this repo and install the dependencies\n  ```bash\n  git clone git@github.com:typoverflow/WiseRL\n  cd WiseRL \u0026\u0026 pip install -e .\n  ```\n+ install environment or dataset dependencies\n  + for D4RL experiments:\n    ```bash\n    git clone https://github.com/Farama-Foundation/d4rl.git\n    cd d4rl\n    pip install -e .\n    ```\n  + for metaworld experiments:\n    ```bash\n    git clone git@github.com:Farama-Foundation/Metaworld\n    cd Metaworld \u0026\u0026 git checkout 04be337a\n    pip install -e .\n    ```\n  + for robosuite experiments (we follow the instructions from [IPL](https://github.com/jhejna/inverse-preference-learning?tab=readme-ov-file)):\n    + Git clone the robosuite repository, checkout to `offline_study` branch and install.\n      ```bash\n      git clone https://github.com/ARISE-Initiative/robosuite\n      cd robosuite \u0026\u0026 git checkout offline_study\n      pip install -e . --no-dependencies\n      ```\n      Nota that if you are using python 3.10 or higher, you need to change `from collections import Iterable` to `from collections.abc import Iterable` in file `robosuite/models/arenas/multi_table_arena.py`.\n    + Run `import robosuite` repeatedly until it completes. Install the missing packages if any error shows up.\n    + Git clone the robomimic repository.\n      ```bash\n      git clone git@github.com:ARISE-Initiative/robomimic.git\n      cd robomimic \u0026\u0026 git checkout v0.2.0\n      ```\n    + Download the robomimic dataset\n      ```bash\n      mkdir -p ~/.robomimic/datasets/\n      cd robomimic/scripts/\n      python download_datasets.py --tasks sim --dataset_types ph --hdf5_types low_dim --download_dir ~/.robomimic/datasets/\n      python download_datasets.py --tasks sim --dataset_types mh --hdf5_types low_dim --download_dir ~/.robomimic/datasets/\n      ```\n    + Checkout back to the master branch and install. **Note that you must first checkout to v0.2.0 branch to download the dataset, and come back to install the latest version of code.**\n      ```bash\n      git checkout master\n      pip install -e . --no-dependencies\n      ```\n    + Run `import robomimic` repeatedly until it completes. Install the missing packages if any error shows up.\n    + Note that the above installation scripts will download the datasets to `~/.robosuite/datasets`. If you would like to change to other locations, please make sure to change the macro in Robomimic Dataset accordingly.\n\n## Acknowledgement\n+ [Research Lightening](https://github.com/jhejna/research-lightning) and [Inverse Preference Learning](https://github.com/jhejna/inverse-preference-learning): for their module design and implementations of some baseline algorithms.\n+ [Preference Transformer](https://github.com/csmile-1006/PreferenceTransformer): for the Gym-MuJoCo datasets.\n\n\n## Citation\n```bibtex\n@software{wiserl\n  title = {{WiseRL: Benchmarked Implementations of Offline Preference-based RL Algorithms}},\n  author = {Gao, Chen-Xiao and Shengjun, Fang},\n  month = feb,\n  url = {https://github.com/typoverflow/WiseRL},\n  year = {2024}\n}\n\n@article{gao2024hindsight,\n  title={Hindsight Preference Learning for Offline Preference-based Reinforcement Learning},\n  author={Chen-Xiao Gao and Shengjun Fang and Chenjun Xiao and Yang Yu and Zongzhang Zhang},\n  journal={arXiv preprint arXiv:2407.04451},\n  year={2024},\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypoverflow%2Fwiserl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftypoverflow%2Fwiserl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftypoverflow%2Fwiserl/lists"}