summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authortmartins <thigm85@gmail.com>2020-09-03 09:36:34 +0200
committertmartins <thigm85@gmail.com>2020-09-03 09:36:34 +0200
commitaee188d98280a6ebc80e3779db1b9c9db90a5cad (patch)
treee4b1e329607f96f0fb8ce4fbcf6fcf8503c0b2d5 /python
parentd793edfa5e28bab79b43c9888afb411ab8c46e77 (diff)
modify howtos
Diffstat (limited to 'python')
-rw-r--r--python/vespa/docs/sphinx/source/application-package.ipynb63
-rw-r--r--python/vespa/docs/sphinx/source/deploy-application.ipynb17
-rw-r--r--python/vespa/docs/sphinx/source/index.rst4
3 files changed, 22 insertions, 62 deletions
diff --git a/python/vespa/docs/sphinx/source/application-package.ipynb b/python/vespa/docs/sphinx/source/application-package.ipynb
index 9aa1c6c40c5..5042148b040 100644
--- a/python/vespa/docs/sphinx/source/application-package.ipynb
+++ b/python/vespa/docs/sphinx/source/application-package.ipynb
@@ -1,44 +1,19 @@
{
"cells": [
{
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "# hide\n",
- "%load_ext autoreload\n",
- "%autoreload 2"
- ]
- },
- {
"cell_type": "markdown",
"metadata": {},
"source": [
- "# Vespa - Application Package\n",
+ "# Create Vespa application packages\n",
"\n",
- "> Python API to create, modify and deploy application packages"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "Our goal is to create, modify and deploy simple application packages using our python API. This enables us to run data analysis experiments that are fully integrated with Vespa. As an example, we want to create the application package we used in our [text search tutorial](https://docs.vespa.ai/documentation/tutorials/text-search.html). "
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Application spec"
+ "> Python API to create application packages"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "Our goal in this section is to create the following `msmarco` schema using our python API."
+ "Our goal is to create the following `msmarco` schema using our python API, based on our [text search tutorial](https://docs.vespa.ai/documentation/tutorials/text-search.html)."
]
},
{
@@ -90,7 +65,7 @@
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
@@ -118,36 +93,19 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "## Deploy it locally"
- ]
- },
- {
- "cell_type": "raw",
- "metadata": {},
- "source": [
- "from vespa.package import VespaDocker\n",
- "\n",
- "vespa_docker = VespaDocker(application_package=app_package)\n",
- "vespa_docker.deploy(disk_folder=\"/Users/username/sample_application\")"
- ]
- },
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "## Change the application package and redeploy"
+ "## Modify the application package"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
- "We can add a new rank profile and redeploy our application"
+ "We can add a new rank profile:"
]
},
{
"cell_type": "code",
- "execution_count": null,
+ "execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
@@ -155,13 +113,6 @@
" RankProfile(name = \"bm25\", inherits = \"default\", first_phase = \"bm25(title) + bm25(body)\")\n",
")"
]
- },
- {
- "cell_type": "raw",
- "metadata": {},
- "source": [
- "vespa_docker.deploy(disk_folder=\"/Users/username/sample_application\")"
- ]
}
],
"metadata": {
diff --git a/python/vespa/docs/sphinx/source/deploy-application.ipynb b/python/vespa/docs/sphinx/source/deploy-application.ipynb
index 956cbd9b30a..9bef636f889 100644
--- a/python/vespa/docs/sphinx/source/deploy-application.ipynb
+++ b/python/vespa/docs/sphinx/source/deploy-application.ipynb
@@ -1,11 +1,20 @@
{
"cells": [
{
- "cell_type": "code",
- "execution_count": null,
+ "cell_type": "markdown",
"metadata": {},
- "outputs": [],
- "source": []
+ "source": [
+ "# Deploy Vespa applications\n",
+ "\n",
+ "> Python API to deploy application packages to Vespa Cloud or to Docker containers"
+ ]
+ },
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "TBD"
+ ]
}
],
"metadata": {
diff --git a/python/vespa/docs/sphinx/source/index.rst b/python/vespa/docs/sphinx/source/index.rst
index 27d06d92086..9e56b1df976 100644
--- a/python/vespa/docs/sphinx/source/index.rst
+++ b/python/vespa/docs/sphinx/source/index.rst
@@ -45,8 +45,8 @@ by clicking on the badge at the top of the tutorial.
How-to guides
+++++++++++++
-- :doc:`Create Vespa application packages <application-package>`.
-- :doc:`Deploy Vespa applications to Vespa Cloud or to Docker containers <deploy-application>`.
+- :doc:`application-package`
+- :doc:`deploy-application`.
- :doc:`Define query models <query-model>`.
- :doc:`Query Vespa applications <query>`.
- :doc:`Evaluate query models <evaluation>`.