fix bug
This commit is contained in:
parent
4b841a6b35
commit
caa0eda27d
|
@ -119,10 +119,10 @@ def preprocess_dataset(
|
|||
print("input_ids:\n{}".format(example["input_ids"]))
|
||||
print("inputs:\n{}".format(tokenizer.decode(example["input_ids"], skip_special_tokens=False)))
|
||||
print("label_ids:\n{}".format(example["labels"]))
|
||||
print("labels:\n{}".format(
|
||||
tokenizer.decode([d if d != IGNORE_INDEX else tokenizer.pad_token_id for d in example["labels"]],
|
||||
skip_special_tokens=False)
|
||||
))
|
||||
print("labels:\n{}".format(''.join([
|
||||
tokenizer.decode(d, skip_special_tokens=False)
|
||||
if d != IGNORE_INDEX else '-100' for d in example["labels"]
|
||||
])))
|
||||
|
||||
def print_pairwise_dataset_example(example):
|
||||
print("accept_ids:\n{}".format(example["accept_ids"]))
|
||||
|
|
Loading…
Reference in New Issue