forked from tdwojak/Python2017
commit
This commit is contained in:
parent
4f878a9849
commit
1664154717
@ -2,7 +2,7 @@ import glob
|
||||
|
||||
path = 'scores/model.iter*.npz.bleu'
|
||||
|
||||
for file in glob(path):
|
||||
for file in glob.glob(path):
|
||||
with open(file, 'r') as f:
|
||||
for line in f.readlines():
|
||||
num = float(line[line.find("=") + 1:line.find(",")])
|
||||
@ -11,7 +11,6 @@ path = 'scores/model.iter*.npz.bleu'
|
||||
max_num = num
|
||||
max_num_file = file
|
||||
|
||||
file.close()
|
||||
f.close()
|
||||
|
||||
print(max_num_file)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user