From cd94f84088b4a60f19a6035a0d3a475be1550157 Mon Sep 17 00:00:00 2001 From: Peng Wu Date: Wed, 27 Jul 2011 19:02:50 +0800 Subject: fixes estimate.py --- estimate.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/estimate.py b/estimate.py index ef5c40a..7b07089 100755 --- a/estimate.py +++ b/estimate.py @@ -107,8 +107,8 @@ def gatherModels(path, indexname): raise utils.EpochError('Unknown Error:\n' + \ 'Try re-run estimate.\n') avg_lambda = status['EstimateScore'] - line = subdir + '#' + onefile + '#' + avg_lambda - indexfile.writelines([line]) + line = subdir + '#' + onefile + '#' + str(avg_lambda) + indexfile.writelines([line, os.linesep]) #record written elif onefile.endswith(config.getStatusPostfix()): pass @@ -147,8 +147,8 @@ def sortModels(indexname, sortedindexname): sortedindexfile = open(sortedindexname, 'w') for record in records: (subdir, modelname, score) = record - line = subdir + '#' + modelname + '#' + score - sortedindexfile.writelines([line]) + line = subdir + '#' + modelname + '#' + str(score) + sortedindexfile.writelines([line, os.linesep]) sortedindexfile.close() #end processing -- cgit