BentoML
BentoML copied to clipboard
bug: AttributeError in LSTM when loading model
Describe the bug
I am getting the following error when loading a model:
Traceback (most recent call last):
File "example.py", line 4, in
To reproduce
- Paste the following in a file (example.py) `import bentoml from flair.models import SequenceTagger
model = SequenceTagger.load('ner-ontonotes-fast') model_tag = bentoml.picklable_model.save_model('bento-ner', model)`
- Run python example.py
- Error will be outputted
Expected behavior
A bento should be created which can be later containerized with docker.
Environment
bentoml: 1.0.16 flair: 0.8 python: 3.8
For models from flair, we'd recommend using a custom Runnable implementation instead of the Pickable module: https://docs.bentoml.com/en/latest/concepts/runner.html#custom-runner