diff --git a/docs/sphinx/source/application-packages.ipynb b/docs/sphinx/source/application-packages.ipynb index d0427d55..895ac565 100644 --- a/docs/sphinx/source/application-packages.ipynb +++ b/docs/sphinx/source/application-packages.ipynb @@ -18,10 +18,24 @@ " **_To configure setting an unsupported indexing option (or any other unsupported option),_**\n", " **_export the application package like above, modify the schema or other files_**\n", " **_and deploy the application package from the directory, or as a zipped file._**\n", - " **_Find more details at the end of this notebook._**\n", - "\n", - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vespa-engine/pyvespa/blob/master/docs/sphinx/source/application-packages.ipynb)\n", - "\n", + " **_Find more details at the end of this notebook._**" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e51d0086", + "metadata": {}, + "outputs": [], + "source": [ + "!pip3 install pyvespa" + ] + }, + { + "cell_type": "markdown", + "id": "b593d6e2", + "metadata": {}, + "source": [ "By exporting to disk, one can see the generated files:" ] }, diff --git a/docs/sphinx/source/examples/multi-vector-indexing.ipynb b/docs/sphinx/source/examples/multi-vector-indexing.ipynb index 2dc77afe..1a54dd87 100644 --- a/docs/sphinx/source/examples/multi-vector-indexing.ipynb +++ b/docs/sphinx/source/examples/multi-vector-indexing.ipynb @@ -24,8 +24,24 @@ "* How to control text search result highlighting.\n", "\n", "This notebook requires [pyvespa >= 0.37.1](https://pyvespa.readthedocs.io/en/latest/index.html#requirements)\n", - "and the [Vespa CLI](https://pyvespa.readthedocs.io/en/latest/reads-writes.html#Feed-using-Vespa-CLI).\n", - "\n", + "and the [Vespa CLI](https://pyvespa.readthedocs.io/en/latest/reads-writes.html#Feed-using-Vespa-CLI)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "bf5137e2", + "metadata": {}, + "outputs": [], + "source": [ + "!pip3 install pyvespa" + ] + }, + { + "cell_type": "markdown", + "id": "0d35f3da", + "metadata": {}, + "source": [ "## Create the application" ] }, diff --git a/docs/sphinx/source/examples/pyvespa-examples.ipynb b/docs/sphinx/source/examples/pyvespa-examples.ipynb index 44fa956a..393a301e 100644 --- a/docs/sphinx/source/examples/pyvespa-examples.ipynb +++ b/docs/sphinx/source/examples/pyvespa-examples.ipynb @@ -14,6 +14,16 @@ "Refer to [troubleshooting](https://pyvespa.readthedocs.io/en/latest/troubleshooting.html), which also has utilies for debugging." ] }, + { + "cell_type": "code", + "execution_count": null, + "id": "8fb6db5b", + "metadata": {}, + "outputs": [], + "source": [ + "!pip3 install pyvespa" + ] + }, { "cell_type": "markdown", "id": "c77bfca9", diff --git a/docs/sphinx/source/getting-started-pyvespa.ipynb b/docs/sphinx/source/getting-started-pyvespa.ipynb index a5f20461..6245a284 100644 --- a/docs/sphinx/source/getting-started-pyvespa.ipynb +++ b/docs/sphinx/source/getting-started-pyvespa.ipynb @@ -32,6 +32,7 @@ } ], "source": [ + "!pip3 install pyvespa\n", "!docker info | grep \"Total Memory\"" ] }, @@ -451,9 +452,21 @@ ], "metadata": { "kernelspec": { - "display_name": "python3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.4" } }, "nbformat": 4, diff --git a/docs/sphinx/source/query.ipynb b/docs/sphinx/source/query.ipynb index 4bff1662..d92c5649 100644 --- a/docs/sphinx/source/query.ipynb +++ b/docs/sphinx/source/query.ipynb @@ -12,8 +12,22 @@ "and https://cord19.vespa.ai/ app as an example.\n", "You can run this tutorial in Google Colab:\n", "\n", - "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vespa-engine/pyvespa/blob/master/docs/sphinx/source/query.ipynb)\n", - "\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/vespa-engine/pyvespa/blob/master/docs/sphinx/source/query.ipynb)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!pip3 install pyvespa" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "Set the query endpoint:" ] }, @@ -46,18 +60,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "10977" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "body = {\n", " 'yql': 'select cord_uid, title, abstract from sources * where userQuery()',\n", @@ -81,18 +84,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "5" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "len(results.hits)" ] @@ -108,18 +100,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "['ysml5abq', 'zpcuwvn4', '8art2tyj', 'xej338lo', 'npoje09j']" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "[hit[\"fields\"][\"cord_uid\"] for hit in results.hits]" ] @@ -135,23 +116,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'id': 'index:content/1/848ca5db53648911e0a58c78',\n", - " 'relevance': 30.531354743471304,\n", - " 'source': 'content',\n", - " 'fields': {'title': 'Cost utility analysis of Remdesivir and Dexamethasone treatment for hospitalised COVID-19 patients - a hypothetical study',\n", - " 'abstract': ': Sars-Cov-2 is a novel corona virus associated with significant morbidity and mortality. Remdesivir and Dexamethasone are two treatments that have shown to be effective against the Sars-Cov-2 associated disease. However, a cost-effectiveness analysis of the two treatments is still lacking. OBJECTIVE: The cost-utility of Remdesivir, Dexamethasone and a simultaneous use of the two drugs with respect to standard of care for treatment Covid-19 hospitalized patients is evaluated, together with the effect',\n", - " 'cord_uid': 'ysml5abq'}}" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "results.hits[0]" ] @@ -168,59 +133,7 @@ "cell_type": "code", "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "{'timing': {'querytime': 0.019,\n", - " 'summaryfetchtime': 0.001,\n", - " 'searchtime': 0.021},\n", - " 'root': {'id': 'toplevel',\n", - " 'relevance': 1.0,\n", - " 'fields': {'totalCount': 10977},\n", - " 'coverage': {'coverage': 100,\n", - " 'documents': 976355,\n", - " 'full': True,\n", - " 'nodes': 2,\n", - " 'results': 1,\n", - " 'resultsFull': 1},\n", - " 'children': [{'id': 'index:content/1/848ca5db53648911e0a58c78',\n", - " 'relevance': 30.531354743471304,\n", - " 'source': 'content',\n", - " 'fields': {'title': 'Cost utility analysis of Remdesivir and Dexamethasone treatment for hospitalised COVID-19 patients - a hypothetical study',\n", - " 'abstract': ': Sars-Cov-2 is a novel corona virus associated with significant morbidity and mortality. Remdesivir and Dexamethasone are two treatments that have shown to be effective against the Sars-Cov-2 associated disease. However, a cost-effectiveness analysis of the two treatments is still lacking. OBJECTIVE: The cost-utility of Remdesivir, Dexamethasone and a simultaneous use of the two drugs with respect to standard of care for treatment Covid-19 hospitalized patients is evaluated, together with the effect',\n", - " 'cord_uid': 'ysml5abq'}},\n", - " {'id': 'index:content/1/afade29b15d5f83d8dd4d16a',\n", - " 'relevance': 30.124913401931195,\n", - " 'source': 'content',\n", - " 'fields': {'title': 'Remdesivir is effective for moderately severe patients: A re-analysis of the first double-blind, placebo-controlled, randomized trial on remdesivir for treatment of severe covid-19 patients conducted in wuhan city',\n", - " 'abstract': ' with baseline score, day of assessment, treatment group, baseline by treatment interaction, and day by treatment interaction as covariates. The binary endpoint was supported by the recent FDAoxygen (but not NIV/HFNC)) – the moderately severe category. The response rate was 85% for remdesivir-treated patients with baseline disease point=3 versus 70% response rate for likewise placebo-treatedopinions. This result supports the preliminary findings of ACTT that remdesivir is effective for patients who were not critically severe. This result also suggests that',\n", - " 'cord_uid': 'zpcuwvn4'}},\n", - " {'id': 'index:content/1/4678cba4fd31160fd163d063',\n", - " 'relevance': 29.876569304341285,\n", - " 'source': 'content',\n", - " 'fields': {'title': 'A Review on Remdesivir: A Possible Promising Agent for the Treatment of COVID-19',\n", - " 'abstract': 'manufacturing of specific therapeutics and vaccines to treat COVID-19 are time-consuming processes. At this time, using available conventional therapeutics along with other treatment options may be useful to fight COVID-19. In different clinical trials, efficacy of remdesivir (GS-5734) against Ebola virus has been demonstrated. Moreover, remdesivir may be an effective therapy in vitro and in animal models infected by SARS and MERS coronaviruses. Hence, the drug may be theoretically effective against SARS-CoV-2. Remdesivir',\n", - " 'cord_uid': '8art2tyj'}},\n", - " {'id': 'index:content/0/eec37c88ff9aa825c5c79d81',\n", - " 'relevance': 29.874123437446798,\n", - " 'source': 'content',\n", - " 'fields': {'title': 'A Review on Remdesivir: A Possible Promising Agent for the Treatment of COVID-19',\n", - " 'abstract': 'manufacturing of specific therapeutics and vaccines to treat COVID-19 are time-consuming processes. At this time, using available conventional therapeutics along with other treatment options may be useful to fight COVID-19. In different clinical trials, efficacy of remdesivir (GS-5734) against Ebola virus has been demonstrated. Moreover, remdesivir may be an effective therapy in vitro and in animal models infected by SARS and MERS coronaviruses. Hence, the drug may be theoretically effective against SARS-CoV-2. Remdesivir',\n", - " 'cord_uid': 'xej338lo'}},\n", - " {'id': 'index:content/0/a41b357fc6aa38c6b55a4685',\n", - " 'relevance': 29.481438680496694,\n", - " 'source': 'content',\n", - " 'fields': {'title': 'Remdesivir for the Treatment of COVID-19: A Systematic Review of the Literature',\n", - " 'abstract': 'CoV-2 a global pandemic. To date, coronavirus disease-2019 (COVID-19) has spread to over 200 countries, leading to over 1.6 million cases and over 99,000 deaths. Given that there is neither a vaccine nor proven treatment for COVID-19, there is currently an urgent need for effective pharmacotherapy. To address the need for an effective treatment of SARS-CoV-2 during the worldwide pandemic, this systematic review of intravenous (IV) remdesivir was performed. Remdesivir, an anti-viral prodrug originally developed to treat Ebola virus disease, has shown broad spectrum activity against the Coronavirus family. A recent case report reported improvement of clinical symptoms with remdesivir in a patient with COVID-19. After',\n", - " 'cord_uid': 'npoje09j'}}]}}" - ] - }, - "execution_count": null, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "results.json" ] @@ -239,9 +152,21 @@ ], "metadata": { "kernelspec": { - "display_name": "python3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.11.4" } }, "nbformat": 4,