fix error info
This commit is contained in:
parent
469f859161
commit
7e8655c8b5
|
@ -147,7 +147,7 @@ class Template:
|
||||||
elif isinstance(elem, dict):
|
elif isinstance(elem, dict):
|
||||||
token_ids = token_ids + [tokenizer.convert_tokens_to_ids(elem.get("token"))]
|
token_ids = token_ids + [tokenizer.convert_tokens_to_ids(elem.get("token"))]
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError
|
raise ValueError("Input must be string or dict[str, str], got {}".format(type(elem)))
|
||||||
|
|
||||||
return token_ids
|
return token_ids
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue