Avoid blank lines with federated training (#8342)

This commit is contained in:
Rong Ou
2022-10-13 23:55:01 -07:00
committed by GitHub
parent b3208aac4e
commit 80e10e02ab

View File

@@ -114,7 +114,7 @@ def communicator_print(msg: Any) -> None:
msg = str(msg)
is_dist = _LIB.XGCommunicatorIsDistributed()
if is_dist != 0:
_check_call(_LIB.XGCommunicatorPrint(c_str(msg)))
_check_call(_LIB.XGCommunicatorPrint(c_str(msg.strip())))
else:
print(msg.strip(), flush=True)