Skip to content

Commit

Permalink
Set default logger level to warn (#17684)
Browse files Browse the repository at this point in the history
This PR leverages rapidsai/rapids-logger#8 to set the default logging level to warn and updates an associated test.

This PR also makes a CI script change to facilitate testing by ensuring that `RAPIDS_PY_CUDA_SUFFIX` is always defined before we would insert any download commands of files from linked CI.

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Bradley Dice (https://github.com/bdice)
  - David Wendt (https://github.com/davidwendt)

URL: #17684
  • Loading branch information
vyasr authored Jan 6, 2025
1 parent b81d9e1 commit 7182745
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ci/build_wheel_libcudf.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash
# Copyright (c) 2023-2024, NVIDIA CORPORATION.
# Copyright (c) 2023-2025, NVIDIA CORPORATION.

set -euo pipefail

package_name="libcudf"
package_dir="python/libcudf"

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

rapids-logger "Generating build requirements"

rapids-dependency-file-generator \
Expand All @@ -28,8 +30,6 @@ export PIP_NO_BUILD_ISOLATION=0
export SKBUILD_CMAKE_ARGS="-DUSE_NVCOMP_RUNTIME_WHEEL=ON"
./ci/build_wheel.sh "${package_name}" "${package_dir}"

RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})"

mkdir -p ${package_dir}/final_dist
python -m auditwheel repair \
--exclude libnvcomp.so.4 \
Expand Down
2 changes: 1 addition & 1 deletion cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ rapids_cpm_init()

include(${rapids-cmake-dir}/cpm/rapids_logger.cmake)
rapids_cpm_rapids_logger()
rapids_make_logger(cudf EXPORT_SET cudf-exports)
rapids_make_logger(cudf EXPORT_SET cudf-exports LOGGER_DEFAULT_LEVEL WARN)

# find jitify
include(cmake/thirdparty/get_jitify.cmake)
Expand Down
4 changes: 2 additions & 2 deletions cpp/tests/utilities_tests/logger_tests.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -55,7 +55,7 @@ TEST_F(LoggerTest, DefaultLevel)
cudf::default_logger().warn("warn");
cudf::default_logger().error("error");
cudf::default_logger().critical("critical");
ASSERT_EQ(this->sink_content(), "info\nwarn\nerror\ncritical\n");
ASSERT_EQ(this->sink_content(), "warn\nerror\ncritical\n");
}

TEST_F(LoggerTest, CustomLevel)
Expand Down

0 comments on commit 7182745

Please sign in to comment.