refactor: remove duplicate function _get_bootstrap_info_from_server (#13277)
This commit is contained in:
@@ -1190,25 +1190,6 @@ class MooncakeKVReceiver(CommonKVReceiver):
|
|||||||
self.kv_mgr.addr_to_rooms_tracker[self.bootstrap_addr].add(self.bootstrap_room)
|
self.kv_mgr.addr_to_rooms_tracker[self.bootstrap_addr].add(self.bootstrap_room)
|
||||||
self.kv_mgr.update_status(self.bootstrap_room, KVPoll.WaitingForInput)
|
self.kv_mgr.update_status(self.bootstrap_room, KVPoll.WaitingForInput)
|
||||||
|
|
||||||
def _get_bootstrap_info_from_server(
|
|
||||||
self, engine_rank, target_dp_group, target_pp_rank
|
|
||||||
):
|
|
||||||
"""Fetch the bootstrap info from the bootstrap server."""
|
|
||||||
try:
|
|
||||||
url = f"http://{self.bootstrap_addr}/route?engine_rank={engine_rank}&target_dp_group={target_dp_group}&target_pp_rank={target_pp_rank}"
|
|
||||||
response = requests.get(url, timeout=5)
|
|
||||||
if response.status_code == 200:
|
|
||||||
bootstrap_info = response.json()
|
|
||||||
return bootstrap_info
|
|
||||||
else:
|
|
||||||
logger.error(
|
|
||||||
f"Failed to get prefill server info: {response.status_code}, {response.text}"
|
|
||||||
)
|
|
||||||
return None
|
|
||||||
except Exception as e:
|
|
||||||
logger.error(f"Error fetching prefill info from bootstrap: {e}")
|
|
||||||
return None
|
|
||||||
|
|
||||||
def _register_kv_args(self):
|
def _register_kv_args(self):
|
||||||
for bootstrap_info in self.bootstrap_infos:
|
for bootstrap_info in self.bootstrap_infos:
|
||||||
packed_kv_data_ptrs = b"".join(
|
packed_kv_data_ptrs = b"".join(
|
||||||
|
|||||||
Reference in New Issue
Block a user