Skip to content

Commit

Permalink
Merge branch 'master' into no-copy-np-col-major
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikerRUS authored Dec 5, 2024
2 parents 0d86338 + d4d6c87 commit eb60e6e
Show file tree
Hide file tree
Showing 71 changed files with 586 additions and 404 deletions.
2 changes: 1 addition & 1 deletion .ci/test-r-package-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ Write-Output "Done installing Rtools"
Write-Output "Installing CMake"
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$env:CMAKE_PATH/cmake.zip", "$env:CMAKE_PATH") ; Assert-Output $?
# Remove old CMake shiped with RTools
# Remove old CMake shipped with RTools
Remove-Item "$env:RTOOLS_MINGW_BIN/cmake.exe" -Force -ErrorAction Ignore
Write-Output "Done installing CMake"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
This pull request has been automatically locked since there has not been any recent activity since it was closed.
To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues
including a reference to this.
# what shoulld the locking status be?
# what should the locking status be?
issue-lock-reason: 'resolved'
pr-lock-reason: 'resolved'
process-only: 'issues, prs'
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,10 @@ repos:
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.10.0.1
hooks:
- id: shellcheck
- id: shellcheck
- repo: https://github.com/crate-ci/typos
rev: v1.23.2
hooks:
- id: typos
args: ["--force-exclude"]
exclude: (\.gitignore$)|(^\.editorconfig$)
21 changes: 21 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
default.extend-ignore-re = [
"/Ot",
"mis-alignment",
"mis-spelled",
"posix-seh-rt",
]

[default.extend-words]
MAPE = "MAPE"
datas = "datas"
interprete = "interprete"
mape = "mape"
splitted = "splitted"

