diff --git a/.appveyor.yml b/.appveyor.yml
index cd05cc8b341b..40e4597386bc 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -5,10 +5,11 @@ platform: x64
configuration:
- '3.10'
-# only build on 'master' and pull requests targeting it
+# only build on 'master' / 'main' and pull requests targeting it
branches:
only:
- master
+ - main
environment:
matrix:
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 9bae885e6c24..4be5966eff26 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -5,9 +5,10 @@ name: Build
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
diff --git a/.github/workflows/cpp.yml b/.github/workflows/cpp.yml
index f43258d6bd2a..b60a9ae5d454 100644
--- a/.github/workflows/cpp.yml
+++ b/.github/workflows/cpp.yml
@@ -3,9 +3,10 @@ name: C++
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
diff --git a/.github/workflows/optional_checks.yml b/.github/workflows/optional_checks.yml
index 6452b231751c..30f27d5cbce3 100644
--- a/.github/workflows/optional_checks.yml
+++ b/.github/workflows/optional_checks.yml
@@ -3,6 +3,7 @@ name: Optional checks
on:
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
diff --git a/.github/workflows/python_package.yml b/.github/workflows/python_package.yml
index 5a0dccd31793..57b18fc6508c 100644
--- a/.github/workflows/python_package.yml
+++ b/.github/workflows/python_package.yml
@@ -3,9 +3,10 @@ name: Python-package
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
@@ -477,8 +478,8 @@ jobs:
- test
- test-linux-aarch64
runs-on: ubuntu-latest
- # publish whenever a new commit is pushed to 'master'
- if: github.event_name == 'push' && github.ref == 'refs/heads/master'
+ # publish whenever a new commit is pushed to 'main'
+ if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment:
name: nightly-python-uploads
url: https://anaconda.org/lightgbm-packages/lightgbm
diff --git a/.github/workflows/r_package.yml b/.github/workflows/r_package.yml
index 54464cf1ace0..08f78d5ab027 100644
--- a/.github/workflows/r_package.yml
+++ b/.github/workflows/r_package.yml
@@ -3,9 +3,10 @@ name: R-package
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
diff --git a/.github/workflows/release_drafter.yml b/.github/workflows/release_drafter.yml
index fa1bca20a18e..fa40d17acb6d 100644
--- a/.github/workflows/release_drafter.yml
+++ b/.github/workflows/release_drafter.yml
@@ -3,7 +3,7 @@ name: Release Drafter
on:
push:
branches:
- - master
+ - main
# only 1 job running in the repo at any time
concurrency:
diff --git a/.github/workflows/static_analysis.yml b/.github/workflows/static_analysis.yml
index 6549ee4c516b..f0f9616960b8 100644
--- a/.github/workflows/static_analysis.yml
+++ b/.github/workflows/static_analysis.yml
@@ -5,9 +5,10 @@ name: Static Analysis
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
diff --git a/.github/workflows/swig.yml b/.github/workflows/swig.yml
index ec0b7c689c21..0953d0fe54b6 100644
--- a/.github/workflows/swig.yml
+++ b/.github/workflows/swig.yml
@@ -3,9 +3,10 @@ name: SWIG
on:
push:
branches:
- - master
+ - main
pull_request:
branches:
+ - main
- master
# automatically cancel in-progress builds if another commit is pushed
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 58a701a33c65..3a25dfb95d01 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,11 +6,11 @@ Your help is very valuable to make it better for everyone.
## How to Contribute
-- Check the [Feature Requests Hub](https://github.com/lightgbm-org/LightGBM/issues/2302), and submit pull requests to address chosen issue. If you need development guideline, you can check the [Development Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Development-Guide.rst) or directly ask us in Issues/Pull Requests.
-- Contribute to the [tests](https://github.com/lightgbm-org/LightGBM/tree/master/tests) to make it more reliable.
-- Contribute to the [documentation](https://github.com/lightgbm-org/LightGBM/tree/master/docs) to make it clearer for everyone.
-- Contribute to the [examples](https://github.com/lightgbm-org/LightGBM/tree/master/examples) to share your experience with other users.
-- Add your stories and experience to [Awesome LightGBM](https://github.com/lightgbm-org/LightGBM/blob/master/examples/README.md). If LightGBM helped you in a machine learning competition or some research application, we want to hear about it!
+- Check the [Feature Requests Hub](https://github.com/lightgbm-org/LightGBM/issues/2302), and submit pull requests to address chosen issue. If you need development guideline, you can check the [Development Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Development-Guide.rst) or directly ask us in Issues/Pull Requests.
+- Contribute to the [tests](https://github.com/lightgbm-org/LightGBM/tree/main/tests) to make it more reliable.
+- Contribute to the [documentation](https://github.com/lightgbm-org/LightGBM/tree/main/docs) to make it clearer for everyone.
+- Contribute to the [examples](https://github.com/lightgbm-org/LightGBM/tree/main/examples) to share your experience with other users.
+- Add your stories and experience to [Awesome LightGBM](https://github.com/lightgbm-org/LightGBM/blob/main/examples/README.md). If LightGBM helped you in a machine learning competition or some research application, we want to hear about it!
- [Open an issue](https://github.com/lightgbm-org/LightGBM/issues) to report problems or recommend new features.
## Development Guide
diff --git a/MAINTAINING.md b/MAINTAINING.md
index 198a7582e8fc..7930cefbabff 100644
--- a/MAINTAINING.md
+++ b/MAINTAINING.md
@@ -30,7 +30,7 @@ See https://pixi.prefix.dev/latest/ for more details.
### Step 1: Put up a Release PR
-Create a pull request into `master` which prepares the source code for release.
+Create a pull request into `main` which prepares the source code for release.
Copy the description and checklist from the previous release PR (for example: https://github.com/lightgbm-org/LightGBM/pull/6796).
@@ -41,11 +41,11 @@ and the PR should be used to discuss what makes it into the release.
Once the PR is approved, merge it.
-Do not merge any other PRs into `master` until the rest of the release is complete.
+Do not merge any other PRs into `main` until the rest of the release is complete.
-### Step 3: Wait for a New CI Run on `master`
+### Step 3: Wait for a New CI Run on `main`
-Wait for all CI runs triggered by the merge to `master` to complete successfully.
+Wait for all CI runs triggered by the merge to `main` to complete successfully.
These runs build and test the official artifacts that will be attached to the GitHub release and published to package managers.
@@ -56,7 +56,7 @@ Navigate to https://github.com/lightgbm-org/LightGBM/releases.
Click "edit" on the draft release that `release-drafter` has created there.
* update the tag and release title to match the version of LightGBM, in the format `v{major}.{minor}.{patch}`
-* ensure that tag points at the commit on ``master`` created by merging the release PR
+* ensure that tag points at the commit on `main` created by merging the release PR
When you're satisfied with the state of the release, click "Publish release".
@@ -77,7 +77,7 @@ gh release upload \
Where:
-* `COMMIT_ID` = full commit hash of the commit on `master` corresponding to the release
+* `COMMIT_ID` = full commit hash of the commit on `main` corresponding to the release
* `TAG` = the tag for the release (e.g. `v4.6.0`)
### Step 6: Complete All Other Post-merge Release Steps
@@ -88,7 +88,7 @@ See the release checklist on the PR for details.
## Nightly Packages
-Nightly packages for the `lightgbm` Python package are uploaded to https://anaconda.org/lightgbm-packages on every merge to `master`.
+Nightly packages for the `lightgbm` Python package are uploaded to https://anaconda.org/lightgbm-packages on every merge to `main`.
That's done using an upload token stored in a secret in CI.
Those tokens expire after 1 year.
diff --git a/R-package/R/aliases.R b/R-package/R/aliases.R
index 5c7119a9efc9..5251ccacff23 100644
--- a/R-package/R/aliases.R
+++ b/R-package/R/aliases.R
@@ -64,7 +64,7 @@
}
# [description]
-# Per https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parameters.rst#metric,
+# Per https://github.com/lightgbm-org/LightGBM/blob/main/docs/Parameters.rst#metric,
# a few different strings can be used to indicate "no metrics".
# [returns]
# A character vector
diff --git a/R-package/README.md b/R-package/README.md
index 81fbc0795134..6a40abfb8b1d 100644
--- a/R-package/README.md
+++ b/R-package/README.md
@@ -144,7 +144,7 @@ Rscript build_r.R --use-mingw
#### Mac OS Preparation
-You can perform installation either with **Apple Clang** or **gcc**. In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Installation-Guide.rst#apple-clang)) first. In case you prefer **gcc**, you need to install it (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Installation-Guide.rst#gcc)) and set some environment variables to tell R to use `gcc` and `g++`. If you install these from Homebrew, your versions of `g++` and `gcc` are most likely in `/usr/local/bin`, as shown below.
+You can perform installation either with **Apple Clang** or **gcc**. In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Installation-Guide.rst#apple-clang)) first. In case you prefer **gcc**, you need to install it (details for installation can be found in [Installation Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Installation-Guide.rst#gcc)) and set some environment variables to tell R to use `gcc` and `g++`. If you install these from Homebrew, your versions of `g++` and `gcc` are most likely in `/usr/local/bin`, as shown below.
```
# replace 8 with version of gcc installed on your machine
@@ -176,7 +176,7 @@ Note: for the build with Visual Studio/VS Build Tools in Windows, you should use
### Installing a GPU-enabled Build
-You will need to install Boost and OpenCL first: details for installation can be found in [Installation-Guide](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Installation-Guide.rst#build-gpu-version).
+You will need to install Boost and OpenCL first: details for installation can be found in [Installation-Guide](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Installation-Guide.rst#build-gpu-version).
After installing these other libraries, follow the steps in ["Installing from Source with CMake"](#install). When you reach the step that mentions `build_r.R`, pass the flag `--use-gpu`.
@@ -230,15 +230,15 @@ As of version 3.0.0, this is no longer supported. If building from source is dif
Examples
--------
-Please visit [demo](https://github.com/lightgbm-org/LightGBM/tree/master/R-package/demo):
+Please visit [demo](https://github.com/lightgbm-org/LightGBM/tree/main/R-package/demo):
-* [Basic walkthrough of wrappers](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/basic_walkthrough.R)
-* [Boosting from existing prediction](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/boost_from_prediction.R)
-* [Early Stopping](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/early_stopping.R)
-* [Cross Validation](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/cross_validation.R)
-* [Multiclass Training/Prediction](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/multiclass.R)
-* [Leaf (in)Stability](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/leaf_stability.R)
-* [Weight-Parameter Adjustment Relationship](https://github.com/lightgbm-org/LightGBM/blob/master/R-package/demo/weight_param.R)
+* [Basic walkthrough of wrappers](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/basic_walkthrough.R)
+* [Boosting from existing prediction](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/boost_from_prediction.R)
+* [Early Stopping](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/early_stopping.R)
+* [Cross Validation](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/cross_validation.R)
+* [Multiclass Training/Prediction](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/multiclass.R)
+* [Leaf (in)Stability](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/leaf_stability.R)
+* [Weight-Parameter Adjustment Relationship](https://github.com/lightgbm-org/LightGBM/blob/main/R-package/demo/weight_param.R)
Testing
-------
diff --git a/R-package/pkgdown/_pkgdown.yml b/R-package/pkgdown/_pkgdown.yml
index 044badb1b187..2fd640500ba5 100644
--- a/R-package/pkgdown/_pkgdown.yml
+++ b/R-package/pkgdown/_pkgdown.yml
@@ -10,7 +10,7 @@ site:
repo:
url:
home: https://github.com/lightgbm-org/LightGBM/
- source: https://github.com/lightgbm-org/LightGBM/tree/master/R-package/
+ source: https://github.com/lightgbm-org/LightGBM/tree/main/R-package/
issue: https://github.com/lightgbm-org/LightGBM/issues/
user: https://github.com/
@@ -48,7 +48,7 @@ navbar:
href: reference/index.html
right:
- icon: fa-github fa-lg
- href: https://github.com/lightgbm-org/LightGBM/tree/master/R-package
+ href: https://github.com/lightgbm-org/LightGBM/tree/main/R-package
reference:
- title: Datasets
diff --git a/README.md b/README.md
index 4dbb07d36597..8d3b18f2ed16 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
> [!NOTE]
> This project moved from `Microsoft/LightGBM` to `lightgbm-org/LightGBM` in March 2026.
@@ -8,16 +8,16 @@
Light Gradient Boosting Machine
===============================
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/cpp.yml)
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/python_package.yml)
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/r_package.yml)
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/cuda.yml)
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/swig.yml)
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/static_analysis.yml)
-[](https://ci.appveyor.com/project/guolinke/lightgbm/branch/master)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/cpp.yml)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/python_package.yml)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/r_package.yml)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/cuda.yml)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/swig.yml)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/static_analysis.yml)
+[](https://ci.appveyor.com/project/guolinke/lightgbm/branch/main)
[](https://lightgbm.readthedocs.io/)
-[](https://github.com/lightgbm-org/LightGBM/actions/workflows/lychee.yml)
-[](https://github.com/lightgbm-org/LightGBM/blob/master/LICENSE)
+[](https://github.com/lightgbm-org/LightGBM/actions/workflows/lychee.yml)
+[](https://github.com/lightgbm-org/LightGBM/blob/main/LICENSE)
[](https://jacobtomlinson.dev/effver)
[](https://stackoverflow.com/questions/tagged/lightgbm?sort=votes)
[](https://pypi.org/project/lightgbm)
@@ -35,11 +35,11 @@ LightGBM is a gradient boosting framework that uses tree based learning algorith
- Support of parallel, distributed, and GPU learning.
- Capable of handling large-scale data.
-For further details, please refer to [Features](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Features.rst).
+For further details, please refer to [Features](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Features.rst).
-Benefiting from these advantages, LightGBM is being widely-used in many [winning solutions](https://github.com/lightgbm-org/LightGBM/blob/master/examples/README.md#machine-learning-challenge-winning-solutions) of machine learning competitions.
+Benefiting from these advantages, LightGBM is being widely-used in many [winning solutions](https://github.com/lightgbm-org/LightGBM/blob/main/examples/README.md#machine-learning-challenge-winning-solutions) of machine learning competitions.
-[Comparison experiments](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Experiments.rst#comparison-experiment) on public datasets show that LightGBM can outperform existing boosting frameworks on both efficiency and accuracy, with significantly lower memory consumption. What's more, [distributed learning experiments](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Experiments.rst#parallel-experiment) show that LightGBM can achieve a linear speed-up by using multiple machines for training in specific settings.
+[Comparison experiments](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Experiments.rst#comparison-experiment) on public datasets show that LightGBM can outperform existing boosting frameworks on both efficiency and accuracy, with significantly lower memory consumption. What's more, [distributed learning experiments](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Experiments.rst#parallel-experiment) show that LightGBM can achieve a linear speed-up by using multiple machines for training in specific settings.
Get Started and Documentation
-----------------------------
@@ -48,18 +48,18 @@ Our primary documentation is at https://lightgbm.readthedocs.io/ and is generate
Next you may want to read:
-- [**Examples**](https://github.com/lightgbm-org/LightGBM/tree/master/examples) showing command line usage of common tasks.
-- [**Features**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Features.rst) and algorithms supported by LightGBM.
-- [**Parameters**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parameters.rst) is an exhaustive list of customization you can make.
-- [**Distributed Learning**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parallel-Learning-Guide.rst) and [**GPU Learning**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/GPU-Tutorial.rst) can speed up computation.
+- [**Examples**](https://github.com/lightgbm-org/LightGBM/tree/main/examples) showing command line usage of common tasks.
+- [**Features**](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Features.rst) and algorithms supported by LightGBM.
+- [**Parameters**](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Parameters.rst) is an exhaustive list of customization you can make.
+- [**Distributed Learning**](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Parallel-Learning-Guide.rst) and [**GPU Learning**](https://github.com/lightgbm-org/LightGBM/blob/main/docs/GPU-Tutorial.rst) can speed up computation.
- [**FLAML**](https://www.microsoft.com/en-us/research/project/fast-and-lightweight-automl-for-large-scale-data/articles/flaml-a-fast-and-lightweight-automl-library/) provides automated tuning for LightGBM ([code examples](https://microsoft.github.io/FLAML/docs/Examples/AutoML-for-LightGBM/)).
- [**Optuna Hyperparameter Tuner**](https://medium.com/optuna/lightgbm-tuner-new-optuna-integration-for-hyperparameter-optimization-8b7095e99258) provides automated tuning for LightGBM hyperparameters ([code examples](https://github.com/optuna/optuna-examples/blob/main/lightgbm/lightgbm_tuner_simple.py)).
- [**Understanding LightGBM Parameters (and How to Tune Them using Neptune)**](https://neptune.ai/blog/lightgbm-parameters-guide).
Documentation for contributors:
-- [**How we update readthedocs.io**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/README.rst).
-- Check out the [**Development Guide**](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Development-Guide.rst).
+- [**How we update readthedocs.io**](https://github.com/lightgbm-org/LightGBM/blob/main/docs/README.rst).
+- Check out the [**Development Guide**](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Development-Guide.rst).
News
----
@@ -171,7 +171,7 @@ Support
How to Contribute
-----------------
-Check [CONTRIBUTING](https://github.com/lightgbm-org/LightGBM/blob/master/CONTRIBUTING.md) page.
+Check [CONTRIBUTING](https://github.com/lightgbm-org/LightGBM/blob/main/CONTRIBUTING.md) page.
Microsoft Open Source Code of Conduct
-------------------------------------
@@ -192,4 +192,4 @@ Huan Zhang, Si Si and Cho-Jui Hsieh. "[GPU Acceleration for Large-scale Tree Boo
License
-------
-This project is licensed under the terms of the MIT license. See [LICENSE](https://github.com/lightgbm-org/LightGBM/blob/master/LICENSE) for additional details.
+This project is licensed under the terms of the MIT license. See [LICENSE](https://github.com/lightgbm-org/LightGBM/blob/main/LICENSE) for additional details.
diff --git a/docker/README.md b/docker/README.md
index 49edbed33999..54744d421bff 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -19,7 +19,7 @@ Build an image with the LightGBM CLI.
```shell
mkdir lightgbm-docker
cd lightgbm-docker
-wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/docker/dockerfile-cli
+wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/docker/dockerfile-cli
docker build \
-t lightgbm-cli \
-f dockerfile-cli \
@@ -40,7 +40,7 @@ output_model = LightGBM-CLI-model.txt
EOF
# get training data
-curl -O https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/examples/binary_classification/binary.train
+curl -O https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/examples/binary_classification/binary.train
# train, and save model to a text file
docker run \
@@ -62,7 +62,7 @@ Build an image with the LightGBM Python-package installed.
```shell
mkdir lightgbm-docker
cd lightgbm-docker
-wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/docker/dockerfile-python
+wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/docker/dockerfile-python
docker build \
-t lightgbm-python \
-f dockerfile-python \
@@ -74,7 +74,7 @@ Run the following to produce a model using the Python-package.
```shell
# get training data
-curl -O https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/examples/binary_classification/binary.train
+curl -O https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/examples/binary_classification/binary.train
# create training script
cat << EOF > train.py
@@ -121,7 +121,7 @@ Build an image with the LightGBM R-package installed.
```shell
mkdir lightgbm-docker
cd lightgbm-docker
-wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/docker/dockerfile-r
+wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/docker/dockerfile-r
docker build \
-t lightgbm-r \
@@ -134,7 +134,7 @@ Run the following to produce a model using the R-package.
```shell
# get training data
-curl -O https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/examples/binary_classification/binary.train
+curl -O https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/examples/binary_classification/binary.train
# create training script
cat << EOF > train.R
diff --git a/docker/gpu/README.md b/docker/gpu/README.md
index 6309e7317ffe..d359c9fcaece 100644
--- a/docker/gpu/README.md
+++ b/docker/gpu/README.md
@@ -35,7 +35,7 @@ Requires docker and [nvidia-docker](https://github.com/NVIDIA/nvidia-docker) on
```sh
mkdir lightgbm-docker
cd lightgbm-docker
-wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/master/docker/gpu/dockerfile.gpu
+wget https://raw.githubusercontent.com/lightgbm-org/LightGBM/main/docker/gpu/dockerfile.gpu
docker build -f dockerfile.gpu -t lightgbm-gpu .
```
diff --git a/docs/Development-Guide.rst b/docs/Development-Guide.rst
index 9d867533689b..ddcd5096be40 100644
--- a/docs/Development-Guide.rst
+++ b/docs/Development-Guide.rst
@@ -73,7 +73,7 @@ Refer to `docs README <./README.rst>`__.
C API
-----
-Refer to `C API <./C-API.rst>`__ or the comments in `c\_api.h `__ file, from which the documentation is generated.
+Refer to `C API <./C-API.rst>`__ or the comments in `c\_api.h `__ file, from which the documentation is generated.
Tests
-----
@@ -85,7 +85,7 @@ It is highly recommended to build tests with `sanitizers <./Installation-Guide.r
High Level Language Package
---------------------------
-See the implementations at `Python-package `__ and `R-package `__.
+See the implementations at `Python-package `__ and `R-package `__.
Questions
---------
diff --git a/docs/FAQ.rst b/docs/FAQ.rst
index 058156a61d6e..c9354f4d9810 100644
--- a/docs/FAQ.rst
+++ b/docs/FAQ.rst
@@ -182,7 +182,7 @@ See `lightgbm-org/LightGBM#3060 `__.
+You can find LightGBM's logo in different file formats and resolutions `here `__.
16. LightGBM crashes randomly or operating system hangs during or after running LightGBM.
-----------------------------------------------------------------------------------------
@@ -367,7 +367,7 @@ We are doing our best to provide universal wheels which have high running speed
However, sometimes it's just impossible to guarantee the possibility of usage of LightGBM in any specific environment (see `lightgbm-org/LightGBM#1743 `__).
Therefore, the first thing you should try in case of segfaults is **compiling from the source** using ``pip install --no-binary lightgbm lightgbm``.
-For the OS-specific prerequisites see https://github.com/lightgbm-org/LightGBM/blob/master/python-package/README.rst.
+For the OS-specific prerequisites see https://github.com/lightgbm-org/LightGBM/blob/main/python-package/README.rst.
Also, feel free to post a new issue in our GitHub repository. We always look at each case individually and try to find a root cause.
diff --git a/docs/GPU-Tutorial.rst b/docs/GPU-Tutorial.rst
index 6bdbfcce8b46..4749c1e48376 100644
--- a/docs/GPU-Tutorial.rst
+++ b/docs/GPU-Tutorial.rst
@@ -185,7 +185,7 @@ Huan Zhang, Si Si and Cho-Jui Hsieh. "`GPU Acceleration for Large-scale Tree Boo
.. _AMDGPU-Pro: https://www.amd.com/en/support.html
-.. _Python-package Examples: https://github.com/lightgbm-org/LightGBM/tree/master/examples/python-guide
+.. _Python-package Examples: https://github.com/lightgbm-org/LightGBM/tree/main/examples/python-guide
.. _GPU Acceleration for Large-scale Tree Boosting: https://arxiv.org/abs/1706.08359
diff --git a/docs/Installation-Guide.rst b/docs/Installation-Guide.rst
index a4af06e3ec0f..7dfe61aed8a8 100644
--- a/docs/Installation-Guide.rst
+++ b/docs/Installation-Guide.rst
@@ -44,7 +44,7 @@ To download such artifacts, run the following from the root of this repository.
bash .ci/download-artifacts.sh ${COMMIT_ID}
-Where ``COMMIT_ID`` is the full commit SHA pointing to a commit on ``master``.
+Where ``COMMIT_ID`` is the full commit SHA pointing to a commit on ``main``.
The artifacts can then be found in the ``release-artifacts/`` directory.
For the Python package, nightly packages are also available via installers like ``pip``.
@@ -282,7 +282,7 @@ gcc
Docker
~~~~~~
-Refer to `Docker folder `__.
+Refer to `Docker folder `__.
Build Threadless Version (not Recommended)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -693,7 +693,7 @@ The GPU version is not supported on macOS.
Docker
^^^^^^
-Refer to `GPU Docker folder `__.
+Refer to `GPU Docker folder `__.
Build CUDA Version
~~~~~~~~~~~~~~~~~~
@@ -973,7 +973,7 @@ Refer to `the python-package documentation`_.
Build R-package
~~~~~~~~~~~~~~~
-Refer to `R-package folder `__.
+Refer to `R-package folder `__.
Build C++ Unit Tests
~~~~~~~~~~~~~~~~~~~~
@@ -1134,7 +1134,7 @@ gcc
.. _this detailed guide: https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
-.. _the python-package documentation: https://github.com/lightgbm-org/LightGBM/tree/master/python-package
+.. _the python-package documentation: https://github.com/lightgbm-org/LightGBM/tree/main/python-package
.. _the ROCm docs: https://rocm.docs.amd.com/projects/install-on-linux/en/latest/
diff --git a/docs/Parallel-Learning-Guide.rst b/docs/Parallel-Learning-Guide.rst
index 461f9fcceced..965e257efb79 100644
--- a/docs/Parallel-Learning-Guide.rst
+++ b/docs/Parallel-Learning-Guide.rst
@@ -520,13 +520,13 @@ See `the mars documentation`_ for usage examples.
.. _the Dask DataFrame documentation: https://docs.dask.org/en/latest/dataframe.html
-.. _the Dask prediction example: https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/dask/prediction.py
+.. _the Dask prediction example: https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/dask/prediction.py
.. _the Dask worker documentation: https://distributed.dask.org/en/stable/worker-memory.html
.. _the metrics functions from dask-ml: https://ml.dask.org/modules/api.html#dask-ml-metrics-metrics
-.. _these Dask examples: https://github.com/lightgbm-org/LightGBM/tree/master/examples/python-guide/dask
+.. _these Dask examples: https://github.com/lightgbm-org/LightGBM/tree/main/examples/python-guide/dask
.. _Kubeflow XGBoost Operator: https://github.com/kubeflow/xgboost-operator
@@ -534,7 +534,7 @@ See `the mars documentation`_ for usage examples.
.. _here: https://www.youtube.com/watch?v=iqzXhp5TxUY
-.. _A simple distributed learning example: https://github.com/lightgbm-org/LightGBM/tree/master/examples/parallel_learning
+.. _A simple distributed learning example: https://github.com/lightgbm-org/LightGBM/tree/main/examples/parallel_learning
.. _lightgbm_ray: https://github.com/ray-project/lightgbm_ray
diff --git a/docs/Parameters.rst b/docs/Parameters.rst
index 09407e17f775..9aaea5b673dd 100644
--- a/docs/Parameters.rst
+++ b/docs/Parameters.rst
@@ -631,7 +631,7 @@ Learning Control Parameters
- **Note**: the forced split logic will be ignored, if the split makes gain worse
- - see `this file `__ as an example
+ - see `this file `__ as an example
- ``refit_decay_rate`` :raw-html:`🔗︎`, default = ``0.9``, type = double, constraints: ``0.0 <= refit_decay_rate <= 1.0``
@@ -969,7 +969,7 @@ Dataset Parameters
- ``.json`` file should contain an array of objects, each containing the word ``feature`` (integer feature index) and ``bin_upper_bound`` (array of thresholds for binning)
- - see `this file `__ as an example
+ - see `this file `__ as an example
- ``save_binary`` :raw-html:`🔗︎`, default = ``false``, type = bool, aliases: ``is_save_binary``, ``is_save_binary_file``
diff --git a/docs/Python-Intro.rst b/docs/Python-Intro.rst
index 2c4b8a5deefb..071aa5c344ed 100644
--- a/docs/Python-Intro.rst
+++ b/docs/Python-Intro.rst
@@ -5,7 +5,7 @@ This document gives a basic walk-through of LightGBM Python-package.
**List of other helpful links**
-- `Python Examples `__
+- `Python Examples `__
- `Python API <./Python-API.rst>`__
@@ -104,7 +104,7 @@ Features of using ``Sequence`` interface:
Please refer to ``Sequence`` `API doc <./Python-API.rst#data-structure-api>`__.
-`dataset_from_multi_hdf5.py `__ is a detailed example.
+`dataset_from_multi_hdf5.py `__ is a detailed example.
**Saving Dataset into a LightGBM binary file will make loading faster:**
@@ -264,4 +264,4 @@ If early stopping is enabled during training, you can get predictions from the b
ypred = bst.predict(data, num_iteration=bst.best_iteration)
-.. _Python-package: https://github.com/lightgbm-org/LightGBM/tree/master/python-package
+.. _Python-package: https://github.com/lightgbm-org/LightGBM/tree/main/python-package
diff --git a/docs/Quick-Start.rst b/docs/Quick-Start.rst
index 853e235313ee..0c2b676aef7a 100644
--- a/docs/Quick-Start.rst
+++ b/docs/Quick-Start.rst
@@ -71,13 +71,13 @@ For example, the following command line will keep ``num_trees=10`` and ignore th
Examples
--------
-- `Binary Classification `__
+- `Binary Classification `__
-- `Regression `__
+- `Regression `__
-- `Lambdarank `__
+- `Lambdarank `__
-- `Distributed Learning `__
+- `Distributed Learning `__
.. _CSV: https://en.wikipedia.org/wiki/Comma-separated_values
diff --git a/docs/README.rst b/docs/README.rst
index 6bcf1d564d2c..5eaac9edc6db 100644
--- a/docs/README.rst
+++ b/docs/README.rst
@@ -5,10 +5,10 @@ Documentation for LightGBM is generated using `Sphinx `__, which works on top of `Doxygen `__ output.
List of parameters and their descriptions in `Parameters.rst <./Parameters.rst>`__
-is generated automatically from comments in `config file `__
-by `this script `__.
+is generated automatically from comments in `config file `__
+by `this script `__.
-After each commit on ``master``, documentation is updated and published to `Read the Docs `__.
+After each commit on ``main``, documentation is updated and published to `Read the Docs `__.
Build
-----
diff --git a/examples/README.md b/examples/README.md
index d153f916a66d..50748de03521 100644
--- a/examples/README.md
+++ b/examples/README.md
@@ -3,7 +3,7 @@ Examples
You can learn how to use LightGBM by these examples.
-Comments in configuration files might be outdated. Actual information about parameters always can be found [here](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parameters.rst).
+Comments in configuration files might be outdated. Actual information about parameters always can be found [here](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Parameters.rst).
Machine Learning Challenge Winning Solutions
============================================
diff --git a/examples/parallel_learning/README.md b/examples/parallel_learning/README.md
index f59a94d0a11d..952c35a93cfb 100644
--- a/examples/parallel_learning/README.md
+++ b/examples/parallel_learning/README.md
@@ -19,4 +19,4 @@ Here is an example for LightGBM to perform distributed learning for 2 machines.
This distributed learning example is based on socket. LightGBM also supports distributed learning based on MPI.
-For more details about the usage of distributed learning, please refer to [this](https://github.com/lightgbm-org/LightGBM/blob/master/docs/Parallel-Learning-Guide.rst).
+For more details about the usage of distributed learning, please refer to [this](https://github.com/lightgbm-org/LightGBM/blob/main/docs/Parallel-Learning-Guide.rst).
diff --git a/examples/python-guide/README.md b/examples/python-guide/README.md
index a41b7c2d1645..26c867dd4c78 100644
--- a/examples/python-guide/README.md
+++ b/examples/python-guide/README.md
@@ -3,7 +3,7 @@ Python-package Examples
Here is an example for LightGBM to use Python-package.
-You should install LightGBM [Python-package](https://github.com/lightgbm-org/LightGBM/tree/master/python-package) first.
+You should install LightGBM [Python-package](https://github.com/lightgbm-org/LightGBM/tree/main/python-package) first.
You also need scikit-learn, pandas, matplotlib (only for plot example), and scipy (only for logistic regression example) to run the examples, but they are not required for the package itself. You can install them with pip:
@@ -20,19 +20,19 @@ python simple_example.py
Examples include:
- [`dask/`](./dask): examples using Dask for distributed training
-- [simple_example.py](https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/simple_example.py)
+- [simple_example.py](https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/simple_example.py)
- Construct Dataset
- Basic train and predict
- Eval during training
- Early stopping
- Save model to file
-- [sklearn_example.py](https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/sklearn_example.py)
+- [sklearn_example.py](https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/sklearn_example.py)
- Create data for learning with sklearn interface
- Basic train and predict with sklearn interface
- Feature importances with sklearn interface
- Self-defined eval metric with sklearn interface
- Find best parameters for the model with sklearn's GridSearchCV
-- [advanced_example.py](https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/advanced_example.py)
+- [advanced_example.py](https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/advanced_example.py)
- Construct Dataset
- Set feature names
- Directly use categorical features without one-hot encoding
@@ -48,12 +48,12 @@ Examples include:
- Self-defined objective function
- Self-defined eval metric
- Callback function
-- [logistic_regression.py](https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/logistic_regression.py)
+- [logistic_regression.py](https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/logistic_regression.py)
- Use objective `xentropy` or `binary`
- Use `xentropy` with binary labels or probability labels
- Use `binary` only with binary labels
- Compare speed of `xentropy` versus `binary`
-- [plot_example.py](https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/plot_example.py)
+- [plot_example.py](https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/plot_example.py)
- Construct Dataset
- Train and record eval results for further plotting
- Plot metrics recorded during training
@@ -61,6 +61,6 @@ Examples include:
- Plot split value histogram
- Plot one specified tree
- Plot one specified tree with Graphviz
-- [dataset_from_multi_hdf5.py](https://github.com/lightgbm-org/LightGBM/blob/master/examples/python-guide/dataset_from_multi_hdf5.py)
+- [dataset_from_multi_hdf5.py](https://github.com/lightgbm-org/LightGBM/blob/main/examples/python-guide/dataset_from_multi_hdf5.py)
- Construct Dataset from multiple HDF5 files
- Avoid loading all data into memory
diff --git a/examples/python-guide/dask/README.md b/examples/python-guide/dask/README.md
index b22d7770391b..dea2c93ecc6d 100644
--- a/examples/python-guide/dask/README.md
+++ b/examples/python-guide/dask/README.md
@@ -3,7 +3,7 @@ Dask Examples
This directory contains examples of machine learning workflows with LightGBM and [Dask](https://dask.org/).
-Before running this code, see [the installation instructions for the Dask-package](https://github.com/lightgbm-org/LightGBM/tree/master/python-package#install-dask-package).
+Before running this code, see [the installation instructions for the Dask-package](https://github.com/lightgbm-org/LightGBM/tree/main/python-package#install-dask-package).
After installing the package and its dependencies, any of the examples here can be run with a command like this:
diff --git a/include/LightGBM/config.h b/include/LightGBM/config.h
index dd1db59d8b3e..7d466cbae1e8 100644
--- a/include/LightGBM/config.h
+++ b/include/LightGBM/config.h
@@ -545,7 +545,7 @@ struct Config {
// desc = ``.json`` file can be arbitrarily nested, and each split contains ``feature``, ``threshold`` fields, as well as ``left`` and ``right`` fields representing subsplits
// desc = categorical splits are forced in a one-hot fashion, with ``left`` representing the split containing the feature value and ``right`` representing other values
// desc = **Note**: the forced split logic will be ignored, if the split makes gain worse
- // desc = see `this file `__ as an example
+ // desc = see `this file `__ as an example
std::string forcedsplits_filename = "";
// check = >=0.0
@@ -795,7 +795,7 @@ struct Config {
// desc = path to a ``.json`` file that specifies bin upper bounds for some or all features
// desc = ``.json`` file should contain an array of objects, each containing the word ``feature`` (integer feature index) and ``bin_upper_bound`` (array of thresholds for binning)
- // desc = see `this file `__ as an example
+ // desc = see `this file `__ as an example
std::string forcedbins_filename = "";
// [no-save]
diff --git a/python-package/README.rst b/python-package/README.rst
index 36f96c67bbbe..19cd71dd1eb9 100644
--- a/python-package/README.rst
+++ b/python-package/README.rst
@@ -40,7 +40,7 @@ You can install it by the following command: ``brew install libomp``.
Install Nightly Packages
''''''''''''''''''''''''
-Python packages are built on each new commit to ``master`` and uploaded to https://anaconda.org/lightgbm-packages.
+Python packages are built on each new commit to ``main`` and uploaded to https://anaconda.org/lightgbm-packages.
Only the latest development version is available there, and can be installed like this:
@@ -127,9 +127,9 @@ Build from Sources
For **macOS** users, you can perform installation either with **Apple Clang** or **gcc**.
-- In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in `Installation Guide `__) first.
+- In case you prefer **Apple Clang**, you should install **OpenMP** (details for installation can be found in `Installation Guide `__) first.
-- In case you prefer **gcc**, you need to install it (details for installation can be found in `Installation Guide `__) and specify compilers by running ``export CXX=g++-7 CC=gcc-7`` (replace "7" with version of **gcc** installed on your machine) first.
+- In case you prefer **gcc**, you need to install it (details for installation can be found in `Installation Guide `__) and specify compilers by running ``export CXX=g++-7 CC=gcc-7`` (replace "7" with version of **gcc** installed on your machine) first.
For **Windows** users, **Visual Studio** (or `VS Build Tools `_) is needed.
@@ -159,7 +159,7 @@ All requirements from `Build from Sources section <#build-from-sources>`__ apply
For **Windows** users, compilation with **MinGW-w64** is not supported.
-**MPI** libraries are needed: details for installation can be found in `Installation Guide `__.
+**MPI** libraries are needed: details for installation can be found in `Installation Guide `__.
|
@@ -174,7 +174,7 @@ All requirements from `Build from Sources section <#build-from-sources>`__ apply
For **macOS** users, the GPU version is not supported.
-**Boost** and **OpenCL** are needed: details for installation can be found in `Installation Guide `__.
+**Boost** and **OpenCL** are needed: details for installation can be found in `Installation Guide `__.
Almost always you also need to pass ``OpenCL_INCLUDE_DIR``, ``OpenCL_LIBRARY`` options for **Linux** and ``BOOST_ROOT``, ``BOOST_LIBRARYDIR`` options for **Windows** to **CMake** via ``pip`` options, like
.. code:: sh
@@ -235,7 +235,7 @@ All requirements from `Build from Sources section <#build-from-sources>`__ apply
For **macOS** and **Windows** users, the CUDA version is not supported.
-**CUDA** library is needed: details for installation can be found in `Installation Guide `__.
+**CUDA** library is needed: details for installation can be found in `Installation Guide `__.
Don't confuse with `GPU version <#build-gpu-version>`__.
To use the CUDA version within Python, pass ``{"device": "cuda"}`` respectively in parameters.
@@ -252,8 +252,8 @@ Build with MinGW-w64 on Windows
`MinGW-w64 `_ should be installed first.
It is recommended to use **Visual Studio** for its better multithreading efficiency in **Windows** for many-core systems
-(see `Question 4 `__
-and `Question 8 `__).
+(see `Question 4 `__
+and `Question 8 `__).
|
@@ -346,8 +346,8 @@ All requirements from `Build with Time Costs Output section <#build-with-time-co
If you get any errors during installation or due to any other reasons,
you may want to build dynamic library from sources by any method you prefer
-(see `Installation Guide `__).
-For example, you can use ``MSBuild`` tool and `solution file `__ from the repo.
+(see `Installation Guide `__).
+For example, you can use ``MSBuild`` tool and `solution file `__ from the repo.
.. code:: sh
@@ -372,12 +372,12 @@ In environments with restricted or no internet access, install those tools and t
Troubleshooting
---------------
-Refer to `FAQ `_.
+Refer to `FAQ `_.
Examples
--------
-Refer to the walk through examples in `Python guide folder `_.
+Refer to the walk through examples in `Python guide folder `_.
Supported Python Versions
-------------------------
@@ -408,7 +408,7 @@ Then run the following from the root of the repo.
Then open `htmlcov/index.html` to view a clickable coverage report.
.. |License| image:: https://img.shields.io/github/license/lightgbm-org/lightgbm.svg
- :target: https://github.com/lightgbm-org/LightGBM/blob/master/LICENSE
+ :target: https://github.com/lightgbm-org/LightGBM/blob/main/LICENSE
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/lightgbm.svg?logo=python&logoColor=white
:target: https://pypi.org/project/lightgbm
.. |PyPI Version| image:: https://img.shields.io/pypi/v/lightgbm.svg?logo=pypi&logoColor=white