koursaros-ai / nboost

NBoost is a scalable, search-api-boosting platform for deploying transformer models to improve the relevance of search results on different platforms (i.e. Elasticsearch)
Apache License 2.0
675 stars 69 forks source link

When using QA: "....0-py3.7.egg/nboost/plugins/models/__init__.pyline 24, in resolve_model" #46

Closed svanschalkwyk closed 4 years ago

svanschalkwyk commented 4 years ago

I have the distilbert-base-uncased-distilled-squad model downloaded into the .cache directory and have the following configuration. All values are at default except these. The distilber model does not seem to be resolvable as it isn't in the CLASS_MAP.

nboost    --uhost 192.168.5.123    --uport 9200   --search_route "/<index>/_search"   \
    --query_path url.query.q            \
    --topk_path url.query.size          \
    --default_topk 10                   \
    --choices_path body.hits.hits       \
    --cvalues_path _source.context      \
    --qa True                           

I had the qa.model_dir in the above script but that also does not resolve the issue. Question: should I rebuild nboost after adding the model to the CLAAS_MAP?

File "/home/steph/anaconda3/envs/bert/lib/python3.7/site-packages/nboost-0.3.0-py3.7.egg/nboost/plugins/models/__init__.py", line 24, in resolve_model
    raise ImportError('Class "%s" not in %s.' % CLASS_MAP.keys())
TypeError: not enough arguments for format string
pertschuk commented 4 years ago

Fixed in 0.3.3 release