GithubHelp home page GithubHelp logo

hilanzy / moss Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 1.53 MB

Moss is a Python library for Reinforcement Learning.

License: MIT License

Makefile 1.54% Python 97.87% Dockerfile 0.59%
atari envpool impala jax reinforcement-learning rlax dm-haiku dm-launchpad library pypi

moss's Introduction

Moss: A Python library for Reinforcement Learning

PyPI Python Version PyPI GitHub license

Moss is a Python library for Reinforcement Learning based on jax.

Installation

To get up and running quickly just follow the steps below:

Installing from PyPI: Moss is currently hosted on PyPI, you can simply install Moss from PyPI with the following command:

pip install moss-rl

Installing from github: If you are interested in running Moss as a developer, you can do so by cloning the Moss GitHub repository and then executing following command from the main directory (where setup.py is located):

pip install -e ".[dev]"

After installation, open your python console and type

import moss
print(moss.__version__)

If no error occurs, you have successfully installed Moss.

Work on GPU or TPU

If you want to run Moss with NVIDIA GPU, please run the steps below:

pip install --upgrade pip

pip uninstall jax jaxlib -y

# CUDA 12 installation
# Note: wheels only available on linux.
pip install --upgrade "jax[cuda12_pip]==0.4.20" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

# CUDA 11 installation
# Note: wheels only available on linux.
pip install --upgrade "jax[cuda11_pip]==0.4.20" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html

Or if you want to run with Google Cloud TPU:

pip install "jax[tpu]==0.4.20" -f https://storage.googleapis.com/jax-releases/libtpu_releases.html

For more details, please see the JAX installation instructions here.

Quick Start

This is an example of Impala to train Atari game(use envpool).

python impala.py --task_id Pong-v5 --learning_rate 1e-3

moss's People

Contributors

dependabot[bot] avatar hilanzy avatar

Stargazers

 avatar  avatar

Watchers

 avatar

moss's Issues

Refine examples.

1.Refine hyper parameters entropy_coef for Seaquest-v5 in impala.(0.5 is best for now)

2.Fix bugs for local run.

Network refactor.

  1. code format.
  2. torso inputs refactor.
  3. action spec refine.
  4. reconstruct the directory structure of the network.

Refine network feature.

  • Refine FeatureSet process.
  • Refine network input feature.
  • Fix torso inputs concatenate axis.

Refactor Network.

Refactor Network to make it more flexible and simpler to custom and compose.

Refactor moss env to make it more generic.

Refactor the Moss environment to make it more generic, allowing it to support more environment standards such as gym and pettingzoo.

  • Refactor moss environment.
  • Add pettingzoo example.
  • Modify file path of agent.
  • Fix spec shape of ScaleFeature and OneHotFeature.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.