Skip to content

Commit

Permalink
Merge pull request huggingface#11 from stevezheng23/dev/zheng/quac
Browse files Browse the repository at this point in the history
fix issues in new quac-kd runner (cont.)
  • Loading branch information
stevezheng23 authored Oct 29, 2019
2 parents b8d0479 + bdb8e35 commit 4906c01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/run_quac_kd.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@

from transformers import AdamW, WarmupLinearSchedule

from utils_quac import (read_quac_examples, convert_examples_to_features,
RawResult, write_predictions, write_predictions_v2,
RawResultExtended, write_predictions_extended,
RawResultV2, _compute_softmax)
from utils_quac_kd import (read_quac_examples, convert_examples_to_features,
RawResult, write_predictions, write_predictions_v2,
RawResultExtended, write_predictions_extended,
RawResultV2, _compute_softmax)

# The follwing import is the official QuAC evaluation script (2.0).
# You can remove it from the dependencies if you are using this script outside of the library
Expand Down Expand Up @@ -335,7 +335,7 @@ def predict(args, model, tokenizer, prefix=""):
result = RawResultV2(unique_id = unique_id,
start_logits = to_list(outputs[0][i]),
end_logits = to_list(outputs[1][i]),
kd_end_logits = to_list(outputs[2][i]),
kd_start_logits = to_list(outputs[2][i]),
kd_end_logits = to_list(outputs[3][i]))
else:
result = RawResult(unique_id = unique_id,
Expand Down

0 comments on commit 4906c01

Please sign in to comment.