Skip to content

Commit 576fe7d

Browse files
committed
update linear method
1 parent 3c8eb84 commit 576fe7d

28 files changed

+163
-167
lines changed

Makefile

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,29 @@ INCPATH = -I./src -I$(THIRD_PATH)/include
1616
CFLAGS = -std=c++0x $(WARN) $(OPT) $(INCPATH)
1717
LDFLAGS += ./build/libps.a $(THIRD_LIB) -lpthread -lrt
1818

19-
all: ps build/hello
19+
all: ps app
2020
clean:
2121
rm -rf build
2222

2323
ps: build/libps.a
24+
app: build/ps
2425

2526
build/hello: build/app/hello_world/main.o build/libps.a
2627
$(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
2728

29+
2830
sys_srcs = $(wildcard src/*/*.cc)
2931
sys_protos = $(wildcard src/*/proto/*.proto)
3032
sys_objs = $(patsubst src/%.proto, build/%.pb.o, $(sys_protos)) \
3133
$(patsubst src/%.cc, build/%.o, $(sys_srcs))
3234
build/libps.a: $(sys_objs)
3335
ar crv $@ $?
3436

37+
app_objs = $(addprefix build/app/, main/proto/app.pb.o linear_method/linear.o linear_method/proto/linear.pb.o)
38+
39+
build/ps: build/app/main/main.o $(app_objs) build/libps.a
40+
echo $(app_objs)
41+
$(CC) $(CFLAGS) $< $(app_objs) $(LDFLAGS) -o $@
3542

3643
build/%.o: src/%.cc
3744
@mkdir -p $(@D)
@@ -42,8 +49,3 @@ build/%.o: src/%.cc
4249
${THIRD_PATH}/bin/protoc --cpp_out=./src --proto_path=./src $<
4350

4451
-include build/*/*.d
45-
46-
# test :
47-
# make -C src test -j8
48-
# clean :
49-
# make -C src clean

README.org

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ See more details in [[https://github.com/mli/parameter_server/wiki/setup][wiki]]
1919

2020
*Run*
2121

22-
See examples in [[config/rcv1]]. More information are in the [[https://github.com/mli/parameter_server/wiki][wiki]].
22+
See examples in [[example/rcv1]]. More information are in the [[https://github.com/mli/parameter_server/wiki][wiki]].

example/ctr/batch_l1lr.conf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# configuration to run l1-regularized logistic regression on the ctr dataset
2-
app_name: "ctr"
3-
42
linear_method {
53

64
training_data {

example/rcv1/batch_l1lr.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
app_name: "rcv1"
21
linear_method {
32

43
training_data {

example/rcv1/eval_batch.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
app_name: "eval_rcv1"
21
linear_method {
32

43
validation_data {

example/rcv1/eval_online.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
app_name: "eval_rcv1"
21
linear_method {
32

43
validation_data {

example/rcv1/online_l1lr.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# configuration for running l1-regularized logistic regression on data RCV1
2-
32
linear_method {
43
training_data {
54
format: TEXT

script/local.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
dir=`dirname "$0"`
1010
cd ${dir}
1111

12-
killall -q ps
12+
# killall -q ${bin}
1313

1414
bin=$1
1515
shift

src/app/linear_method/BUILD

Lines changed: 0 additions & 6 deletions
This file was deleted.

src/app/linear_method/async_sgd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "util/evaluation.h"
55
#include "parameter/kv_vector.h"
66
#include "parameter/kv_store.h"
7-
#include "linear_method/learning_rate.h"
7+
#include "app/linear_method/learning_rate.h"
88
namespace PS {
99
namespace LM {
1010

0 commit comments

Comments
 (0)