Skip to content

Commit 1bcd5c7

Browse files
authored
Normalize whitespace (#6238)
This PR applies `pre-commit` hooks to normalize whitespace (trimming trailing whitespace and enforcing consistent end-of-file newlines). These rules are already applied to most other RAPIDS repos, so this PR aligns with the norm in RAPIDS. Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Jake Awe (https://github.com/AyodeAwe) - Vyas Ramasubramani (https://github.com/vyasr) - Dante Gama Dessavre (https://github.com/dantegd) URL: #6238
1 parent bd7c69e commit 1bcd5c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+96
-99
lines changed

.github/labeler.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Cython / Python:
66
- 'python/**'
77
- 'notebooks/**'
8-
8+
99
CUDA/C++:
1010
- 'cpp/**'
1111

@@ -18,4 +18,3 @@ ci:
1818

1919
conda:
2020
- 'conda/**'
21-

.pre-commit-config.yaml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
---
2-
# Copyright (c) 2023, NVIDIA CORPORATION.
2+
# Copyright (c) 2023-2025, NVIDIA CORPORATION.
33

44
repos:
5+
- repo: https://github.com/pre-commit/pre-commit-hooks
6+
rev: v5.0.0
7+
hooks:
8+
- id: trailing-whitespace
9+
- id: end-of-file-fixer
510
- repo: https://github.com/psf/black
611
rev: 22.10.0
712
hooks:

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
identification within third-party archives.
188188

189189
Copyright 2018 NVIDIA CORPORATION
190-
190+
191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.
193193
You may obtain a copy of the License at

ci/checks/black_lists.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright (c) 2019-2023, NVIDIA CORPORATION.
2+
# Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
##########################################
44
# cuML black listed function call Tester #
55
##########################################
@@ -40,7 +40,7 @@ done
4040

4141
for cond_black_listed in cudaMemcpy cudaMemset; do
4242
TMP=`git --no-pager diff --ignore-submodules -w --minimal -U0 -S"$cond_black_listed" $PR_TARGET_BRANCH | grep '^+' | grep -v '^+++' | grep -P "$cond_black_listed(?!Async)"`
43-
43+
4444
if [ "$TMP" != "" ]; then
4545
for filename in `git --no-pager diff --ignore-submodules -w --minimal --name-only -S"$cond_black_listed" $PR_TARGET_BRANCH`; do
4646
basefilename=$(basename -- "$filename")

codecov.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ comment:
1111
# undocumented option:
1212
# https://community.codecov.io/t/unable-to-determine-a-parent-commit-to-compare-against-in-base-branch-after-squash-and-merge/2480/15
1313
codecov:
14-
allow_coverage_offsets: true
14+
allow_coverage_offsets: true

cpp/.clang-tidy

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ WarningsAsErrors: '*'
44
HeaderFilterRegex: ''
55
AnalyzeTemporaryDtors: false
66
FormatStyle: none
7-
CheckOptions:
7+
CheckOptions:
88
- key: cert-dcl16-c.NewSuffixes
99
value: 'L;LL;LU;LLU'
1010
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
@@ -142,4 +142,3 @@ CheckOptions:
142142
- key: readability-identifier-naming.TypedefSuffix
143143
value: ''
144144
...
145-

cpp/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ message(VERBOSE "CUML_CPP: RMM_LOGGING_LEVEL = '${RMM_LOGGING_LEVEL}'.")
115115
set(LIBCUML_LOGGING_LEVEL
116116
"DEBUG"
117117
CACHE STRING "Choose the logging level."
118-
)
118+
)
119119
set_property(
120120
CACHE LIBCUML_LOGGING_LEVEL PROPERTY STRINGS "TRACE" "DEBUG" "INFO" "WARN" "ERROR" "CRITICAL"
121121
"OFF"

cpp/cmake/modules/ConfigureAlgorithms.cmake

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#=============================================================================
2-
# Copyright (c) 2022-2024, NVIDIA CORPORATION.
2+
# Copyright (c) 2022-2025, NVIDIA CORPORATION.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -129,4 +129,3 @@ else()
129129
set(LINK_CUVS ON)
130130
endif()
131131
endif()
132-

cpp/examples/symreg/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# symbolic regression
2-
This subfolder contains an example on how perform symbolic regression in cuML (from C++)
2+
This subfolder contains an example on how perform symbolic regression in cuML (from C++)
33
There are two `CMakeLists.txt` in this folder:
44
1. `CMakeLists.txt` (default) which is included when building cuML
55
2. `CMakeLists_standalone.txt` as an example for a stand alone project linking to `libcuml.so`
@@ -11,7 +11,7 @@ $ cmake .. -DCUML_LIBRARY_DIR=/path/to/directory/with/libcuml.so -DCUML_INCLUDE_
1111
```
1212
Then build with `make` or `ninja`
1313
```
14-
$ make
14+
$ make
1515
Scanning dependencies of target raft
1616
[ 10%] Creating directories for 'raft'
1717
[ 20%] Performing download step (git clone) for 'raft'
@@ -28,7 +28,7 @@ Scanning dependencies of target symreg_example
2828
[100%] Linking CUDA executable symreg_example
2929
[100%] Built target symreg_example
3030
```
31-
`CMakeLists_standalone.txt` also loads a minimal set of header dependencies(namely [raft](https://github.com/rapidsai/raft) and [cub](https://github.com/NVIDIA/cub)) if they are not detected in the system.
31+
`CMakeLists_standalone.txt` also loads a minimal set of header dependencies(namely [raft](https://github.com/rapidsai/raft) and [cub](https://github.com/NVIDIA/cub)) if they are not detected in the system.
3232
## Run
3333

3434
1. Generate a toy training and test dataset
@@ -53,7 +53,7 @@ $ ./symreg_example -n_cols 2 \
5353
-stopping_criteria 0.01 \
5454
-p_crossover 0.7 \
5555
-p_subtree 0.1 \
56-
-p_hoist 0.05 \
56+
-p_hoist 0.05 \
5757
-p_point 0.1 \
5858
-parsimony_coefficient 0.01
5959
```
@@ -77,11 +77,11 @@ Finished training for 4 generations.
7777
Best AST equation :( add( sub( mult( X0, X0) , div( X1, X1) ) , sub( X1, mult( X1, X1) ) ) )
7878
Training time = 626.658ms
7979
***************************************
80-
Beginning Inference on Test dataset...
80+
Beginning Inference on Test dataset...
8181
Inference score on test set = 5.29271e-08
8282
Inference time = 0.35248ms
8383
Some Predicted test values:
8484
-1.65061;-1.64081;-0.91711;-2.28976;-0.280688;
8585
Corresponding Actual test values:
8686
-1.65061;-1.64081;-0.91711;-2.28976;-0.280688;
87-
```
87+
```

cpp/include/cuml/common/pinned_host_vector.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021-2023, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,4 +61,4 @@ class pinned_host_vector {
6161
std::size_t size_;
6262
};
6363

64-
} // namespace ML
64+
} // namespace ML

