Skip to content

Commit

Permalink
fixes estimate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
epico committed Jul 27, 2011
1 parent c676243 commit cd94f84
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions estimate.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def gatherModels(path, indexname):
raise utils.EpochError('Unknown Error:\n' + \ raise utils.EpochError('Unknown Error:\n' + \
'Try re-run estimate.\n') 'Try re-run estimate.\n')
avg_lambda = status['EstimateScore'] avg_lambda = status['EstimateScore']
line = subdir + '#' + onefile + '#' + avg_lambda line = subdir + '#' + onefile + '#' + str(avg_lambda)
indexfile.writelines([line]) indexfile.writelines([line, os.linesep])
#record written #record written
elif onefile.endswith(config.getStatusPostfix()): elif onefile.endswith(config.getStatusPostfix()):
pass pass
Expand Down Expand Up @@ -147,8 +147,8 @@ def sortModels(indexname, sortedindexname):
sortedindexfile = open(sortedindexname, 'w') sortedindexfile = open(sortedindexname, 'w')
for record in records: for record in records:
(subdir, modelname, score) = record (subdir, modelname, score) = record
line = subdir + '#' + modelname + '#' + score line = subdir + '#' + modelname + '#' + str(score)
sortedindexfile.writelines([line]) sortedindexfile.writelines([line, os.linesep])
sortedindexfile.close() sortedindexfile.close()
#end processing #end processing


Expand Down

0 comments on commit cd94f84

Please sign in to comment.