Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update helloworld evaluate #1488

Merged
merged 2 commits into from Dec 18, 2020
Merged

Conversation

JoanFM
Copy link
Member

@JoanFM JoanFM commented Dec 18, 2020

No description provided.

@JoanFM JoanFM requested a review from a team as a code owner December 18, 2020 14:16
@JoanFM JoanFM changed the title Update helloworld evaluate refactor: update helloworld evaluate Dec 18, 2020
@jina-bot jina-bot added size/M area/core This issue/PR affects the core codebase area/helloworld This issue/PR affects the helloworld component/resource labels Dec 18, 2020
@codecov
Copy link

codecov bot commented Dec 18, 2020

Codecov Report

Merging #1488 (ba79c89) into master (74aa915) will increase coverage by 0.04%.
The diff coverage is 94.38%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1488      +/-   ##
==========================================
+ Coverage   84.11%   84.16%   +0.04%     
==========================================
  Files         105      105              
  Lines        5975     6049      +74     
==========================================
+ Hits         5026     5091      +65     
- Misses        949      958       +9     
Impacted Files Coverage Δ
jina/helloworld/components.py 100.00% <ø> (ø)
jina/proto/jina_pb2.py 100.00% <ø> (ø)
jina/types/document/uid.py 81.25% <77.27%> (-3.50%) ⬇️
jina/clients/request.py 91.04% <100.00%> (-0.26%) ⬇️
jina/drivers/evaluate.py 98.21% <100.00%> (+0.03%) ⬆️
jina/drivers/index.py 94.73% <100.00%> (ø)
jina/drivers/rank.py 97.36% <100.00%> (+0.07%) ⬆️
jina/drivers/search.py 94.64% <100.00%> (ø)
jina/executors/indexers/cache.py 100.00% <100.00%> (ø)
jina/executors/rankers/__init__.py 93.33% <100.00%> (+1.02%) ⬆️
... and 32 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79d1785...ba79c89. Read the comment docs.

@JoanFM JoanFM closed this Dec 18, 2020
@JoanFM JoanFM reopened this Dec 18, 2020
@github-actions
Copy link

Latency summary

Current PR yields:

  • 🐢🐢 index QPS at 2099, delta to last 3 avg.: -8%
  • 😶 query QPS at 39, delta to last 3 avg.: +0%

Breakdown

Version Index QPS Query QPS
current 2099 39
0.8.8 2229 38
0.8.7 2191 38
0.8.6 2495 39

Backed by latency-tracking. Further commits will update this comment.

@@ -77,8 +82,11 @@ def write_html(html_path):
open(html_path, 'w') as fw:
t = fp.read()
t = t.replace('{% RESULT %}', '\n'.join(result_html))
evaluation_percentage = evaluation_value/num_docs_evaluated * 100.0
t = t.replace('{% EVALUATION %}', '{:.2f}%'.format(evaluation_percentage))
precision_evaluation_percentage = evaluation_value['evaluate-Precision@5'] / num_docs_evaluated * 100.0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is @5 hardcoded?

Copy link
Member Author

@JoanFM JoanFM Dec 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ 5 is the eval_at

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do the trick to select any key containing Precision

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but why is it 5, shouldn't this be top_k?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i see so the eval_at is an attribute in Executor, making it impossible to read from querylang/driver

class BaseRankingEvaluator(BaseEvaluator):
    """A :class:`BaseRankingEvaluator` evaluates the content of matches against the expected GroundTruth.
    It is used to evaluate messages coming out from Indexers and Rankers and compares matches with groundtruths
    """

    def __init__(self, eval_at: int, *args, **kwargs):
        """"
        :param eval_at: k at which evaluation is performed
        """
        super().__init__(*args, **kwargs)
        self.eval_at = eval_at

Copy link
Member

@hanxiao hanxiao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, refactor on eval_at in another PR

@hanxiao hanxiao merged commit fd8433d into master Dec 18, 2020
@hanxiao hanxiao deleted the update-helloworld-evaluate branch December 18, 2020 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/core This issue/PR affects the core codebase area/helloworld This issue/PR affects the helloworld component/resource size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants