Skip to content

Commit 87b2f9a

Browse files
committed
Small diff to help debug by having better error message
1 parent 1a15292 commit 87b2f9a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

code/rnnslu.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,11 +126,14 @@ def get_perf(filename, folder):
126126
stdout=subprocess.PIPE)
127127

128128
stdout, _ = proc.communicate(''.join(open(filename).readlines()))
129+
out = None
129130
for line in stdout.split('\n'):
130131
if 'accuracy' in line:
131132
out = line.split()
132133
break
133-
134+
# To help debug
135+
if out is None:
136+
print stdout.split('\n')
134137
precision = float(out[6][:-2])
135138
recall = float(out[8][:-2])
136139
f1score = float(out[10])

0 commit comments

Comments
 (0)