Hi there!
I’m using a custom pretrained language model in my bot with following pipeline:
language: ru
pipeline:
- name: HFTransformersNLP
model_weights: ./pretrained/rubert-base-cased_tf2/
model_name: "bert"
- name: LanguageModelTokenizer
- name: LanguageModelFeaturizer
- name: DIETClassifier
epochs: 200
- name: EntitySynonymMapper
- name: ResponseSelector
epochs: 100
It works as expected via rasa shell. Now I want to deploy the model with Rasa X Docker-compose.
If i simply upload the new trained model, rasa-production container logs an error:
OSError: Model name './pretrained/rubert-base-cased_tf2/' was not found in tokenizers model name list (bert-base-uncased, bert-large-uncased, bert-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-chinese, bert-base-german-cased, bert-large-uncased-whole-word-masking, bert-large-cased-whole-word-masking, bert-large-uncased-whole-word-masking-finetuned-squad, bert-large-cased-whole-word-masking-finetuned-squad, bert-base-cased-finetuned-mrpc, bert-base-german-dbmdz-cased, bert-base-german-dbmdz-uncased, bert-base-finnish-cased-v1, bert-base-finnish-uncased-v1, bert-base-dutch-cased). We assumed './pretrained/rubert-base-cased_tf2/' was a path or url to a directory containing vocabulary files named ['vocab.txt'], but couldn't find such vocabulary files at this path or url.
Then I try attaching the folder as a volume:
rasa-production:
<<: *default-rasa-service
volumes:
- ./pretrained:/app/pretrained
environment:
<<: *rasa-credentials
RASA_ENVIRONMENT: "production"
DB_DATABASE: "tracker"
RASA_MODEL_SERVER: "http://rasa-x:5002/api/projects/default/models/tags/production"
It attaches correctly, but the rasa-production instance starts restarting continuously. And nothing works again.
So how do I link the model correctly?