https://github.com/awslabs/amazon-accessible-rl-sdk

A2RL is a Python library for offline reinforcement learning

https://github.com/awslabs/amazon-accessible-rl-sdk

Science Score: 10.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: arxiv.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.7%) to scientific vocabulary

Keywords

exploratory-data-analysis optimization reinforcement-learning simulation trajectory-transformer
Last synced: 5 months ago · JSON representation

Repository

A2RL is a Python library for offline reinforcement learning

Basic Info
Statistics
  • Stars: 36
  • Watchers: 6
  • Forks: 8
  • Open Issues: 1
  • Releases: 0
Topics
exploratory-data-analysis optimization reinforcement-learning simulation trajectory-transformer
Created over 3 years ago · Last pushed over 1 year ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.md

Amazon Accessible RL SDK <!-- omit from toc -->

[ Documentation | PyPI | Blog-01 | Blog-02 (coming soon) ]

Amazon Accessible RL (A2RL) is an open-source Python package for sequential decision making problem using offline time-series data. It focuses on offline RL using state-of-the-art generative transformer technology – the same technology behind GATO, trajectory transformer and decision transformer.

A2RL guides you through problem formulation via data frames API, conduct initial data analysis to see if a solution is possible, use the data to train a simulator (aka digital twin) based on the data, and providing recommended actions.

Installation

bash pip install a2rl

Usage

You should start by formulating your problem into states, actions, and rewards (see the online documentation). Then, prepare a dataset that reflects the formulation, using A2RL's Pandas-like API.

A synthetic dataset is included to help you quickly jump into the end-to-end workflow:

```python import a2rl as wi from a2rl.utils import plot_information

Load a sample dataset which contains historical states, actions, and rewards.

widf = wi.readcsvdataset(wi.sampledatasetpath("chiller")).trim().addvalue() widf = widf.iloc[:1000] # Reduce data size for demo purpose

Checks and analysis

plotinformation(widf)

Train a simulator

tokenizer = wi.AutoTokenizer(widf, blocksizerow=2) builder = wi.GPTBuilder(tokenizer, modeldir="my-model", ) model = builder.fit() simulator = wi.Simulator(tokenizer, model, maxsteps=100, resetcoldstart=2)

Get recommended actions given an input context (s,a,r,v,...s).

Context must end with states, and its members must be tokenized.

customcontext = simulator.tokenizer.dftokenized.sequence[:7] recommendationdf = simulator.sample(customcontext, 3)

Show recommendations (i.e., trajectory)

recommendation_df ```

For more examples, see notebooks/ (pre-rendered versions here), and the A2RL blog series: part-1 and part-2 (coming soon).

Help and Support

Owner

  • Name: Amazon Web Services - Labs
  • Login: awslabs
  • Kind: organization
  • Location: Seattle, WA

AWS Labs

GitHub Events

Total
Last Year

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 73
  • Total Committers: 6
  • Avg Commits per committer: 12.167
  • Development Distribution Score (DDS): 0.342
Top Committers
Name Email Commits
Verdi March v****c@u****m 48
Yap Wei Yih y****p@a****m 10
laurcate l****e@a****m 7
Chen Wu w****c@a****m 6
Amazon GitHub Automation 5****o@u****m 1
Eden Duthie d****e@a****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 35
  • Average time to close issues: 1 day
  • Average time to close pull requests: 2 days
  • Total issue authors: 2
  • Total pull request authors: 7
  • Average comments per issue: 1.5
  • Average comments per pull request: 1.29
  • Merged pull requests: 31
  • Bot issues: 0
  • Bot pull requests: 1
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 1.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 1
Top Authors
Issue Authors
  • gballardin (1)
  • verdimrc (1)
Pull Request Authors
  • verdimrc (21)
  • yapweiyih (7)
  • chenwuperth (3)
  • dependabot[bot] (2)
  • Laurenstc (1)
  • laurcate (1)
  • CP500 (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (2)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 70 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
  • Total maintainers: 1
pypi.org: a2rl

Make recommendations for sequential decision problems using offline data

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 70 Last month
Rankings
Dependent packages count: 6.6%
Stargazers count: 11.8%
Downloads: 15.5%
Forks count: 15.7%
Average: 16.1%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

examples/sagemaker-training/dynamic_pricing/requirements.txt pypi
  • PyYaml >=5.1
  • gym >=0.23.1
  • loguru *
  • matplotlib *
  • nptyping *
  • numpy *
  • pandas *
  • pygame *
  • scikit-learn *
  • scipy *
  • seaborn *
  • stable_baselines3 *
  • torch *
  • tqdm >=4.24.0
  • typeguard *
  • typing_extensions *
examples/sagemaker-training/requirements-submit-train.txt pypi
  • aiobotocore *
  • botocore >=1.24.21,<1.24.22
  • loguru *
  • s3fs *
  • sagemaker *
  • smepu main
requirements-build.txt pypi
  • build *
  • setupext-janitor *
  • wheel *
requirements-dev.txt pypi
  • autoflake * development
  • black * development
  • bump2version * development
  • flake8 * development
  • ipdb * development
  • ipykernel * development
  • ipywidgets * development
  • isort * development
  • mypy * development
  • pre-commit * development
  • rich * development
  • sphinx-autobuild * development
  • types-PyYAML * development
requirements-docs.txt pypi
  • ipykernel *
  • ipython *
  • ipywidgets *
  • jupyterlab-execute-time *
  • myst-parser *
  • nbsphinx *
  • psychrolib *
  • pydata-sphinx-theme <0.10.1
  • rich *
  • smopy *
  • sphinx *
  • sphinx-autodoc-typehints *
  • sphinx-gallery <0.11.0
  • sphinx-toggleprompt *
  • sphinx-toolbox *
  • sphinxcontrib-mermaid *
  • sphinxemoji *
requirements-test.txt pypi
  • pytest * test
  • pytest-console-scripts * test
  • pytest-cov * test
  • pytest-lazy-fixture * test
  • pytest-sphinx * test
  • pytest-xdist * test
  • safety * test
requirements.txt pypi
  • PyYaml >=5.1
  • cloudpickle *
  • gym >=0.23.1
  • loguru *
  • matplotlib *
  • nptyping *
  • numpy *
  • pandas *
  • pygame *
  • pytorch-lightning >=1.5.0
  • scikit-learn *
  • scipy *
  • seaborn *
  • stable_baselines3 *
  • torch *
  • tqdm >=4.24.0
  • typeguard *
  • typing_extensions *
.github/workflows/publish.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/python-app.yml actions
  • MishaKav/pytest-coverage-comment main composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/configure-pages v1 composite
  • actions/deploy-pages v1 composite
  • actions/download-artifact v3 composite
  • actions/setup-node v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • actions/upload-pages-artifact v1 composite
  • aws-actions/configure-aws-credentials v1 composite
  • isort/isort-action master composite
  • psf/black stable composite