forked from tdwojak/Python2018
Task 05 lab04 ready
This commit is contained in:
parent
d0595e3128
commit
076f5e462b
14
labs04/task05.py
Normal file
14
labs04/task05.py
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
import glob
|
||||||
|
import os
|
||||||
|
|
||||||
|
scores_files = glob.glob('./scores/model.iter*[0-9].npz.bleu')
|
||||||
|
max_result = { 'path': '', 'score': 0.0 }
|
||||||
|
|
||||||
|
for f in scores_files:
|
||||||
|
read_file = open(f, 'r').read().split()
|
||||||
|
result = float(read_file[2][:-1])
|
||||||
|
if(result > max_result['score']):
|
||||||
|
max_result['score'] = result
|
||||||
|
max_result['path'] = f
|
||||||
|
|
||||||
|
print(os.path.abspath(max_result['path']))
|
Loading…
Reference in New Issue
Block a user