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

Kubernetes Install issue #56

Open Sharathmk99 opened 4 years ago

Sharathmk99 commented 4 years ago

Hi,

I'm trying to install nboost in Kubernetes cluster using below command, helm install nboost --set replicaCount=3 --set service.type=ClusterIP --set args.uhost=elasticsearch-elasticsearch-coordinating-only nboost/nboost

Its crashing,

[nltk_data] Downloading package stopwords to /root/nltk_data...
[nltk_data]   Unzipping corpora/stopwords.zip.
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
usage: nboost [-h] [--debug DEBUG] [--no_rerank NO_RERANK] [--search_route SEARCH_ROUTE]
              [--query_path QUERY_PATH] [--topk_path TOPK_PATH] [--default_topk DEFAULT_TOPK]
              [--cvalues_path CVALUES_PATH] [--cids_path CIDS_PATH] [--choices_path CHOICES_PATH]
              [--query_prep QUERY_PREP] [--verbose VERBOSE] [--host HOST] [--port PORT]
              [--uhost UHOST] [--uport UPORT] [--ussl USSL] [--delim DELIM] [--lr LR]
              [--max_seq_len MAX_SEQ_LEN] [--bufsize BUFSIZE] [--batch_size BATCH_SIZE]
              [--topn TOPN] [--workers WORKERS] [--data_dir DATA_DIR] [--model MODEL]
              [--model_dir MODEL_DIR] [--qa QA] [--prerank PRERANK] [--qa_model QA_MODEL]
              [--qa_model_dir QA_MODEL_DIR] [--filter_results FILTER_RESULTS]
nboost: error: unrecognized arguments: --config=elasticsearch --multiplier=5 --rerank=true --search_path=/.*/_search

Can you please help.

si-rob commented 4 years ago

Just ran into this too. you can set config: null multiplier: null rerank: null search_path: null in helm values.yaml or use --set args.config=null --set args.multiplier=null --set args.rerank=null --set args.search_path=null on the command line for helm install

jalberto commented 4 years ago

in addition to @si-rob lr: null it's also needed but still, there is an issue with the models:

nboost OSError: Model name 'pt-bert-base-uncased-msmarco' was not found in model name list (bert-base-uncased, bert-large-uncased,...)

Also:

│ nboost Traceback (most recent call last):                                                                                                                                                  │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request                                                                                   │
│ nboost     rv = self.dispatch_request()                                                                                                                                                    │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request                                                                                        │
│ nboost     return self.view_functions[rule.endpoint](**req.view_args)                                                                                                                      │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/nboost/proxy.py", line 123, in proxy_through                                                                                         │
│ nboost     plugin.on_response(response, db_row)                                                                                                                                            │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/nboost/plugins/rerank/base.py", line 32, in on_response                                                                              │
│ nboost     query=response.request.query,                                                                                                                                                   │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/nboost/delegates.py", line 74, in query                                                                                              │
│ nboost     raise MissingQuery                                                                                                                                                              │
│ nboost nboost.exceptions.MissingQuery                                                                                                                                                      │
│ nboost 10.28.5.1 - - [02/Apr/2020 11:29:56] "GET / HTTP/1.1" 500 -                                                                                                                         │
│ <STREAM> closed 
jalberto commented 4 years ago

So the configured probes in helm are causing that MissingQuery exception, disabling the probes is workaround thou.

Now Next error:

│ nboost E:Proxy:[pro:han:132]:                                                                                                                                                              │
│ nboost Traceback (most recent call last):                                                                                                                                                  │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/flask/app.py", line 1949, in full_dispatch_request                                                                                   │
│ nboost     rv = self.dispatch_request()                                                                                                                                                    │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/flask/app.py", line 1935, in dispatch_request                                                                                        │
│ nboost     return self.view_functions[rule.endpoint](**req.view_args)                                                                                                                      │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/nboost/proxy.py", line 78, in status_path                                                                                            │
│ nboost     stats = db.get_stats()                                                                                                                                                          │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/nboost/database.py", line 58, in get_stats                                                                                           │
│ nboost     cursor = self.get_cursor()                                                                                                                                                      │
│ nboost   File "/opt/conda/lib/python3.6/site-packages/nboost/database.py", line 16, in get_cursor                                                                                          │
│ nboost     conn = sqlite3.connect(str(self.db_file), isolation_level=None)                                                                                                                 │
│ nboost sqlite3.OperationalError: unable to open database file                                                                                                                              │
│ nboost 10.28.3.9 - - [02/Apr/2020 12:08:50] "GET /nboost/status?_=1585829302327 HTTP/1.1" 500 - 
MysterionRise commented 4 years ago

@jalberto I have same error, but wtihout Kubernetes set up. What kind of database we are talking about here? Is some config key is missing?

@colethienes Also validated and got same result by using standalone pip package. Anybody have an idea what's wrong with it?

jalberto commented 4 years ago

It's elasticsearch, I still was not able to make this work

El lun., 13 abr. 2020 13:51, Konstantin Perikov notifications@github.com escribió:

@jalberto https://github.com/jalberto I have same error, but wtihout Kubernetes set up. What kind of database we are talking about here? Is some config key is missing?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/koursaros-ai/nboost/issues/56#issuecomment-612866882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAYMV64NRZQ2WS6FUUSUZDRML3SFANCNFSM4LFEB5EA .

MysterionRise commented 4 years ago

@jalberto I doubt, error message is saying

sqlite3.OperationalError: unable to open database file

which is have to do with sqlite, not Elastic itself. Also I managed to make it working on 0.3.3 which means, that it's potentially a bug introduced

kaykanloo commented 4 years ago

Most likely the same bug as #61