summaryrefslogtreecommitdiffstats
path: root/estimate.py
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2011-07-27 19:02:50 +0800
committerPeng Wu <alexepico@gmail.com>2011-07-27 19:02:50 +0800
commitcd94f84088b4a60f19a6035a0d3a475be1550157 (patch)
treeee72e9de1bdb76abb27ba2b19727f67942808932 /estimate.py
parentc676243f85f22ace3ca18dcb07e79db2b133f21c (diff)
downloadtrainer-cd94f84088b4a60f19a6035a0d3a475be1550157.tar.gz
trainer-cd94f84088b4a60f19a6035a0d3a475be1550157.tar.xz
trainer-cd94f84088b4a60f19a6035a0d3a475be1550157.zip
fixes estimate.py
Diffstat (limited to 'estimate.py')
-rwxr-xr-xestimate.py8
1 files 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