项目作者: gbxu

项目描述 :
基于kafka的ps-lite
高级语言: C++
项目地址: git://github.com/gbxu/ps-kafka.git
创建时间: 2018-04-20T02:46:48Z
项目社区:https://github.com/gbxu/ps-kafka

开源协议:Apache License 2.0

下载


Build Status
GitHub license

A 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 nodes
  • Pull(keys): pull the values from servers for a list of keys
  • Wait: wait untill a push or pull finished.

A simple example:

  1. std::vector<uint64_t> key = {1, 3, 5};
  2. std::vector<float> val = {1, 1, 1};
  3. std::vector<float> recv_val;
  4. ps::KVWorker<float> w;
  5. w.Wait(w.Push(key, val));
  6. w.Wait(w.Pull(key, &recv_val));

More features:

  • Flexible and high-performance communication: zero-copy push/pull, supporting
    dynamic length values, user-defined filters for communication compression
  • Server-side programming: supporting user-defined handles on server nodes

Build

ps-lite requires a C++11 compiler such as g++ >= 4.8. On Ubuntu >= 13.10, we
can install it by

  1. sudo apt-get update && sudo apt-get install -y build-essential git

Instructions for
older Ubuntu,
Centos,
and
Mac Os X.

Then clone and build

  1. git clone https://github.com/dmlc/ps-lite
  2. cd ps-lite && make -j4

How to use

ps-lite provides asynchronous communication for other projects:

  • Distributed deep neural networks:
    MXNet,
    CXXNET and
    Minverva
  • Distributed high dimensional inference, such as sparse logistic regression,
    factorization machines:
    DiFacto
    Wormhole

History

We started to work on the parameter server framework since 2010.

  1. The first generation was
    designed and optimized for specific algorithms, such as logistic regression and
    LDA, to serve the sheer size industrial machine learning tasks (hundreds billions of
    examples and features with 10-100TB data size) .

  2. Later we tried to build a open-source general purpose framework for machine learning
    algorithms. The project is available at dmlc/parameter_server.

  3. Given the growing demands from other projects, we created ps-lite, which provides a clean data communication API and a
    lightweight implementation. The implementation is based on dmlc/parameter_server, but we refactored the job launchers, file I/O and machine
    learning algorithms codes into different projects such as dmlc-core and
    wormhole.

  4. From the experience we learned during developing
    dmlc/mxnet, we further refactored the API and implementation from v1. The main
    changes include

    • less library dependencies
    • more flexible user-defined callbacks, which facilitate other language
      bindings
    • let the users, such as the dependency
      engine of mxnet, manage the data consistency

Research papers

  1. Mu Li, Dave Andersen, Alex Smola, Junwoo Park, Amr Ahmed, Vanja Josifovski,
    James Long, Eugene Shekita, Bor-Yiing
    Su. Scaling Distributed Machine Learning with the Parameter Server. In
    Operating Systems Design and Implementation (OSDI), 2014
  2. Mu Li, Dave Andersen, Alex Smola, and Kai
    Yu. Communication Efficient Distributed Machine Learning with the Parameter Server. In
    Neural Information Processing Systems (NIPS), 2014