From 075d9d5fec2026c4589c2f0f1d4ededc05128ece Mon Sep 17 00:00:00 2001 From: tmartins Date: Tue, 16 Jun 2020 09:07:10 +0200 Subject: update readme with new name pyvespa --- python/vespa/README.md | 405 +-------------------------------------- python/vespa/docs/index.html | 438 +------------------------------------------ 2 files changed, 8 insertions(+), 835 deletions(-) diff --git a/python/vespa/README.md b/python/vespa/README.md index c316564f3c1..00d8cc2e769 100644 --- a/python/vespa/README.md +++ b/python/vespa/README.md @@ -4,7 +4,7 @@ ## Install -`pip install vespa` +`pip install pyvespa` ## Connect to a Vespa app @@ -52,16 +52,9 @@ query_result = app.query( ``` ``` -query_result["root"]["fields"] +query_result.number_documents_retrieved ``` - - - - {'totalCount': 1077} - - - ## Labelled data > How to structure labelled data @@ -97,346 +90,6 @@ training_data_batch = app.collect_training_data( training_data_batch ``` - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
attributeMatch(authors.first)attributeMatch(authors.first).averageWeightattributeMatch(authors.first).completenessattributeMatch(authors.first).fieldCompletenessattributeMatch(authors.first).importanceattributeMatch(authors.first).matchesattributeMatch(authors.first).maxWeightattributeMatch(authors.first).normalizedWeightattributeMatch(authors.first).normalizedWeightedWeightattributeMatch(authors.first).queryCompleteness...textSimilarity(results).queryCoveragetextSimilarity(results).scoretextSimilarity(title).fieldCoveragetextSimilarity(title).ordertextSimilarity(title).proximitytextSimilarity(title).queryCoveragetextSimilarity(title).scoredocument_idquery_idrelevant
00.00.00.00.00.00.00.00.00.00.0...0.00.00.0000000.00.0000000.0000000.000000001
10.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000005621200
20.00.00.00.00.00.00.00.00.00.0...0.00.00.1875000.50.6171880.4285710.4570873402600
30.00.00.00.00.00.00.00.00.00.0...0.00.00.0000000.00.0000000.0000000.000000301
40.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000005621200
50.00.00.00.00.00.00.00.00.00.0...0.00.00.1875000.50.6171880.4285710.4570873402600
60.00.00.00.00.00.00.00.00.00.0...0.00.00.0714290.00.0000000.0833330.039286111
70.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000002977410
80.00.00.00.00.00.00.00.00.00.0...0.00.00.5000001.01.0000000.3333330.7000002278710
90.00.00.00.00.00.00.00.00.00.0...0.00.00.0588240.00.0000000.0833330.036765511
100.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000002977410
110.00.00.00.00.00.00.00.00.00.0...0.00.00.5000001.01.0000000.3333330.7000002278710
-

12 rows × 984 columns

-
- - - ## Evaluating a query model > Define metrics and evaluate query models. See the [evaluation page](/vespa/evaluation) for more examples. @@ -463,57 +116,3 @@ evaluation = app.evaluate( ) evaluation ``` - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
query_idmatch_ratio_retrieved_docsmatch_ratio_docs_availablematch_ratio_valuerecall_10_valuereciprocal_rank_10_value
001267625290.02026300
11887625290.01418500
-
- - diff --git a/python/vespa/docs/index.html b/python/vespa/docs/index.html index 054c74f3bec..7c55143b923 100644 --- a/python/vespa/docs/index.html +++ b/python/vespa/docs/index.html @@ -35,7 +35,7 @@ description: "Provide data analysis support for Vespa applications"
-

pip install vespa

+

pip install pyvespa

@@ -55,7 +55,7 @@ description: "Provide data analysis support for Vespa applications"
-
from vespa.application import Vespa
+
from vespa.application import Vespa
 
 app = Vespa(url = "https://api.cord19.vespa.ai")
 
@@ -82,8 +82,8 @@ description: "Provide data analysis support for Vespa applications"
-
from vespa.query import Query, Union, WeakAnd, ANN, RankProfile
-from random import random
+
from vespa.query import Query, Union, WeakAnd, ANN, RankProfile
+from random import random
 
 match_phase = Union(
     WeakAnd(hits = 10), 
@@ -143,29 +143,13 @@ description: "Provide data analysis support for Vespa applications"
 
 
-
query_result["root"]["fields"]
+
query_result.number_documents_retrieved
 
-
-
- -
- - - -
-
{'totalCount': 1077}
-
- -
- -
-
-
{% endraw %} @@ -240,354 +224,6 @@ description: "Provide data analysis support for Vespa applications"
-
-
- -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
attributeMatch(authors.first)attributeMatch(authors.first).averageWeightattributeMatch(authors.first).completenessattributeMatch(authors.first).fieldCompletenessattributeMatch(authors.first).importanceattributeMatch(authors.first).matchesattributeMatch(authors.first).maxWeightattributeMatch(authors.first).normalizedWeightattributeMatch(authors.first).normalizedWeightedWeightattributeMatch(authors.first).queryCompleteness...textSimilarity(results).queryCoveragetextSimilarity(results).scoretextSimilarity(title).fieldCoveragetextSimilarity(title).ordertextSimilarity(title).proximitytextSimilarity(title).queryCoveragetextSimilarity(title).scoredocument_idquery_idrelevant
00.00.00.00.00.00.00.00.00.00.0...0.00.00.0000000.00.0000000.0000000.000000001
10.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000005621200
20.00.00.00.00.00.00.00.00.00.0...0.00.00.1875000.50.6171880.4285710.4570873402600
30.00.00.00.00.00.00.00.00.00.0...0.00.00.0000000.00.0000000.0000000.000000301
40.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000005621200
50.00.00.00.00.00.00.00.00.00.0...0.00.00.1875000.50.6171880.4285710.4570873402600
60.00.00.00.00.00.00.00.00.00.0...0.00.00.0714290.00.0000000.0833330.039286111
70.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000002977410
80.00.00.00.00.00.00.00.00.00.0...0.00.00.5000001.01.0000000.3333330.7000002278710
90.00.00.00.00.00.00.00.00.00.0...0.00.00.0588240.00.0000000.0833330.036765511
100.00.00.00.00.00.00.00.00.00.0...0.00.01.0000001.01.0000001.0000001.0000002977410
110.00.00.00.00.00.00.00.00.00.0...0.00.00.5000001.01.0000000.3333330.7000002278710
-

12 rows × 984 columns

-
-
- -
- -
-
-
{% endraw %} @@ -618,7 +254,7 @@ description: "Provide data analysis support for Vespa applications"
-
from vespa.evaluation import MatchRatio, Recall, ReciprocalRank
+
from vespa.evaluation import MatchRatio, Recall, ReciprocalRank
 
 eval_metrics = [MatchRatio(), Recall(at=10), ReciprocalRank(at=10)]
 
@@ -657,68 +293,6 @@ description: "Provide data analysis support for Vespa applications"
-
-
- -
- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
query_idmatch_ratio_retrieved_docsmatch_ratio_docs_availablematch_ratio_valuerecall_10_valuereciprocal_rank_10_value
001267625290.02026300
11887625290.01418500
-
-
- -
- -
-
-
{% endraw %} -- cgit v1.2.3