[Fix] Aggregate all IPC weight update responses (#39534)
Signed-off-by: bojiang-li <327132355+bojiang-li@users.noreply.github.com> Co-authored-by: hnyls2002 <lsyincs@gmail.com> Co-authored-by: Liangsheng Yin <hnyls2002@gmail.com>
This commit is contained in:
co-authored by
hnyls2002
Liangsheng Yin
parent
860fa83a9f
commit
06992c92ad
@@ -556,13 +556,12 @@ class TokenizerControlMixin:
|
|||||||
async with self.is_pause_cond:
|
async with self.is_pause_cond:
|
||||||
is_paused = self.is_pause
|
is_paused = self.is_pause
|
||||||
if is_paused:
|
if is_paused:
|
||||||
result = (await self.update_weights_from_ipc_communicator(obj))[0]
|
results = await self.update_weights_from_ipc_communicator(obj)
|
||||||
success, message = result.success, result.message
|
|
||||||
|
|
||||||
if not is_paused:
|
if not is_paused:
|
||||||
async with self.model_update_lock.writer_lock:
|
async with self.model_update_lock.writer_lock:
|
||||||
result = (await self.update_weights_from_ipc_communicator(obj))[0]
|
results = await self.update_weights_from_ipc_communicator(obj)
|
||||||
success, message = result.success, result.message
|
success, message = FanOutCommunicator.merge_results(results)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
error_msg = f"IPC weight update failed: {str(e)}"
|
error_msg = f"IPC weight update failed: {str(e)}"
|
||||||
logger.error(error_msg)
|
logger.error(error_msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user