Skip to content

Commit

Permalink
Avoid duplicate log entries
Browse files Browse the repository at this point in the history
Previously the logger would have two sinks configured (the default + our custom
one). This PR clears the default logger before registering our custom one.
  • Loading branch information
jcrist committed Jan 13, 2025
1 parent 7c715c4 commit 9dd4e11
Showing 1 changed file with 2 additions and 1 deletion.
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))

0 comments on commit 9dd4e11

Please sign in to comment.