From 80e10e02aba45cc54795e075720896c9eec9519e Mon Sep 17 00:00:00 2001 From: Rong Ou Date: Thu, 13 Oct 2022 23:55:01 -0700 Subject: [PATCH] Avoid blank lines with federated training (#8342) --- python-package/xgboost/collective.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-package/xgboost/collective.py b/python-package/xgboost/collective.py index 72890c78c0f2..f040b8e72887 100644 --- a/python-package/xgboost/collective.py +++ b/python-package/xgboost/collective.py @@ -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)