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:
authorJohn <jl@hunch.net>2014-07-11 03:18:22 +0400
committerJohn <jl@hunch.net>2014-07-11 03:18:22 +0400
commitcdd29b15bad6afe2c2b7f7fa1646f41bbbd33679 (patch)
tree8a1c3e56235ce5084b28ba885e01ec46a98050a5
parentd21b1ae856c9b268b40054b8387f646e2ec09444 (diff)
parentbaccce43303bce6d8d2f026dc895a7a74a4946ef (diff)
Merge pull request #339 from arielf/master
RunTests improvement + vw-varinfo undefined var fix
-rwxr-xr-xtest/RunTests8
-rwxr-xr-xutl/vw-varinfo5
2 files changed, 11 insertions, 2 deletions
diff --git a/test/RunTests b/test/RunTests
index 7f498c16..b89ee3cf 100755
--- a/test/RunTests
+++ b/test/RunTests
@@ -402,8 +402,12 @@ sub diff_lenient_float($$) {
while (<$sdiff>) {
chomp;
my ($line1, $line2) = split(/\s*\|\s*/, $_);
- unless (defined $line2) {
- warn "$0: test $TestNo: $outfile: no data. Can't compare\n";
+ unless (defined($line1) && defined($line2)) {
+ my $save_diff_file = "test-$TestNo.lenient-diff";
+ warn "$0: test $TestNo: $tmpf: line $.: fuzzy-match missing data on one of the sides. Can't compare\n$_\n";
+ warn "$0: test $TestNo: saving lenient diff in '$save_diff_file' for later inspection\n";
+ close $sdiff;
+ rename($tmpf, $save_diff_file);
return 1;
}
v(3, "line1: %s\n", $line1);
diff --git a/utl/vw-varinfo b/utl/vw-varinfo
index 9901d3e5..37860775 100755
--- a/utl/vw-varinfo
+++ b/utl/vw-varinfo
@@ -617,6 +617,11 @@ sub print_feature_report($$$$@) {
if ($opt_O =~ /^a/i) {
$normalized_score = abs($normalized_score);
}
+
+ # On the fly generated (e.g. -q crossed features) don't have a min/max
+ $FeatureMin{$f} = 0 unless (exists $FeatureMin{$f});
+ $FeatureMax{$f} = 0 unless (exists $FeatureMax{$f});
+
printf "%-*s\t%10u %8.2f %8.2f %+9.4f %9.2f%%\n",
$max_flen, $f,
$Feature2Hash{$f},