Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid duplicate log entries #6222

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/cuml/cuml/internals/logger.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ IF GPUBUILD == 1:
cdef cppclass sink_vector:
void push_back(const sink_ptr& sink) except +
void pop_back() except +
void clear()

cdef extern from "cuml/common/logger.hpp" namespace "ML" nogil:
cdef cppclass logger:
Expand Down
3 changes: 2 additions & 1 deletion python/cuml/cuml/internals/logger.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -319,5 +319,6 @@ def flush():


IF GPUBUILD == 1:
# Set callback functions to handle redirected sys.stdout in Python
# Clear existing sinks and add a callback sink to redirect to sys.stdout
default_logger().sinks().clear()
default_logger().sinks().push_back(<sink_ptr> make_shared[callback_sink_mt](_log_callback, _log_flush))
Loading