-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat: run warmup on Runtimes and Executor #5579
Conversation
7622872
to
5817aac
Compare
Codecov Report
@@ Coverage Diff @@
## master #5579 +/- ##
==========================================
+ Coverage 86.11% 87.98% +1.87%
==========================================
Files 124 124
Lines 9939 10047 +108
==========================================
+ Hits 8559 8840 +281
+ Misses 1380 1207 -173
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
triggering dry_run and discover endpoint requests before executor startup
22acbb4
to
280d481
Compare
|
||
def __extract_target_to_channel(self, deployment): | ||
replica_set = set() | ||
replica_set.update(self._connections.get_replicas_all_shards(deployment)) |
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 can extract out the warmup logic into a Warmer
class but the self._connections
is the inner class _ConnectionPoolMap
of the GrpcConnectionPool
. Does the inner class still make sense?
@@ -1,6 +1,8 @@ | |||
import asyncio | |||
import ipaddress | |||
import os | |||
import threading | |||
import time |
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.
please remove unneeded imports
@@ -1,6 +1,7 @@ | |||
import argparse | |||
import asyncio | |||
import signal | |||
import threading |
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.
remove unneeded import
# create a new set of stubs and channels for warmup to avoid | ||
# loosing channel during remove_connection or reset_connection | ||
stubs, _ = self._create_connection(address, deployment_name) | ||
self._warmup_stubs.add(stubs) |
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 do not see where they are used
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.
Check the usage of the property method self.warmup_stubs
. What's the preference when exposing read only
properties?
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.
ah okey
Goals:
run_forever
runtime method.GatewayStreamer
or the HeadRequestHandler
that delegates the warmup per deployments to the connection pool.GrpcConnectionPool
fetches the available shards and or replica (target) channels and creates aJinaInfoRPC
request task.CompositeGateway
doesn't support the warmup due to the creation of separateGatewayStreamer
objects for each type of Gateway. The issue will be addressed in feat: use single GatewayStreamer object for all gateways in the CompositeGateway #5592.shutdown
,run_server
,setup_server
now handle each gateway operation as a task per created gateway.