-
Notifications
You must be signed in to change notification settings - Fork 2.2k
feat: make docs behavior consistent 💥 #3227
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
Conversation
0357f56
to
2e01ef9
Compare
Codecov Report
@@ Coverage Diff @@
## master #3227 +/- ##
=======================================
Coverage 89.11% 89.12%
=======================================
Files 148 148
Lines 10392 10398 +6
=======================================
+ Hits 9261 9267 +6
Misses 1131 1131
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Latency summaryCurrent PR yields:
Breakdown
Backed by latency-tracking. Further commits will update this comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May u add a test proving ur point? What is the problem trying to be solved here?
@jacobowitz can you add the test that shows your problem? Thanks! |
The failing test is actually quite interesting. Imagine:
Without a merging strategy, the second Pod will forward all Documents duplicated. Once from This makes the PR even more valid in my eyes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure cookbook
is updated and tests added
Following example
produces randomly |
5b5d7a7
to
eadd508
Compare
@@ -119,7 +118,6 @@ def start(self) -> 'CompoundPod': | |||
self.head_pea = Pea(head_args) | |||
self._enter_pea(self.head_pea) | |||
for _args in self.replicas_args: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is important to be kept. For the inner replica pod right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is kept. I just moved it to the place, where all args are set. Inside _set_replica_args
. I prefer to have only one place in the code, where args are set.
@@ -132,18 +132,27 @@ def handle( | |||
self.logger.debug( | |||
f'skip executor: mismatch request, exec_endpoint: {msg.envelope.header.exec_endpoint}, requests: {self._executor.requests}' | |||
) | |||
if partial_requests: | |||
DataRequestHandler.replace_docs( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here u should do nothing right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Clarified offline. For the record:
The reason I added this: When you do a Flow.add(name='1').add(name='2', needs['gateway', '1'])
by default it uses the BaseExecutor
in the HeadPea of 2
. But the BaseExecutor
has no endpoint defined. Anyhow, it should merge the the docs from both pathways to one big DocumentArray
.
eadd508
to
958f0db
Compare
Actually the Cookbook was already stating the new behavior. See https://github.com/jina-ai/jina/blob/master/.github/2.0/cookbooks/Flow.md#joiningmerging. |
1be9136
to
23b3f6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thank you very much for this improvement 👍
The expected behavior from Executor side should be:
Subtasks