A lightweight parameter server interface
See the codeA light and efficient implementation of the parameter server framework. It provides clean yet powerful APIs. For example, a worker node can communicate with the server nodes by
Push(keys, values): push a list of (key, value) pairs to the server nodesPull(keys): pull the values from servers for a list of keysWait: wait until a push or pull finished.A simple example:
std::vector<uint64_t> key = {1, 3, 5};
std::vector<float> val = {1, 1, 1};
std::vector<float> recv_val;
ps::KVWorker<float> w;
w.Wait(w.Push(key, val));
w.Wait(w.Pull(key, &recv_val));
More features:
ps-lite requires a C++11 compiler such as g++ >= 4.8. On Ubuntu >= 13.10, we
can install it by
sudo apt-get update && sudo apt-get install -y build-essential git
Instructions for gcc 4.8 installation on other platforms:
Then clone and build
git clone https://github.com/dmlc/ps-lite
cd ps-lite && make -j4
ps-lite provides asynchronous communication for other projects:
588 followers · starred Dec 2016
124 followers · starred May 2017
41 followers · starred Apr 2017
2,617 followers · starred Aug 2020
A lightweight parameter server interface
See the codeA light and efficient implementation of the parameter server framework. It provides clean yet powerful APIs. For example, a worker node can communicate with the server nodes by
Push(keys, values): push a list of (key, value) pairs to the server nodesPull(keys): pull the values from servers for a list of keysWait: wait until a push or pull finished.A simple example:
std::vector<uint64_t> key = {1, 3, 5};
std::vector<float> val = {1, 1, 1};
std::vector<float> recv_val;
ps::KVWorker<float> w;
w.Wait(w.Push(key, val));
w.Wait(w.Pull(key, &recv_val));
More features:
ps-lite requires a C++11 compiler such as g++ >= 4.8. On Ubuntu >= 13.10, we
can install it by
sudo apt-get update && sudo apt-get install -y build-essential git
Instructions for gcc 4.8 installation on other platforms:
Then clone and build
git clone https://github.com/dmlc/ps-lite
cd ps-lite && make -j4
ps-lite provides asynchronous communication for other projects:
588 followers · starred Dec 2016
124 followers · starred May 2017
41 followers · starred Apr 2017
2,617 followers · starred Aug 2020