You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by jm...@apache.org on 2007/02/21 14:38:55 UTC

svn commit: r510008 - /spamassassin/trunk/masses/runGA

Author: jm
Date: Wed Feb 21 05:38:54 2007
New Revision: 510008

URL: http://svn.apache.org/viewvc?view=rev&rev=510008
Log:
we should use the saved test log when generating stats, instead of assuming what's currently in spam-test.log is still usable

Modified:
    spamassassin/trunk/masses/runGA

Modified: spamassassin/trunk/masses/runGA
URL: http://svn.apache.org/viewvc/spamassassin/trunk/masses/runGA?view=diff&rev=510008&r1=510007&r2=510008
==============================================================================
--- spamassassin/trunk/masses/runGA (original)
+++ spamassassin/trunk/masses/runGA Wed Feb 21 05:38:54 2007
@@ -19,13 +19,16 @@
 	LOGDIR="$LOGDIR-$NOTE"
 fi
 
+if [ "x$1" = "x" ]; then
+
+# -------------------------------------------------------------------------
+# Initial rescoring
+
 if [ ! -f "ORIG/ham-$NAME.log" -o ! -f "ORIG/spam-$NAME.log" ]; then
 	echo "Couldn't find logs for $NAME" >&2
 	exit 1
 fi
 
-if [ "x$1" = "x" ]; then
-
 (	# log this
 
 set -x	# trace commands to the log
@@ -122,13 +125,28 @@
 
 else
 
+# -------------------------------------------------------------------------
 # Statistics generation, once everyone likes the scores
 
+
+  # use the test logs we saved
+  testlogh=$LOGDIR/NSBASE/ham-test.log
+  testlogs=$LOGDIR/SPBASE/spam-test.log
+
+  if [ ! -f "$testlogh" -o ! -f "$testlogs" ]; then
+    echo "Couldn't find logs for $NAME: $testlogh $testlogs" >&2
+    exit 1
+  fi
+
+  rm -f ham-test.log spam-test.log
+  ln -s $testlogh ham-test.log
+  ln -s $testlogs spam-test.log
+
   [ $KILL_SANDBOX_RULES = y ] && rm ../rules/70_sandbox.cf
 
   # This needs to have ../rules/50_scores.cf in place first ...
   echo "[gen test results for set $SCORESET]"
-  perl ./fp-fn-statistics --ham ham-test.log --spam spam-test.log \
+  perl ./fp-fn-statistics --ham $testlogh --spam $testlogs \
       --scoreset $SCORESET --cffile=../rules | tee $LOGDIR/test
 
   echo "[STATISTICS file generation for set $SCORESET]"