cpp/include/cuml/experimental/fil/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ RAPIDS Forest Inference Library (FIL) provides accelerated inference for
33
tree-based machine learning models. Unlike packages like XGBoost,
44
LightGBM, or even Scikit-Learn/cuML's random forest implementations, FIL
55
cannot be used to _train_ forest models. Instead, its goal is to speed up
6-
inference using forest models trained by all of those packages.
6+
inference using forest models trained by all of those packages.
77

88
This directory contains an experimental new implementation of FIL which
99
provides both CPU and GPU execution. Its GPU implementation also offers
10-
improved performance relative to the existing implementation in many but not all cases.
10+
improved performance relative to the existing implementation in many but not all cases.
1111

1212
For Python usage information and more extensive information on
1313
parameter-tuning and other end-user functionality, check out

cpp/include/cuml/solvers/params.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, NVIDIA CORPORATION.
2+
* Copyright (c) 2018-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,4 +33,4 @@ enum loss_funct {
3333

3434
enum penalty { NONE, L1, L2, ELASTICNET };
3535

36-
}; // namespace ML
36+
}; // namespace ML

cpp/include/cuml/tsa/holtwinters_params.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -46,4 +46,4 @@ struct OptimParams {
4646

4747
enum Norm { L0, L1, L2, LINF };
4848

49-
} // namespace ML
49+
} // namespace ML

cpp/src/dbscan/vertexdeg/pack.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2018-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -65,4 +65,4 @@ struct Pack {
6565

6666
} // namespace VertexDeg
6767
} // namespace Dbscan
68-
} // namespace ML
68+
} // namespace ML

