vespa-engine / vespa

AI + Data, online. https://vespa.ai
https://vespa.ai
Apache License 2.0
5.47k stars 584 forks source link

Bug when creating transformer pipeline in sample-apps/transformers #20893

Closed brandhsu closed 2 years ago

brandhsu commented 2 years ago

Describe the bug

Not a vespa related bug, however, the transformer pipeline cannot be created in sample-apps/transformers.

To Reproduce Issue is here: https://github.com/vespa-engine/sample-apps/blob/master/transformers/src/python/setup-model.py#L16

Fix

pipeline = transformers.pipeline("text-classification", model=model_name)

Environment

kkraune commented 2 years ago

CC @jobergum

jobergum commented 2 years ago

Thanks, fixed by https://github.com/vespa-engine/sample-apps/pull/817

brandhsu commented 2 years ago

Yes, also saw some other tutorials following the same style of pipeline declaration that would also encounter the same error https://github.com/vespa-engine/sample-apps/search?q=transformers.Pipeline

jobergum commented 2 years ago

The DPR model is pinned to a given transformer version, as it does not work with recent updates to the transformer library.

jobergum commented 2 years ago

Thanks for reporting this @Brandhsu !

brandhsu commented 2 years ago

Yes @jobergum, also there is a similar issue with the pyvespa package, I encountered it when doing the stateless model serving.

kkraune commented 2 years ago

@thigm85 please take a look at the pyvespa problem