From 5d15cf05fc4361cbc6d1576a6e1bcae518a018e2 Mon Sep 17 00:00:00 2001 From: Rong Ou Date: Thu, 13 Oct 2022 11:54:42 -0700 Subject: [PATCH] Avoid blank lines with federated training --- 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)