cpp/src/decisiontree/batched-levelalgo/bins.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2022, NVIDIA CORPORATION.
2+
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -73,4 +73,4 @@ struct AggregateBin {
7373
}
7474
};
7575
} // namespace DT
76-
} // namespace ML
76+
} // namespace ML

cpp/src/genetic/constants.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,4 +28,4 @@ const int GENE_TPB = 256;
2828
const int MAX_STACK_SIZE = 20;
2929

3030
} // namespace genetic
31-
} // namespace cuml
31+
} // namespace cuml

cpp/src/glm/qn/mg/glm_base_mg.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -204,4 +204,4 @@ struct GLMWithDataMG : ML::GLM::detail::GLMWithData<T, GLMObjective> {
204204
};
205205
}; // namespace opg
206206
}; // namespace GLM
207-
}; // namespace ML
207+
}; // namespace ML

cpp/src/glm/qn/mg/standardization.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2023-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -377,4 +377,4 @@ struct Standardizer {
377377

378378
}; // namespace opg
379379
}; // namespace GLM
380-
}; // namespace ML
380+
}; // namespace ML

cpp/src/hdbscan/detail/kernels/membership.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -70,4 +70,4 @@ struct probabilities_functor {
7070
}; // namespace Membership
7171
}; // namespace detail
7272
}; // namespace HDBSCAN
73-
}; // namespace ML
73+
}; // namespace ML

cpp/src/hdbscan/detail/kernels/stabilities.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2021-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -61,4 +61,4 @@ struct stabilities_functor {
6161
}; // namespace Stability
6262
}; // namespace detail
6363
}; // namespace HDBSCAN
64-
}; // namespace ML
64+
}; // namespace ML

cpp/src/hdbscan/detail/predict.cuh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2022-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -272,4 +272,4 @@ void approximate_predict(const raft::handle_t& handle,
272272
}; // end namespace Predict
273273
}; // end namespace detail
274274
}; // end namespace HDBSCAN
275-
}; // end namespace ML
275+
}; // end namespace ML

cpp/src/tsne/kluger_lab_license.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,4 @@ General Public License. (e.g. they do not require you to accompany any object
132132
code using FFTW with the corresponding source code.) For these alternative
133133
terms you must purchase a license from MIT’s Technology Licensing Office. Users
134134
interested in such a license should contact us ([email protected]) for more
135-
information.
135+
information.

cpp/src_prims/datasets/boston.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -535,4 +535,4 @@ static const int n_features = 13;
535535

536536
} // namespace Boston
537537
} // namespace Datasets
538-
} // namespace MLCommon
538+
} // namespace MLCommon

cpp/src_prims/datasets/breast_cancer.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -1989,4 +1989,4 @@ static const int n_features = 30;
19891989

19901990
} // namespace BreastCancer
19911991
} // namespace Datasets
1992-
} // namespace MLCommon
1992+
} // namespace MLCommon

cpp/src_prims/datasets/diabetes.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2021, NVIDIA CORPORATION.
2+
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -1504,4 +1504,4 @@ static const int n_features = 10;
15041504

15051505
} // namespace Diabetes
15061506
} // namespace Datasets
1507-
} // namespace MLCommon
1507+
} // namespace MLCommon

cpp/test/c_api/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ To help prevent accidentally including the C-API files when compiling `libcuml++
1717
#error \
1818
"This header is only for the C-API and should not be included from the C++ API."
1919
#endif
20-
```
20+
```

cpp/test/mg/kmeans_test.cu

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2022-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2022-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -203,4 +203,4 @@ INSTANTIATE_TEST_CASE_P(KmeansTests, KmeansTestF, ::testing::ValuesIn(inputsf2))
203203

204204
INSTANTIATE_TEST_CASE_P(KmeansTests, KmeansTestD, ::testing::ValuesIn(inputsd2));
205205

206-
} // end namespace ML
206+
} // end namespace ML

cpp/test/sg/handle_test.cu

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019-2024, NVIDIA CORPORATION.
2+
* Copyright (c) 2019-2025, NVIDIA CORPORATION.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -45,4 +45,4 @@ TEST(HandleTest, DoubleDestoryFails)
4545
// handle is destroyed
4646
status = cumlDestroy(handle);
4747
EXPECT_EQ(CUML_INVALID_HANDLE, status);
48-
}
48+
}

0 commit comments

Comments
 (0)