fixing build for predict

This commit is contained in:
Bryan Marcus McCann 2018-08-16 19:48:08 +00:00
parent 0e33e91dca
commit a35c7b8f5c
1 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ def run(args, field, val_sets, model):
for i, pp in enumerate(p): for i, pp in enumerate(p):
if 'sql' in task: if 'sql' in task:
wikisql_id = int(batch.wikisql_id[i]) wikisql_id = int(batch.wikisql_id[i])
wikisql_ids = wikisql_ids if wikisql_ids is not None else []
wikisql_ids.append(wikisql_id) wikisql_ids.append(wikisql_id)
prediction_file.write(pp + '\n') prediction_file.write(pp + '\n')
predictions.append(pp) predictions.append(pp)