Giter Club home page Giter Club logo

abp's Introduction

Adaptation Based Programming

Installation

   cd abp
   pip3 install -r requirement.txt
   python setup.py install

Usage

Local Run

  • Start Visdom: visdom

  • Train :

    python -m abp.trainer.task_runner

    It takes the following arguments:

    Command Options Description
    --example EXAMPLE The example to run
    --adaptive ADAPTIVE The adaptive to use for the run
    --job-dir JOB_DIR The location to write tensorflow summaries
    --model-path MODEL_PATH The location to save the model
    --restore-model Restore the model instead of training a new model
    -r, --render Set if it should render the test episodes
    --training-episodes TRAINING_EPISODES Set the number of training episodes
    --test-episodes TEST_EPISODES Set the number of test episodes
    --decay-steps DECAY_STEPS Set the decay rate for exploration

    Minimal Example:

    python -m abp.trainer.task_runner -f tasks/fruit_collection/hra/v1 -t abp.examples.open_ai.fruit_collection.hra -r
  • Visualize Results: tensorboard --logdir=tensorflow_summaries

Using CloudML

To run the job using cloud ML use the following commands

Setup Job Parameters

now=$(date +"%Y%m%d_%H%M%S")
JOB_NAME="abp_tictactoe_$now"
TRAINER_PACKAGE_PATH="/path-to-abp/abp"
TRAINER_CONFIG_PATH="/path-to-abp/abp/trainer/cloudml-gpu.yml"
MAIN_TRAINER_MODULE="abp.trainer.task_runner"
JOB_DIR="gs://path-to-job-dir"
MODEL_PATH="gs://path-to-model"
EXAMPLE="tictactoe"
ADAPTIVE="hra"
TRAINING_EPISODES=1000
DECAY_STEPS=250

Submit the job

gcloud ml-engine jobs submit training $JOB_NAME \
    --package-path $TRAINER_PACKAGE_PATH \
    --module-name $MAIN_TRAINER_MODULE \
    --job-dir $JOB_DIR \
    --region us-east1 \
    --stream-logs \
    --config=$TRAINER_CONFIG_PATH \
    -- \
    --example $EXAMPLE \
    --adaptive $ADAPTIVE \
    --model-path $MODEL_PATH \
    --training-episodes $TRAINING_EPISODES \
    --decay-steps $DECAY_STEPS

abp's People

Contributors

ema93sh avatar koulanurag avatar amritas02 avatar

Watchers

James Cloos avatar  avatar

Forkers

suerpx

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.