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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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