-
Notifications
You must be signed in to change notification settings - Fork 1
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
add zmq radix cache #12
base: main
Are you sure you want to change the base?
Conversation
@@ -46,6 +46,7 @@ class LoadBalanceMethod(Enum): | |||
|
|||
ROUND_ROBIN = auto() | |||
SHORTEST_QUEUE = auto() | |||
PRE_RADIX = auto() |
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.
不应该是单独的一个 Method,可以融入到 Resources_aware里面
@@ -86,20 +87,31 @@ def __init__( | |||
self.recv_from_tokenizer = context.socket(zmq.PULL) | |||
self.recv_from_tokenizer.bind(f"tcp://127.0.0.1:{port_args.controller_port}") | |||
|
|||
self.recv_from_tree_cache = context.socket(zmq.PULL) |
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.
通信的机制改一下
@@ -151,8 +170,34 @@ def shortest_queue_scheduler(self, input_requests): | |||
def loop_for_forward(self): | |||
while True: | |||
recv_reqs = self.recv_requests() | |||
|
|||
if len(recv_reqs) == 0: |
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.
不要加无关代码
Motivation
Modifications
Checklist