Skip to content

Commit e9a5ae8

Browse files
cyyeverRocketknight1
authored andcommitted
More fixes
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
1 parent 32aaa30 commit e9a5ae8

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
@@ -163,7 +163,7 @@ def postprocess(self, model_outputs, top_k=5, target_ids=None):
163163
return result[0]
164164
return result
165165

166-
def get_target_ids(self, targets, top_k=None):
166+
def get_target_ids(self, targets):
167167
if isinstance(targets, str):
168168
targets = [targets]
169169
try:
@@ -213,7 +213,7 @@ def _sanitize_parameters(self, top_k=None, targets=None, tokenizer_kwargs=None):
213213
postprocess_params = {}
214214

215215
if targets is not None:
216-
target_ids = self.get_target_ids(targets, top_k)
216+
target_ids = self.get_target_ids(targets)
217217
postprocess_params["target_ids"] = target_ids
218218

219219
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
@@ -306,7 +306,7 @@ def _sanitize_parameters(self, sequential=None, padding=None, truncation=None, *
306306

307307
return preprocess_params, forward_params, {}
308308

309-
def preprocess(self, pipeline_input, sequential=None, padding=True, truncation=None):
309+
def preprocess(self, pipeline_input, padding=True, truncation=None):
310310
if truncation is None:
311311
if self.type == "tapas":
312312
truncation = "drop_rows_to_fit"

0 commit comments

Comments
 (0)