Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel faigon <github.2009@yendor.com>2014-01-04 04:18:26 +0400
committerariel faigon <github.2009@yendor.com>2014-01-04 04:18:26 +0400
commit43c3bb46e660d65ea054cebad041b76994993d71 (patch)
tree89dba6a66394e0a9c2c1ce2126d293f810101d44 /test/RunTests
parent13ffa9fbaf4a2ef124e2d6878fc5c1513b0c19d7 (diff)
Add tests for new --progress option
Diffstat (limited to 'test/RunTests')
-rwxr-xr-xtest/RunTests30
1 files changed, 19 insertions, 11 deletions
diff --git a/test/RunTests b/test/RunTests
index db987e20..72806886 100755
--- a/test/RunTests
+++ b/test/RunTests
@@ -126,9 +126,9 @@ sub init() {
getopts('wcdDefyE:ov:V') || usage();
$opt_v = 0 unless (defined $opt_v and $opt_v);
- print STDERR "testing $^O ";
+ print STDERR "testing $^O ";
if ($^O =~ /MSWin/i) {
- v(1, "OS is $^O\n");
+ v(1, "OS is $^O\n");
# On MS Windows we need to change paths to external executables
# Assumes cygwin is installed
$ENV{'PATH'} .= ':/cygdrive/c/cygwin/bin';
@@ -137,7 +137,7 @@ sub init() {
$Cat = 'c:\cygwin\bin\cat.exe';
}
elsif ($^O =~ /cygwin/i){
- v("OS is $^O\n");
+ v("OS is $^O\n");
# On MS Windows we need to change paths to external executables
# Assumes cygwin is installed
$ENV{'PATH'} .= ':/cygdrive/c/cygwin/bin';
@@ -289,8 +289,8 @@ sub lenient_array_compare($$) {
next if ($word1 eq $word2);
# There's some difference, is it significant?
- return 1 unless (looks_like_number($word1));
- return 1 unless (looks_like_number($word2));
+ return 1 unless (looks_like_number($word1));
+ return 1 unless (looks_like_number($word2));
my $delta = abs($word1 - $word2);
@@ -449,7 +449,7 @@ sub check_for_time_regression() {
my ($user0, $system0, $cuser0, $csystem0);
my ($user1, $system1, $cuser1, $csystem1) = times;
$overall_time1 = $cuser1 + $csystem1;
-
+
if (-e $LastTimeFile) {
($user0, $system0, $cuser0, $csystem0) = read_times($LastTimeFile);
if (!(defined $csystem0) or !(defined $cuser0)) {
@@ -587,7 +587,7 @@ run_tests();
# The next (output) line-items are reference files to compare outputs to:
# The expected (reference file) standard output
# The expected (reference file) standard error
-# The expected (reference file) for predictions (-p ...)
+# The expected (reference file) for predictions (-p ...)
# [The above reference files can come in any order.
# Their 'type' is determined by their extensions:
# .stdout .stderr .predict
@@ -725,7 +725,7 @@ __DATA__
train-sets/ref/active-simulation.t24.stderr
# Test 25: bagging -- training regressor
-{VW} -d train-sets/0002.dat -f models/bs.reg.model --bs 4 -p bs.reg.predict
+{VW} -d train-sets/0002.dat -f models/bs.reg.model --bs 4 -p bs.reg.predict
train-sets/ref/bs.reg.stderr
train-sets/ref/bs.reg.predict
@@ -735,7 +735,7 @@ __DATA__
train-sets/ref/bs.prreg.predict
# Test 27: bagging -- binary classifiers
-{VW} -d train-sets/0001.dat -f models/bs.vote.model --bs 4 --bs_type vote -p bs.vote.predict
+{VW} -d train-sets/0001.dat -f models/bs.vote.model --bs 4 --bs_type vote -p bs.vote.predict
train-sets/ref/bs.vote.stderr
train-sets/ref/bs.vote.predict
@@ -751,7 +751,7 @@ __DATA__
# Test 30: train --l1 regularized model
{VW} -d train-sets/0001.dat -f models/mask.model --invert_hash mask.predict --l1 0.01
train-sets/ref/mask.stderr
-
+
# Test 31: train model using --feature_mask
{VW} -d train-sets/0001.dat --invert_hash remask.predict --feature_mask models/mask.model -f models/remask.model
train-sets/ref/remask.stderr
@@ -761,7 +761,7 @@ __DATA__
train-sets/ref/remask.final.stderr
# Test 33: train model for topk recommender
-{VW} -d train-sets/topk.vw -f topk.model -q MF --passes 100 --cache_file topk-train.cache -k --holdout_off
+{VW} -d train-sets/topk.vw -f topk.model -q MF --passes 100 --cache_file topk-train.cache -k --holdout_off
train-sets/ref/topk-train.stderr
# Test 34: train model for topk recommender
@@ -774,4 +774,12 @@ __DATA__
{VW} -k --passes 100 -c --holdout_off --constant 1000 -d train-sets/big-constant.dat
train-sets/ref/big-constant.stderr
+# Test 36: new option: --progress w/ integer arg
+{VW} -k -d train-sets/big-constant.dat --progress 10
+ train-sets/ref/big-constant-progress-10.stderr
+
+# Test 37: new-option: --progress w/ floating-point arg
+# + alternate short form (-P)
+{VW} -k -d train-sets/big-constant.dat -P 0.25
+ train-sets/ref/big-constant-progress-0.25.stderr