Skip to content

Commit

Permalink
Should return a tuple for serialization (#6061)
Browse files Browse the repository at this point in the history
  • Loading branch information
LysandreJik committed Jul 28, 2020
1 parent 7a68d40 commit 7214954
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/pipelines.py
Original file line number Diff line number Diff line change
Expand Up @@ -2122,6 +2122,6 @@ def pipeline(
"Model might be a PyTorch model (ending with `.bin`) but PyTorch is not available. "
"Trying to load the model with Tensorflow."
)
model = model_class.from_pretrained(model, config=config, **model_kwargs)
model = model_class.from_pretrained(model, config=config, return_tuple=True, **model_kwargs)

return task_class(model=model, tokenizer=tokenizer, modelcard=modelcard, framework=framework, task=task, **kwargs)

0 comments on commit 7214954

Please sign in to comment.