rapidsai / raft

RAFT contains fundamental widely-used algorithms and primitives for machine learning and information retrieval. The algorithms are CUDA-accelerated and form building blocks for more easily writing high performance applications.
https://docs.rapids.ai/api/raft/stable/
Apache License 2.0
683 stars 180 forks source link

[QST] How to change log level in pylibraft #2309

Open zjoukhadar opened 1 month ago

zjoukhadar commented 1 month ago

I'm using the pylibraft library in Python and need to change the logging level from the default INFO to WARN. The C++ documentation states that logging levels can be changed using the set_level() method, as shown below:

raft::logger::get().set_level(RAFT_LEVEL_WARN); // From now onwards, this will print only WARN and above kind of messages

However, I couldn't find a similar method or binding for adjusting the logging level in the pylibraft Python wrapper. Currently, the logging level is set to INFO by default.

How can I change the logging level to WARN in pylibraft when using it in Python? Are there any bindings or workarounds available for this?

Any guidance or examples would be greatly appreciated!