change toolkit to rabitlearn

This commit is contained in:
tqchen 2015-01-16 10:45:54 -08:00
parent f5245c615c
commit c798fc2a29
9 changed files with 50 additions and 39 deletions

View File

@ -8,29 +8,19 @@ rabit is a light weight library that provides a fault tolerant interface of Allr
Features
====
* Portable library
- Rabit is a library instead of a framework, a program only needs to link the library to run.
* Flexibility in programming
All these features comes from the facts about small rabbit:)
* Portable: rabit is light weight and runs everywhere
- Rabit is a library instead of a framework, a program only needs to link the library to run
- Rabit only replies on a mechanism to start program, which was provided by most framework
- You can port rabit programs easily to many frameworks, including Hadoop, MPI without changing your code
* Scalable and Flexible: rabit runs fast
* Rabit program use Allreduce to communicate, and do not suffer the cost between iterations of MapReduce abstraction.
- Programs can call rabit functions in any order, as opposed to frameworks where callbacks are offered and called by the framework, i.e. inversion of control principle.
- Programs persist over all the iterations, unless they fail and recover.
* Fault tolerance
* Fault Tolerant: rabit dig burrows to avoid disasters
- Rabit programs can recover the model and results using synchronous function calls.
* MPI compatible
- Code that uses the rabit interface also compiles with existing MPI compilers
- Users can use MPI Allreduce with no code modification
Use Rabit
====
* Type make in the root folder will compile the rabit library in lib folder
* Add lib to the library path and include to the include path of compiler
Design Notes
====
* Rabit is designed for algorithms that replicate the same global model across nodes, while each node operates on a local partition of the data.
* The collection of global statistics is done using Allreduce
Design Goals
====
* rabit should run fast
* rabit should be light weight
* rabit should safely dig burrows to avoid disasters

17
rabit-learn/README.md Normal file
View File

@ -0,0 +1,17 @@
Rabit-Learn
====
This folder contains implementation of distributed machine learning algorithm using rabit.
It also contain links to the Machine Learning packages that uses rabit.
* Contribution of toolkits, examples, benchmarks is more than welcomed!
Toolkits
====
* [KMeans Clustering](kmeans)
* [XGBoost: eXtreme Gradient Boosting](https://github.com/tqchen/xgboost/tree/unity/multi-node)
- xgboost is a very fast boosted tree(also known as GBDT) library, that can run more than
10 times faster than existing packages
- Rabit carries xgboost to distributed enviroment, inheritating all the benefits of xgboost
single node version, and scale it to even larger problems

View File

@ -1,29 +1,19 @@
# this is the common build script for rabit programs
# you do not have to use it
export CC = gcc
export CXX = g++
export MPICXX = mpicxx
export LDFLAGS= -pthread -lm -L../lib
export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas -fPIC -I../include
export LDFLAGS= -pthread -lm -L../../lib
export CFLAGS = -Wall -O3 -msse2 -Wno-unknown-pragmas -fPIC -I../../include -I../common
# specify tensor path
BIN = kmeans.rabit
MOCKBIN= kmeans.mock
MPIBIN = kmeans.mpi
# objectives that makes up rabit library
OBJ = kmeans.o
.PHONY: clean all lib
all: $(BIN)
.PHONY: clean all lib mpi
all: $(BIN) $(MOCKBIN)
mpi: $(MPIBIN)
lib:
cd ..;make lib/librabit.a lib/librabit_mock.a; cd -
cd ../..;make lib/librabit.a lib/librabit_mock.a; cd -
libmpi:
cd ..;make lib/librabit_mpi.a;cd -
kmeans.o: kmeans.cc ../src/*.h
# we can link against MPI version to get use MPI
kmeans.rabit: kmeans.o lib
kmeans.mock: kmeans.o lib
kmeans.mpi: kmeans.o libmpi
cd ../..;make lib/librabit_mpi.a;cd -
$(BIN) :
$(CXX) $(CFLAGS) -o $@ $(filter %.cpp %.o %.c %.cc, $^) $(LDFLAGS) -lrabit

View File

@ -0,0 +1,16 @@
# specify tensor path
BIN = kmeans.rabit
MOCKBIN= kmeans.mock
MPIBIN = kmeans.mpi
# objectives that makes up rabit library
OBJ = kmeans.o
# common build script for programs
include ../common.mk
# dependenies here
kmeans.rabit: kmeans.o lib
kmeans.mock: kmeans.o lib
kmeans.mpi: kmeans.o libmpi
kmeans.o: kmeans.cc ../../src/*.h

2
toolkit/.gitignore vendored
View File

@ -1,2 +0,0 @@
kmeans
*.mpi