Update bart.py
This commit is contained in:
parent
0e8d66f6c7
commit
73fe77bb72
|
@ -26,14 +26,14 @@ def preprocess_function(raw_example, **kwargs):
|
|||
example = InputExample(**raw_example)
|
||||
|
||||
|
||||
try:
|
||||
|
||||
example = verbalizer.wrap_one_example(example)
|
||||
example, other = template.wrap_one_example(example)
|
||||
input_sentence = tokenizer_wrapper.merge_wrapped_example(example)
|
||||
model_inputs = tokenizer(input_sentence, max_length=256,
|
||||
padding="max_length", truncation=True)
|
||||
except:
|
||||
from IPython import embed; embed(header="Therer")
|
||||
|
||||
|
||||
|
||||
with tokenizer.as_target_tokenizer():
|
||||
label = tokenizer(other['tgt_text']).input_ids
|
||||
|
|
Loading…
Reference in New Issue