Giter VIP home page Giter VIP logo

async-easgd's Introduction

Async-EASGD

This Framework currently holds an implementation of Asynchronous Elasting Averaging SGD

This implementation can be modified as a framework for implementing other asynchronous distributed algorithms for Deep Learning. This framework support heterogeneous devices.

The communication is based on a TCP handshake mechanism using torch-ipc messages.

alt tag

Install

Dependencies:

  1. torch-dataset
  2. torch-ipc

Open a terminal and choose the wanted directory:

git clone https://github.com/shanlior/Async-EASGD
luarocks make

Or directly:

luarocks install https://raw.githubusercontent.com/shanlior/Async-EASGD/master/async-easgd-scm-1.rockspec

Server Node

The server node is used for communicating with the client nodes.

The server node is holding the center node: Its sole purpose is to send the most updated version to the clients, and retrieve the new updates. The server also sends the center node to the tester.

An implementation of the server node can be found here.

Client Node

The client nodes are used for training the net.

Every determined number of iterations, the client node contacts the server in order to do the elastic averaging step - and update the center node.

An implementation of the client node can be found here.

Tester Node

The tester node is used for testing the net on the dataset. Every determined number of iterations the tester node gets the center node from the server. The tester is seperated from the server in order to be able to do fast calculations over a GPU, while the server itself works better as a CPU node.

An implementation of the tester node can be found here.

Example

A working example can be found here.

The example is a classification task on the Cifar-10 dataset. The dataset is loaded using torch-dataset repository.

Executing the example is done by running:

./AsyncEASGD.sh [port]

Note that in order to use several machines, this package and all of its dependencies must be installed on each machine.

In order to run a client node on a remote machine, use this syntax on the machine that holds the server node:

ssh -n -f [user]@[host] "sh -c 'cd [script dir] ; nohup /home/lior/torch/install/bin/th client.lua [params] > /dev/null 2>&1 &'"

or more specific example, using this client node as a third node:

ssh -n -f [user]@[host] "sh -c 'cd [Async-EASGD examples dir] ; nohup /home/lior/torch/install/bin/th client.lua --cuda --gpu 1 --numNodes $numNodes --nodeIndex 3 --batchSize 128 --port $port --host $serverip > /dev/null 2>&1 &'"

In order to run a script on a remote machine, use this syntax on the machine that holds the server node:

ssh -n -f [user]@[host] "sh -c 'cd [scriptDir] ; nohup ./[script] > /dev/null 2>&1 &'"

License

Licensed under the Apache License, Version 2.0. See LICENSE file.

async-easgd's People

Contributors

eladhoffer avatar shanlior avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.