[default.extend-identifiers]
ERRORs = "ERRORs"
GAM = "GAM"
ND24s = "ND24s"
WARNINGs = "WARNINGs"
fullset = "fullset"
thess = "thess"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ option(USE_SWIG "Enable SWIG to generate Java API" OFF)
option(USE_TIMETAG "Set to ON to output time costs" OFF)
option(USE_CUDA "Enable CUDA-accelerated training " OFF)
option(USE_DEBUG "Set to ON for Debug mode" OFF)
option(USE_SANITIZER "Use santizer flags" OFF)
option(USE_SANITIZER "Use sanitizer flags" OFF)
set(
ENABLED_SANITIZERS
"address" "leak" "undefined"
Expand Down
4 changes: 2 additions & 2 deletions R-package/R/lgb.Booster.R
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ predict.lgb.Booster <- function(object,
#'
#' Requesting a different prediction type or passing parameters to \link{predict.lgb.Booster}
#' will cause it to ignore the fast-predict configuration and take the slow route instead
#' (but be aware that an existing configuration might not always be overriden by supplying
#' (but be aware that an existing configuration might not always be overridden by supplying
#' different parameters or prediction type, so make sure to check that the output is what
#' was expected when a prediction is to be made on a single row for something different than
#' what is configured).
Expand All @@ -1128,7 +1128,7 @@ predict.lgb.Booster <- function(object,
#' and as such, this function will produce an error if passing \code{csr=TRUE} and
#' \code{type = "contrib"} together.
#' @inheritParams lgb_predict_shared_params
#' @param model LighGBM model object (class \code{lgb.Booster}).
#' @param model LightGBM model object (class \code{lgb.Booster}).
#'
#' \bold{The object will be modified in-place}.
#' @param csr Whether the prediction function is going to be called on sparse CSR inputs.
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/lgb.importance.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' \item{\code{Feature}: Feature names in the model.}
#' \item{\code{Gain}: The total gain of this feature's splits.}
#' \item{\code{Cover}: The number of observation related to this feature.}
#' \item{\code{Frequency}: The number of times a feature splited in trees.}
#' \item{\code{Frequency}: The number of times a feature split in trees.}
#' }
#'
#' @examples
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/lgb.model.dt.tree.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' \emph{New in version 4.4.0}
#'
#' @return
#' A \code{data.table} with detailed information about model trees' nodes and leafs.
#' A \code{data.table} with detailed information about model trees' nodes and leaves.
#'
#' The columns of the \code{data.table} are:
#'
Expand Down
2 changes: 1 addition & 1 deletion R-package/R/lightgbm.R
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ NULL
#' system, but be aware that getting the number of cores detected correctly requires package
#' \code{RhpcBLASctl} to be installed.
#'
#' This parameter gets overriden by \code{num_threads} and its aliases under \code{params}
#' This parameter gets overridden by \code{num_threads} and its aliases under \code{params}
#' if passed there.
#'
#' \emph{New in version 4.0.0}
Expand Down
2 changes: 1 addition & 1 deletion R-package/demo/cross_validation.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ logregobj <- function(preds, dtrain) {

# User-defined evaluation function returns a pair (metric_name, result, higher_better)
# NOTE: when you do customized loss function, the default prediction value is margin
# This may make built-in evalution metric calculate wrong results
# This may make built-in evaluation metric calculate wrong results
# For example, we are doing logistic loss, the prediction is score before logistic transformation
# Keep this in mind when you use the customization, and maybe you need write customized evaluation function
evalerror <- function(preds, dtrain) {
Expand Down
2 changes: 1 addition & 1 deletion R-package/demo/early_stopping.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ logregobj <- function(preds, dtrain) {

# User-defined evaluation function returns a pair (metric_name, result, higher_better)
# NOTE: when you do customized loss function, the default prediction value is margin
# This may make built-in evalution metric calculate wrong results
# This may make built-in evaluation metric calculate wrong results
# For example, we are doing logistic loss, the prediction is score before logistic transformation
# The built-in evaluation error assumes input is after logistic transformation
# Keep this in mind when you use the customization, and maybe you need write customized evaluation function
Expand Down
4 changes: 2 additions & 2 deletions R-package/man/lgb.configure_fast_predict.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion R-package/man/lgb.importance.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion R-package/man/lgb.model.dt.tree.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion R-package/man/lightgbm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions R-package/tests/testthat/test_basic.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set.seed(708L)
# to an accumulator then returns the current value.
# This is used to mock the situation where an evaluation
# metric increases every iteration
ACCUMULATOR_NAME <- "INCREASING_METRIC_ACUMULATOR"
ACCUMULATOR_NAME <- "INCREASING_METRIC_ACCUMULATOR"
assign(x = ACCUMULATOR_NAME, value = 0.0, envir = .GlobalEnv)

.increasing_metric <- function(preds, dtrain) {
Expand Down Expand Up @@ -1777,7 +1777,7 @@ test_that("lgb.train() works with early stopping for regression with a metric th
, early_stopping_rounds + 1L
)

# Booster should understand thatt all three of these metrics should be minimized
# Booster should understand that all three of these metrics should be minimized
eval_info <- bst$.__enclos_env__$private$get_eval_info()
expect_identical(eval_info, c("mape", "rmse", "l1"))
expect_identical(
Expand Down
2 changes: 1 addition & 1 deletion R-package/tests/testthat/test_custom_objective.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ logregobj <- function(preds, dtrain) {

# User-defined evaluation function returns a pair (metric_name, result, higher_better)
# NOTE: when you do customized loss function, the default prediction value is margin
# This may make built-in evalution metric calculate wrong results
# This may make built-in evaluation metric calculate wrong results
# Keep this in mind when you use the customization, and maybe you need write customized evaluation function
evalerror <- function(preds, dtrain) {
labels <- get_field(dtrain, "label")
Expand Down
2 changes: 1 addition & 1 deletion R-package/tests/testthat/test_lgb.interprete.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
log(x / (1.0 - x))
}

test_that("lgb.intereprete works as expected for binary classification", {
test_that("lgb.interprete works as expected for binary classification", {
data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
Expand Down
4 changes: 2 additions & 2 deletions R-package/tests/testthat/test_lgb.plot.interpretation.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
log(x / (1.0 - x))
}

test_that("lgb.plot.interepretation works as expected for binary classification", {
test_that("lgb.plot.interpretation works as expected for binary classification", {
data(agaricus.train, package = "lightgbm")
train <- agaricus.train
dtrain <- lgb.Dataset(train$data, label = train$label)
Expand Down Expand Up @@ -57,7 +57,7 @@ test_that("lgb.plot.interepretation works as expected for binary classification"
expect_null(plot_res)
})

test_that("lgb.plot.interepretation works as expected for multiclass classification", {
test_that("lgb.plot.interpretation works as expected for multiclass classification", {
data(iris)

# We must convert factors to numeric
Expand Down
2 changes: 1 addition & 1 deletion cmake/Sanitizer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ macro(enable_sanitizer sanitizer)
set(SAN_COMPILE_FLAGS "${SAN_COMPILE_FLAGS} -fsanitize=undefined -fno-sanitize-recover=undefined")

else()
message(FATAL_ERROR "Santizer ${sanitizer} not supported.")
message(FATAL_ERROR "Sanitizer ${sanitizer} not supported.")
endif()
endmacro()

Expand Down
4 changes: 2 additions & 2 deletions docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ After this runs, a LightGBM model can be found at `LightGBM-CLI-model.txt`.

For more details on how to configure and use the LightGBM CLI, see https://lightgbm.readthedocs.io/en/latest/Quick-Start.html.

## Running the Python-package Сontainer
## Running the Python-package Container

Build an image with the LightGBM Python-package installed.

Expand Down Expand Up @@ -114,7 +114,7 @@ docker run \
python
```

## Running the R-package Сontainer
## Running the R-package Container

Build an image with the LightGBM R-package installed.

Expand Down
Loading

0 comments on commit eb60e6e

Please sign in to comment.