diff options
author | Peng Wu <alexepico@gmail.com> | 2011-07-27 19:02:50 +0800 |
---|---|---|
committer | Peng Wu <alexepico@gmail.com> | 2011-07-27 19:02:50 +0800 |
commit | cd94f84088b4a60f19a6035a0d3a475be1550157 (patch) | |
tree | ee72e9de1bdb76abb27ba2b19727f67942808932 /estimate.py | |
parent | c676243f85f22ace3ca18dcb07e79db2b133f21c (diff) | |
download | trainer-cd94f84088b4a60f19a6035a0d3a475be1550157.tar.gz trainer-cd94f84088b4a60f19a6035a0d3a475be1550157.tar.xz trainer-cd94f84088b4a60f19a6035a0d3a475be1550157.zip |
fixes estimate.py
Diffstat (limited to 'estimate.py')
-rwxr-xr-x | estimate.py | 8 |
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 |