Skip to content

Commit 80e10e0

Browse files
authored
Avoid blank lines with federated training (dmlc#8342)
1 parent b3208aa commit 80e10e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python-package/xgboost/collective.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def communicator_print(msg: Any) -> None:
114114
msg = str(msg)
115115
is_dist = _LIB.XGCommunicatorIsDistributed()
116116
if is_dist != 0:
117-
_check_call(_LIB.XGCommunicatorPrint(c_str(msg)))
117+
_check_call(_LIB.XGCommunicatorPrint(c_str(msg.strip())))
118118
else:
119119
print(msg.strip(), flush=True)
120120

0 commit comments

Comments
 (0)