Unverified Commit 4fa1cd99 authored by Nicolas Patry's avatar Nicolas Patry Committed by GitHub
Browse files

Fixing the test (warnings was incorrect.) (#13278)

parent 6b586ed1
...@@ -281,7 +281,7 @@ class TokenClassificationPipeline(Pipeline): ...@@ -281,7 +281,7 @@ class TokenClassificationPipeline(Pipeline):
AggregationStrategy.AVERAGE, AggregationStrategy.AVERAGE,
AggregationStrategy.MAX, AggregationStrategy.MAX,
}: }:
warnings.warn(UserWarning, "Tokenizer does not support real words, using fallback heuristic") warnings.warn("Tokenizer does not support real words, using fallback heuristic", UserWarning)
is_subword = sentence[start_ind - 1 : start_ind] != " " if start_ind > 0 else False is_subword = sentence[start_ind - 1 : start_ind] != " " if start_ind > 0 else False
if int(input_ids[idx]) == self.tokenizer.unk_token_id: if int(input_ids[idx]) == self.tokenizer.unk_token_id:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment