Unverified Commit 7214954d authored by Lysandre Debut's avatar Lysandre Debut Committed by GitHub
Browse files

Should return a tuple for serialization (#6061)

parent 7a68d401
...@@ -2122,6 +2122,6 @@ def pipeline( ...@@ -2122,6 +2122,6 @@ def pipeline(
"Model might be a PyTorch model (ending with `.bin`) but PyTorch is not available. " "Model might be a PyTorch model (ending with `.bin`) but PyTorch is not available. "
"Trying to load the model with Tensorflow." "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) return task_class(model=model, tokenizer=tokenizer, modelcard=modelcard, framework=framework, task=task, **kwargs)
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