Coder Social home page Coder Social logo

apex's Introduction

apex


Apex is a small, modular library that contains some implementations of continuous reinforcement learning algorithms. Fully compatible with OpenAI gym.

running1

running2

Running experiments

Basics

Any algorithm can be run from the apex.py entry point.

To run PPO on a cassie environment,

python apex.py ppo --env_name Cassie-v0 --num_procs 12 --run_name experiment01

To run TD3 on the gym environment Walker-v2,

python apex.py td3_async --env_name Walker-v2 --num_procs 12 --run_name experiment02

Logging details / Monitoring live training progress

Tensorboard logging is enabled by default for all algorithms. The logger expects that you supply an argument named logdir, containing the root directory you want to store your logfiles in, and an argument named seed, which is used to seed the pseudorandom number generators.

A basic command line script illustrating this is:

python apex.py ars --logdir logs/ars --seed 1337

The resulting directory tree would look something like this:

trained_models/                         # directory with all of the saved models and tensorboard logs
└── ars                                 # algorithm name
    └── Cassie-v0                       # environment name
        └── 8b8b12-seed1                # unique run name created with hash of hyperparameters
            ├── actor.pt                # actor network for algo
            ├── critic.pt               # critic network for algo
            ├── events.out.tfevents     # tensorboard binary file
            ├── experiment.info         # readable hyperparameters for this run
            └── experiment.pkl          # loadable pickle of hyperparameters

Using tensorboard makes it easy to compare experiments and resume training later on.

To see live training progress

Run $ tensorboard --logdir logs/ then navigate to http://localhost:6006/ in your browser

Cassie Environments:

  • Cassie-v0 : basic unified environment for walking/running policies
  • CassieTraj-v0 : unified environment with reference trajectories
  • CassiePlayground-v0 : environment for executing autonomous missions
  • CassieStanding-v0 : environment for training standing policies

Algorithms:

Currently implemented:

To be implemented long term:

Maybe implemented in future:

  • DXNN
  • ACER and other off-policy methods
  • Model-based methods

Acknowledgements

Thanks to @ikostrikov's whose great implementations were used for debugging. Also thanks to @rll for rllab, which inspired a lot of the high level interface and logging for this library, and to @OpenAI for the original PPO tensorflow implementation. Thanks to @sfujim for the clean implementations of TD3 and DDPG in PyTorch. Thanks @modestyachts for the easy to understand ARS implementation.

apex's People

Contributors

0xjohnwarila avatar dylan-albertazzi avatar hyparxis avatar jdao913 avatar lbermillo avatar siekmanj avatar srikarvalluri avatar tapgar avatar yeshg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

apex's Issues

Requesting simple RDPG example

Hi, could you help me get a simple RDPG example using, say, Pendulum-v0 working?

I tried to invoke using the following on an Ubuntu + Pytorch 1.4.1 system, but am running into errors:

python apex.py rdpg --env_name Pendulum-v0 --run_name pendulum_rdpg

I fixed several pathname related issues, but am still running into missing modules etc.

Traceback (most recent call last):
  File "apex.py", line 116, in <module>
    run_experiment(args)
  File "/home/apex/rl/algos/dpg.py", line 208, in run_experiment
    from rl.policies.critic import FF_Critic, LSTM_Critic
ImportError: cannot import name 'FF_Critic' from 'rl.policies.critic' (/home/apex/rl/policies/critic.py)

Thanks in advance!

cannot open shared object file: No such file or directory

I configured my mujoco200 and mujoco_py currently.But when I run the 'apex.py' or the command you provide,it always error as follows:Failed to load /home/eduradoxu/.mujoco/mujoco200_linux/bin/libmujoco200nogl.so. I think the error is due for the libcassiemujoco.so.

OSError: [Errno 28] No space left on device

I'm running into out of storage issues while training (the "PPO" algorithm) as follows:

2022-08-24 11:57:32,014 WARNING worker.py:1404 -- Traceback (most recent call last):
File "python/ray/_raylet.pyx", line 896, in ray._raylet.spill_objects_handler
File "python/ray/_raylet.pyx", line 899, in ray._raylet.spill_objects_handler
File "/home/xxx/anaconda3/envs/mujoco_env/lib/python3.7/site-packages/ray/external_storage.py", line 662, in spill_objects
return _external_storage.spill_objects(object_refs, owner_addresses)
File "/home/xxx/anaconda3/envs/mujoco_env/lib/python3.7/site-packages/ray/external_storage.py", line 303, in spill_objects
return self._write_multiple_objects(f, object_refs, owner_addresses, url)
File "/home/xxx/anaconda3/envs/mujoco_env/lib/python3.7/site-packages/ray/external_storage.py", line 151, in _write_multiple_objects
written_bytes = f.write(payload)
OSError: [Errno 28] No space left on device
An unexpected internal error occurred while the IO worker was spilling objects: [Errno 28] No space left on device

Approximately how much space is required for the "apex" project to train. thanks

ERROR: Could not open activation key file (null)

Hey, I'm trying to use your cassie_standing_env, but I'm getting this error:
ERROR: Could not open activation key file (null)

I have a mujoco key, and it looks like this means that the directory we're looking for the key in is (null), as in, it isn't searching an actual directory. Any idea what's going on here? I can run cassie-mujoco-sim but not the version in this repo (which seems to be more recent, with walking trajectories).

Thanks!
Deirdre

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.