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

add zmq radix cache #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

josephydu
Copy link

Motivation

Modifications

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@@ -46,6 +46,7 @@ class LoadBalanceMethod(Enum):

ROUND_ROBIN = auto()
SHORTEST_QUEUE = auto()
PRE_RADIX = auto()
Copy link
Owner

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)
Copy link
Owner

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:
Copy link
Owner

Choose a reason for hiding this comment

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

不要加无关代码

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants