1
0
forked from tdwojak/Python2017
Python2017/labs03/task05.py
2017-12-16 09:14:44 +01:00

17 lines
346 B
Python

import glob
path = 'scores/model.iter*.npz.bleu'
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(",")])
if num > 0:
max_num = num
max_num_file = file
f.close()
print(max_num_file)