Closed akshay4malik closed 2 years ago
Thanks,
Fixed by https://github.com/vespa-engine/sample-apps/pull/950
If you follow https://docs.vespa.ai/en/tutorials/text-search.html instead of using the sample-app directly you would not run into this, these settings should never have been exposed in the sample apps.
So the PyVespa utility functions for building an application package is really there to demonstrate the end to end functionality, for example in a Notebook. You can always define the app package manually, or start with a sample application, or save the configuration to disk from after building it using PyVespa.
Deploying can be done using vespa-cli or HTTP API directly, see for example https://github.com/vespa-engine/sample-apps/tree/master/examples/operations/multinode-HA or
Thanks,
Fixed by vespa-engine/sample-apps#950
If you follow https://docs.vespa.ai/en/tutorials/text-search.html instead of using the sample-app directly you would not run into this, these settings should never have been exposed in the sample apps.
This one is throwing a different error:
{"error-code":"BAD_REQUEST","message":"Error preprocessing application package for default.default, session 2: services.xml in application package is empty"}
The instructions here https://docs.vespa.ai/en/tutorials/news-1-getting-started.html need to be followed precisely. This guide is part of our CI/CD test so this one I'm confident that works, but if you don't write the contents of the services.xml file or the schema like in the instructions it will fail. The above comes from deploying an empty directory.
Snippet from the most recent test run
16:21:45 ********************************************************************************
16:21:45 * Testing
16:21:45 * (en/tutorials/text-search.md, en/tutorials/text-search-ml.md)
16:21:45 ********************************************************************************
16:21:45
16:21:45 ********************************************************************************
16:21:45 * Script to execute
16:21:45 * (en/tutorials/text-search.md, en/tutorials/text-search-ml.md)
16:21:45 ********************************************************************************
16:21:45 {
16:21:45 "before": [],
16:21:45 "steps": [
16:21:45 {
16:21:45 "$": "vespa clone text-search text-search && cd text-search",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "./bin/convert-msmarco.sh",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "mkdir app",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "type": "file",
16:21:45 "content": "schema msmarco {\n document msmarco {\n field id type string {\n indexing: attribute | summary\n }\n field title type string {\n indexing: index | summary\n index: enable-bm25\n }\n field url type string {\n indexing: index | summary\n }\n field body type string {\n indexing: index\n index: enable-bm25\n }\n }\n\n document-summary minimal {\n summary id type string { }\n }\n\n fieldset default {\n fields: title, body, url\n }\n\n rank-profile default {\n first-phase {\n expression: nativeRank(title, body, url)\n }\n }\n\n rank-profile bm25 inherits default {\n first-phase {\n expression: bm25(title) + bm25(body) + bm25(url)\n }\n }\n}\n",
16:21:45 "path": "text-search/app/schemas/msmarco.sd"
16:21:45 },
16:21:45 {
16:21:45 "type": "file",
16:21:45 "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<services version=\"1.0\">\n\n <container id=\"text_search\" version=\"1.0\">\n <search></search>\n <document-processing></document-processing>\n <document-api></document-api>\n </container>\n\n <content id=\"msmarco\" version=\"1.0\">\n <redundancy>1</redundancy>\n <documents>\n <document type=\"msmarco\" mode=\"index\"></document>\n <document-processing cluster=\"text_search\"></document-processing>\n </documents>\n <nodes>\n <node distribution-key=\"0\" hostalias=\"node1\"></node>\n </nodes>\n </content>\n</services>\n",
16:21:45 "path": "text-search/app/services.xml"
16:21:45 },
16:21:45 {
16:21:45 "$": "docker run -m 12G --detach --name vespa-msmarco --hostname vespa-msmarco --publish 8080:8080 --publish 19112:19112 --publish 19071:19071 vespaengine/vespa",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "vespa status deploy --wait 300",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "vespa deploy --wait 300 app",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "curl -L -o vespa-feed-client-cli.zip https://search.maven.org/remotecontent?filepath=com/yahoo/vespa/vespa-feed-client-cli/7.527.20/vespa-feed-client-cli-7.527.20-zip.zip",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "unzip vespa-feed-client-cli.zip",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "./vespa-feed-client-cli/vespa-feed-client --verbose --file msmarco/vespa.json --endpoint http://localhost:8080",
16:21:45 "type": "default"
16:21:45 },
16:21:45 {
16:21:45 "$": "vespa query 'yql=select title,url,id from msmarco where userQuery()' 'query=what is dad bod'",
16:21:45 "type": "assert",
16:21:45 "contains": "What Is A Dad Bod"
16:21:45 },
16:21:45 {
16:21:45 "$": "vespa query 'yql=select title,url,id from msmarco where userQuery()' 'query=what is dad bod' 'type=any'",
16:21:45 "type": "assert",
16:21:45 "contains": "What Is A Dad Bod"
16:21:45 },
16:21:45 {
16:21:45 "$": "vespa query 'yql=select title,url,id from msmarco where userQuery()' 'query=what is dad bod' 'type=weakAnd'",
16:21:45 "type": "assert",
16:21:45 "contains": "What Is A Dad Bod"
16:21:45 },
16:21:45 {
16:21:45 "$": "vespa query 'yql=select title,url,id from msmarco where userQuery()' 'query=what is dad bod' 'ranking=bm25' 'type=weakAnd'",
16:21:45 "type": "assert",
16:21:45 "contains": "What Is A Dad Bod"
16:21:45 },
Both the sample app instructions and the text-search tutorial instructions passes our documentation and verify guide tests. Thanks for opening this ticket and making us aware of the text-search sample app issue.
When I am trying to reproduce the basic text_search example available in sample_apps, I am facing issues. After forwarding the ports, When I push the application.zip on vespa-server, I get the following response:
It only says warning, but when I am trying to check the status, the 8080 port forwarding stops. If I follow the album-recommendation tutorial, it works fine.
I have one more query, is there any way we can create a vespa application (including the service.xml , schema.md etc) using python on a running kubernetes vespa container. There are document available where we can start the docker container and vespa app using python, But on a running container, creating the complete configuration doesn't seems to be available.