Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _extract_answers(self, context):
max_length=32,
)

dec = [self.ans_tokenizer.decode(ids, skip_special_tokens=False) for ids in outs]
dec = [self.ans_tokenizer.decode(ids, skip_special_tokens=True) for ids in outs]
answers = [item.split('<sep>') for item in dec]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'm wondering if you set skip_special_tokens=True, will item.split('<sep>') still work? Will <sep> be skipped in decode?

answers = [i[:-1] for i in answers]

Expand Down