ohmeow / blurr

A library that integrates huggingface transformers with the world of fastai, giving fastai devs everything they need to train, evaluate, and deploy transformer specific models.
https://ohmeow.github.io/blurr
Apache License 2.0
289 stars 34 forks source link

'HF_AfterBatchTransform' object has no attribute 'is_split_into_words' #49

Closed GagandeepKundi closed 2 years ago

GagandeepKundi commented 2 years ago

Hello, I'm trying to build the REST Api with FastApi and I am getting this error:

File "/Users/brl.314/Downloads/blurr/blurr/modeling/core.py", line 142, in blurr_predict is_split_str = batch_tfm.is_split_into_words and isinstance(items[0], str) AttributeError: 'HF_AfterBatchTransform' object has no attribute 'is_split_into_words'

And the core.py has is_split_into_words as an attribute.

ohmeow commented 2 years ago

Are you doing an editable install from the repo?

If so, that would explain it ... as I am in the middle of including better support for low-levle API folks that want to work with PyTorch and/or fast.ai DataSets/DataLoaders with Blurr.

Anyhow, should be fixed now. Give it a try and lmk how it goes.

ohmeow commented 2 years ago

Closing this out as it should be fixed in latest release