All Projects → sash-a → es_pytorch

sash-a / es_pytorch

Licence: other
High performance implementation of Deep neuroevolution in pytorch using mpi4py. Intended for use on HPC clusters

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to es pytorch

hpc
Learning and practice of high performance computing (CUDA, Vulkan, OpenCL, OpenMP, TBB, SSE/AVX, NEON, MPI, coroutines, etc. )
Stars: ✭ 39 (+95%)
Mutual labels:  mpi, mpi4py
mpi-parallelization
Examples for MPI Spawning and Splitting, and the differences between two implementations
Stars: ✭ 16 (-20%)
Mutual labels:  mpi, mpi4py
Super Mario Neat
This program evolves an AI using the NEAT algorithm to play Super Mario Bros.
Stars: ✭ 64 (+220%)
Mutual labels:  neuroevolution, gym
nbodykit
Analysis kit for large-scale structure datasets, the massively parallel way
Stars: ✭ 93 (+365%)
Mutual labels:  mpi, mpi4py
gym-cryptotrading
OpenAI Gym Environment API based Bitcoin trading environment
Stars: ✭ 111 (+455%)
Mutual labels:  gym
fml
Fused Matrix Library
Stars: ✭ 24 (+20%)
Mutual labels:  mpi
Pytorch-RL-CPP
A Repository with C++ implementations of Reinforcement Learning Algorithms (Pytorch)
Stars: ✭ 73 (+265%)
Mutual labels:  gym
bsuir-csn-cmsn-helper
Repository containing ready-made laboratory works in the specialty of computing machines, systems and networks
Stars: ✭ 43 (+115%)
Mutual labels:  mpi
mloperator
Machine Learning Operator & Controller for Kubernetes
Stars: ✭ 85 (+325%)
Mutual labels:  mpi
libquo
Dynamic execution environments for coupled, thread-heterogeneous MPI+X applications
Stars: ✭ 21 (+5%)
Mutual labels:  mpi
neat-openai-gym
NEAT for Reinforcement Learning on the OpenAI Gym
Stars: ✭ 19 (-5%)
Mutual labels:  neuroevolution
CartPole
Run OpenAI Gym on a Server
Stars: ✭ 16 (-20%)
Mutual labels:  gym
ACCL
Accelerated Collective Communication Library: MPI-like communication operations for Xilinx Alveo accelerators
Stars: ✭ 28 (+40%)
Mutual labels:  mpi
h5fortran-mpi
HDF5-MPI parallel Fortran object-oriented interface
Stars: ✭ 15 (-25%)
Mutual labels:  mpi
matrix multiplication
Parallel Matrix Multiplication Using OpenMP, Phtreads, and MPI
Stars: ✭ 41 (+105%)
Mutual labels:  mpi
ecole
Extensible Combinatorial Optimization Learning Environments
Stars: ✭ 249 (+1145%)
Mutual labels:  gym
NeuralFish
Neuroevolution in F#
Stars: ✭ 28 (+40%)
Mutual labels:  neuroevolution
flutter
Flutter fitness/workout app for wger
Stars: ✭ 106 (+430%)
Mutual labels:  gym
pbdML
No description or website provided.
Stars: ✭ 13 (-35%)
Mutual labels:  mpi
fenics-DRL
Repository from the paper https://arxiv.org/abs/1908.04127, to train Deep Reinforcement Learning in Fluid Mechanics Setup.
Stars: ✭ 40 (+100%)
Mutual labels:  gym

Depreciated in faviour of my much faster implementation in Julia

Evolutionary strategies (deep neuroevolution) in pytorch using MPI

This implementation was made to be as simple and efficient as possible.
Reference implementation can be found here (in tensorflow using redis).
Based on two papers by uber AI labs here and here.

Implementation

This was made for use on a cluster using MPI (however it can be used on a single machine). With regards to efficiency it only scatters the positive fitness, negative fitness and noise index, per policy evaluated, to all other processes each generation. The noise is placed in a block of shared memory (on each node) for fast access and low memory footprint.

How to run

  • conda install: conda install -n es_env -f env.yml
  • example usages: simple_example.py obj.py nsra.py
  • example configs are in config/
conda activate es_env
mpirun -np {num_procs} python simple_example.py configs/simple_conf.json

Make sure that you insert this line before you create your neural network as the initial creation sets the initial parameters, which must be deterministic across all threads

torch.random.manual_seed({seed})

General info

  • In order to define a policy create a src.nn.nn.BaseNet (which is a simple extension of a torch.nn.Module) and pass it to a Policy along with an src.nn.optimizers.Optimizer and float value for the noise standard deviation, an example of this can be seen in simple_example.py.
  • If you wish to share the noise using shared memory and MPI, then instantiate the NoiseTable using NoiseTable.create_shared(...), otherwise if you wish to use your own method of sharing noise/running sequentially then simply create the noise table using its constructor and pass your noise to it like this: NoiseTable(my_noise, n_params)
  • NoiseTable.create_shared(...) will throw an error if less than 2 MPI procs are used
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].