Điểm qua Farama-Foundation/D4RL: 1.7k sao trên GitHub, viết chủ yếu bằng Python. A collection of reference environments for offline reinforcement learning
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
All of online environments libraries in D4RL have been moved Gymnasium, MiniGrid and Gymnasium-Robotics, and all offline datasets in DR4L have been moved to Minari. These new versions include large bug fixes, new versions of Python, and are where all new development will continue. Please upgrade these libraries as soon as you're able to do so. If you'd like to read more about the story behind this switch, please check out this blog post.
D4RL is an open-source benchmark for offline reinforcement learning. It provides standardized environments and datasets for training and benchmarking algorithms. A supplementary whitepaper and website are also available.
The current maintenance plan for this library is:
Pull the majority of the environments out of D4RL, fix the long standing bugs, and have them depend on the new MuJoCo bindings. The majority of the environments housed in D4RL were already maintained projects in Farama, and all the ones that aren't will be going into Gymnasium-Robotics, a standard library for housing many different Robotics environments. There are some envrionments that we don't plan to maintain, noteably the PyBullet ones (MuJoCo is not maintained and open source and PyBullet is now longer maintained) and Flow (it was never really used and the original author's don't view it as especially valuable).
Recreate all the datasets in D4RL given the revised versions of environments, and host them in a standard offline RL dataset repostiry we're working on called Minari.
Setup
D4RL can be installed by cloning the repository as follows:
git clone https://github.com/Farama-Foundation/d4rl.git
cd d4rl
pip install -e .
The control environments require MuJoCo as a dependency. You may need to obtain a license and follow the setup instructions for mujoco_py. This mostly involves copying the key to your MuJoCo installation folder.
The Flow and CARLA tasks also require additional installation steps:
Instructions for installing CARLA can be found here
Instructions for installing Flow can be found here. Make sure to install using the SUMO simulator, and add the flow repository to your PYTHONPATH once finished.
Using d4rl
d4rl uses the OpenAI Gym API. Tasks are created via the gym.make function. A full list of all tasks is available here.
Each task is associated with a fixed offline dataset, which can be obtained with the env.get_dataset() method. This method returns a dictionary with:
observations: An N by observation dimensional array of observations.
actions: An N by action dimensional array of actions.
rewards: An N dimensional array of rewards.
terminals: An N dimensional array of episode termination flags. This is true when episodes end due to termination conditions such as falling over.
timeouts: An N dimensional array of termination flags. This is true when episodes end due to reaching the maximum episode length.
You can also load data using d4rl.qlearning_dataset(env), which formats the data for use by typical Q-learning algorithms by adding a next_observations key.
import gym
import d4rl # Import required to register environments, you may need to also import the submodule
# Create the environment
env = gym.make('maze2d-umaze-v1')
# d4rl abides by the OpenAI gym interface
env.reset()
env.step(env.action_space.sample())
# Each task is associated with a dataset
# dataset contains observations, actions, rewards, terminals, and infos
dataset = env.get_dataset()
print(dataset['observations']) # An N x dim_observation Numpy array of observations
# Alternatively, use d4rl.qlearning_dataset which
# also adds next_observations.
dataset = d4rl.qlearning_dataset(env)
Datasets are automatically downloaded to the ~/.d4rl/datasets directory when get_dataset() is called. If you would like to change the location of this directory, you can set the $D4RL_DATASET_DIR environment variable to the directory of your choosing, or pass in the dataset filepath directly into the get_dataset method.
Normalizing Scores
You can use the env.get_normalized_score(returns) function to compute a normalized score for an episode, where returns is the undiscounted total sum of rewards accumulated during an episode.
The individual min and max reference scores are stored in d4rl/infos.py for reference.
Algorithm Implementations
We have aggregated implementations of various offline RL algorithms in a separate repository.
Off-Policy Evaluations
D4RL currently has limited support for off-policy evaluation methods, on a select few locomotion tasks. We provide trained reference policies and a set of performance metrics. Additional details can be found in the wiki.
Recent Updates
2-12-2020
Added new Gym-MuJoCo datasets (labeled v2) which fixed Hopper's performance and the qpos/qvel fields.
Added additional wiki documentation on generating datasets.
Acknowledgements
D4RL builds on top of several excellent domains and environments built by various researchers. We would like to thank the authors of:
hand_dapg
gym-minigrid
carla
flow
adept_envs
Citation
Please use the following bibtex for citations:
@misc{fu2020d4rl,
title={D4RL: Datasets for Deep Data-Driven Reinforcement Learning},
author={Justin Fu and Aviral Kumar and Ofir Nachum and George Tucker and Sergey Levine},
year={2020},
eprint={2004.07219},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
Licenses
Unless otherwise noted, all datasets are licensed under the Creative Commons Attribution 4.0 License (CC BY), and code is licensed under the Apache 2.0 License.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/Farama-Foundation/D4RL là nguồn chính thức.
Farama-Foundation/D4RL có bao nhiêu sao?
Farama-Foundation/D4RL có 1.7k sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/Farama-Foundation/D4RL. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
Farama-Foundation/D4RL có phải mã nguồn mở không?
Có — Farama-Foundation/D4RL phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/Farama-Foundation/D4RL.
Farama-Foundation/D4RL còn đang phát triển không?
Commit gần nhất trên Farama-Foundation/D4RL là 1.7 năm trước (theo timestamp GitHub). Repo có 308 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
Farama-Foundation/D4RL dùng license gì?
Farama-Foundation/D4RL phát hành theo license Apache-2.0. Nên mở file LICENSE trên GitHub để xác nhận — license metadata đôi khi lệch với thực tế dự án.
Farama-Foundation/D4RL là gì?
Farama-Foundation/D4RL (Farama-Foundation/D4RL) là dự án Python trên GitHub. Theo mô tả gốc: A collection of reference environments for offline reinforcement learning
Farama-Foundation/D4RL viết bằng ngôn ngữ gì?
Farama-Foundation/D4RL chủ yếu viết bằng Python. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về D4RL?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về D4RL.