28ca7be add linear readme ca4b20f add linear readme 1133628 add linear readme 6a11676 update docs a607047 Update build.sh 2c1cfd8 complete yarn 4f28e32 change formater 2fbda81 fix stdin input 3258bcf checkin yarn master 67ebf81 allow setup from env variables 9b6bf57 fix hdfs 395d5c2 add make system 88ce767 refactor io, initial hdfs file access need test 19be870 chgs a1bd3c6 Merge branch 'master' of ssh://github.com/tqchen/rabit 1a573f9 introduce input split 29476f1 fix timer issue git-subtree-dir: subtree/rabit git-subtree-split: 28ca7becbdf6503e6b1398588a969efb164c9701
21 lines
638 B
Bash
Executable File
21 lines
638 B
Bash
Executable File
#!/bin/bash
|
|
if [ "$#" -lt 3 ];
|
|
then
|
|
echo "Usage: <nworkers> <path_in_HDFS> [param=val]"
|
|
exit -1
|
|
fi
|
|
|
|
# put the local training file to HDFS
|
|
hadoop fs -rm -r -f $2/data
|
|
hadoop fs -rm -r -f $2/mushroom.linear.model
|
|
hadoop fs -mkdir $2/data
|
|
hadoop fs -put ../data/agaricus.txt.train $2/data
|
|
|
|
# submit to hadoop
|
|
../../tracker/rabit_hadoop_streaming.py -n $1 --vcores 1 -i $2/data/agaricus.txt.train -o $2/mushroom.linear.model linear.rabit stdin model_out=stdout "${*:3}"
|
|
|
|
# get the final model file
|
|
hadoop fs -get $2/mushroom.linear.model/part-00000 ./linear.model
|
|
|
|
./linear.rabit ../data/agaricus.txt.test task=pred model_in=linear.model
|