Use simple print in tracker print function. (#6609)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
# coding: utf-8
|
||||
# pylint: disable= invalid-name
|
||||
"""Distributed XGBoost Rabit related API."""
|
||||
import sys
|
||||
import ctypes
|
||||
import pickle
|
||||
import numpy as np
|
||||
@@ -79,8 +78,7 @@ def tracker_print(msg):
|
||||
if is_dist != 0:
|
||||
_check_call(_LIB.RabitTrackerPrint(c_str(msg)))
|
||||
else:
|
||||
sys.stdout.write(msg)
|
||||
sys.stdout.flush()
|
||||
print(msg.strip(), flush=True)
|
||||
|
||||
|
||||
def get_processor_name():
|
||||
|
||||
@@ -293,7 +293,7 @@ class RabitTracker(object):
|
||||
s = SlaveEntry(fd, s_addr)
|
||||
if s.cmd == 'print':
|
||||
msg = s.sock.recvstr()
|
||||
logging.info(msg.strip())
|
||||
print(msg.strip(), flush=True)
|
||||
continue
|
||||
if s.cmd == 'shutdown':
|
||||
assert s.rank >= 0 and s.rank not in shutdown
|
||||
|
||||
Reference in New Issue
Block a user