Giter Club home page Giter Club logo

rllib-gridworld-experiments's Introduction

Repository for holding environments and models for gridworld experiments with rllib, and deploying them with Ray & Tune on Google Cloud.

Prerequisites

  • pyvirtualenv
  • google-api-python-client
  • Service account keys for a GCP project: (https://cloud.google.com/iam/docs/creating-managing-service-account-keys)
    • Save the credentials file inside secrets/.
  • Create an .env file as follows, substituting values between <> with your own:
    GOOGLE_REGION=us-west1
    GOOGLE_AVAILABILITY_ZONE=us-west1-a
    GOOGLE_PROJECT_ID=< your project id >
    GOOGLE_APPLICATION_CREDENTIALS=./secrets/< name of downloaded credentials.json >

Launch ray cluster on GCP

source .env  # load environment variables
envsubst < cluster.yaml.tmpl > cluster.yaml  # interpolate placeholders in cluster config template
ray up cluster.yaml

View the cluster's dashboard:

ray dashboard cluster.yaml

Activate python env

TODO: Add instructions for usage without development-mode

Use python env from sibling ray directory (with dev symlinks)

export RAY_DEV_VENV='../ray/venv'
ln -s $RAY_DEV_VENV venv
source venv/bin/activate

Run experiments

Run the notebook run_experiment.ipynb.

Shutting down

ray down cluster.yaml

rllib-gridworld-experiments's People

Contributors

paulfenton avatar

Watchers

James Cloos avatar  avatar

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.