forked from VowpalWabbit/vowpal_wabbit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into active_factor
- Loading branch information
Showing
15 changed files
with
69 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,38 @@ | ||
#!/bin/bash | ||
mapper=`printenv mapred_task_id | cut -d "_" -f 5` | ||
echo $mapper > /dev/stderr | ||
rm -f temp.cache | ||
echo 'Starting training' > /dev/stderr | ||
echo $1 > /dev/stderr | ||
date +"%F %T Start training mapper=$mapper" > /dev/stderr | ||
vwcmd="./vw -b 24 --total $mapred_map_tasks --node $mapper --cache_file temp.cache --span_server $mapreduce_job_submithost --loss_function=logistic" | ||
mapred_job_id=`echo $mapred_job_id | tr -d 'job_'` | ||
gdcmd="./vw -b 24 --total $mapred_map_tasks --node $mapper --unique_id $mapred_job_id --cache_file temp.cache --passes 1 --regularization=1 --adaptive --exact_adaptive_norm -d /dev/stdin -f tempmodel --span_server $mapreduce_job_submithost --loss_function=logistic" | ||
gdcmd="$vwcmd --unique_id $mapred_job_id --passes 1 --adaptive --exact_adaptive_norm -d /dev/stdin -f tempmodel" | ||
mapred_job_id=`expr $mapred_job_id \* 2` #create new nonce | ||
bfgscmd="./vw -b 24 --total $mapred_map_tasks --node $mapper --unique_id $mapred_job_id --cache_file temp.cache --bfgs --mem 5 --passes 20 --regularization=1 --span_server $mapreduce_job_submithost -f model -i tempmodel --loss_function=logistic" | ||
if [ "$mapper" == '000000' ] | ||
then | ||
bfgscmd="$vwcmd --unique_id $mapred_job_id --bfgs --mem 5 --passes 20 -f model -i tempmodel" | ||
if [ "$mapper" == '000000' ]; then | ||
$gdcmd > mapperout 2>&1 | ||
if [ $? -ne 0 ] | ||
then | ||
exit 1 | ||
fi | ||
if [ $? -ne 0 ]; then | ||
date +"%F %T Failed mapper=$mapper cmd=$gdcmd" > /dev/stderr | ||
exit 1 | ||
fi | ||
$bfgscmd >> mapperout 2>&1 | ||
outfile=$mapred_output_dir/model | ||
mapperfile=$mapred_output_dir/mapperout | ||
found=`hadoop fs -lsr | grep $mapred_output_dir | grep mapperout` | ||
if [ "$found" != "" ] | ||
then | ||
hadoop fs -rmr $mapperfile | ||
if [ "$found" != "" ]; then | ||
hadoop fs -rm -r $mapperfile | ||
fi | ||
found=`hadoop fs -lsr | grep $mapred_output_dir | grep model` | ||
if [ "$found" != "" ] | ||
then | ||
hadoop fs -rmr $outfile | ||
if [ "$found" != "" ]; then | ||
hadoop fs -rm -r $outfile | ||
fi | ||
echo $outfile > /dev/stderr | ||
date +"%F %T outfile=$outfile" > /dev/stderr | ||
hadoop fs -put model $outfile | ||
hadoop fs -put mapperout $mapperfile | ||
else | ||
$gdcmd | ||
if [ $? -ne 0 ] | ||
then | ||
exit 1 | ||
if [ $? -ne 0 ]; then | ||
date +"%F %T Failed mapper=$mapper cmd=$gdcmd" > /dev/stderr | ||
exit 1 | ||
fi | ||
$bfgscmd | ||
fi | ||
date +"%F %T Done mapper=$mapper" > /dev/stderr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
test/train-sets/ref/sequencespan_data.nonldf.test-beam20.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1 @@ | ||
only testing | ||
Num weight bits = 18 | ||
learning rate = 10 | ||
initial_t = 1 | ||
power_t = 0.5 | ||
predictions = sequencespan_data.predict | ||
switching to BILOU encoding for sequence span labeling | ||
using no cache | ||
Reading datafile = train-sets/sequencespan_data | ||
num sources = 1 | ||
average since example example current current current | ||
loss last counter weight label predict features | ||
average since sequence example current label current predicted current cur cur predic. examples | ||
loss last counter weight sequence prefix sequence prefix features pass pol made gener. | ||
10.000000 10.000000 1 1.000000 [2 1 1 2 2 1 6 7 7 ..] [2 6 1 6 2 1 6 4 5 ..] 0 0 0 1192 0 | ||
|
||
finished run | ||
number of examples per pass = 1 | ||
passes used = 1 | ||
weighted example sum = 1 | ||
weighted label sum = 0 | ||
average loss = 10 | ||
best constant = -inf | ||
total feature number = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters