Skip to content

KeyError when using Roberta #2

@mxnno

Description

@mxnno

If you want to use --model roberta, there will be a KeyError in the class BaseInstance in dataset,py, because the Roberta Tokenizer does not have token_type_ids.
Small workaround for single input sentences:
Replace self.segments = embed_data['token_type_ids'] with `self.segments = [0] * len(embed_data['input_ids'])``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions