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

A couple of fixes in rapids-logger usage #17588

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Dec 13, 2024

Description

This PR has two fixes:

  • Since we're pinning to a commit, a shallow clone will start failing as soon as HEAD gets bumped on the main branch (which will happen next when cuml/raft logging features are merged). We need to stop using shallow clones.
  • The CMake code for setting the default logging levels was setting the wrong macro name.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vyasr vyasr added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Dec 13, 2024
@vyasr vyasr self-assigned this Dec 13, 2024
@vyasr vyasr requested a review from a team as a code owner December 13, 2024 01:55
@github-actions github-actions bot added libcudf Affects libcudf (C++/CUDA) code. CMake CMake build issue labels Dec 13, 2024
Copy link
Contributor

@KyleFromNVIDIA KyleFromNVIDIA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're pinning to a commit, a shallow clone will start failing as soon as HEAD gets bumped on the main branch

Does CPM clone first and then check out the tag? I would expect it to use git clone -b, in which case this wouldn't be needed, but if that's how they're doing it then I see why it would be an issue.

@vyasr
Copy link
Contributor Author

vyasr commented Dec 14, 2024

CPM isn't doing anything at the git clone stage other than invoking FetchContent. I can replicate the behavior locally if I change my cudf to use commit f9b007ae30f924de2dca8c585334f0d55331d0b8 instead of the latest head c510947ae9d3a67530cfe3e5eaccb5a3b8ea0e55, see the traceback below. I don't think there's anything unexpected here, this is how ExternalProject is documented to work:

If GIT_SHALLOW is enabled then GIT_TAG works only with branch names and tags. A commit hash is not allowed.

Traceback
[0/7] Performing update step for 'rapids_logger-populate'
-- Fetching latest from the remote origin
fatal: unable to read tree (f9b007ae30f924de2dca8c585334f0d55331d0b8)
CMake Error at /home/coder/cudf/cpp/build/conda/cuda-12.5/release/_deps/rapids_logger-subbuild/rapids_logger-populate-prefix/tmp/rapids_logger-populate-gitupdate.cmake:202 (execute_process):
  execute_process failed command indexes:

    1: "Child return code: 128"



FAILED: rapids_logger-populate-prefix/src/rapids_logger-populate-stamp/rapids_logger-populate-update /home/coder/cudf/cpp/build/conda/cuda-12.5/release/_deps/rapids_logger-subbuild/rapids_logger-populate-prefix/src/rapids_logger-populate-stamp/rapids_logger-populate-update 
cd /home/coder/cudf/cpp/build/conda/cuda-12.5/release/_deps/rapids_logger-src && /home/coder/.conda/envs/rapids/bin/cmake -Dcan_fetch=YES -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -P /home/coder/cudf/cpp/build/conda/cuda-12.5/release/_deps/rapids_logger-subbuild/rapids_logger-populate-prefix/tmp/rapids_logger-populate-gitupdate.cmake
ninja: build stopped: subcommand failed.

CMake Error at /home/coder/.conda/envs/rapids/share/cmake-3.31/Modules/FetchContent.cmake:1918 (message):
  Build step for rapids_logger failed: 1
Call Stack (most recent call first):
  /home/coder/.conda/envs/rapids/share/cmake-3.31/Modules/FetchContent.cmake:1609 (__FetchContent_populateSubbuild)
  /home/coder/.conda/envs/rapids/share/cmake-3.31/Modules/FetchContent.cmake:2145:EVAL:2 (__FetchContent_doPopulation)
  /home/coder/.conda/envs/rapids/share/cmake-3.31/Modules/FetchContent.cmake:2145 (cmake_language)
  /home/coder/.conda/envs/rapids/share/cmake-3.31/Modules/FetchContent.cmake:1978:EVAL:1 (__FetchContent_Populate)
  /home/coder/.conda/envs/rapids/share/cmake-3.31/Modules/FetchContent.cmake:1978 (cmake_language)
  build/conda/cuda-12.5/release/cmake/CPM_0.40.0.cmake:1074 (FetchContent_Populate)
  build/conda/cuda-12.5/release/cmake/CPM_0.40.0.cmake:868 (cpm_fetch_package)
  CMakeLists.txt:278 (CPMAddPackage)

@vyasr vyasr requested a review from KyleFromNVIDIA December 16, 2024 17:22
@vyasr vyasr changed the title Stop using shallow clones of rapids-logger A couple of fixes in rapids-logger usage Dec 16, 2024
@vyasr
Copy link
Contributor Author

vyasr commented Dec 17, 2024

/merge

@rapids-bot rapids-bot bot merged commit 24aacb2 into rapidsai:branch-25.02 Dec 17, 2024
115 checks passed
@vyasr vyasr deleted the fix/rapids_logger_pinning branch December 17, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CMake CMake build issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants