Skip to content

Commit dc4907e

Browse files
committed
More fixes
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
1 parent 83b1091 commit dc4907e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/transformers/pipelines/fill_mask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ def postprocess(self, model_outputs, top_k=5, target_ids=None):
188188
return result[0]
189189
return result
190190

191-
def get_target_ids(self, targets, top_k=None):
191+
def get_target_ids(self, targets):
192192
if isinstance(targets, str):
193193
targets = [targets]
194194
try:
@@ -238,7 +238,7 @@ def _sanitize_parameters(self, top_k=None, targets=None, tokenizer_kwargs=None):
238238
postprocess_params = {}
239239

240240
if targets is not None:
241-
target_ids = self.get_target_ids(targets, top_k)
241+
target_ids = self.get_target_ids(targets)
242242
postprocess_params["target_ids"] = target_ids
243243

244244
if top_k is not None:

src/transformers/pipelines/table_question_answering.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ def _sanitize_parameters(self, sequential=None, padding=None, truncation=None, *
381381

382382
return preprocess_params, forward_params, {}
383383

384-
def preprocess(self, pipeline_input, sequential=None, padding=True, truncation=None):
384+
def preprocess(self, pipeline_input, padding=True, truncation=None):
385385
if truncation is None:
386386
if self.type == "tapas":
387387
truncation = "drop_rows_to_fit"

0 commit comments

Comments
 (0)