• Installation
    • Overview
    • Python package installation
    • CatBoost for Apache Spark installation
    • R package installation
    • Command-line version binary
    • Build from source
  • Key Features
  • Training parameters
  • Python package
  • CatBoost for Apache Spark
  • R package
  • Command-line version
  • Applying models
  • Objectives and metrics
  • Model analysis
  • Data format description
  • Parameter tuning
  • Speeding up the training
  • Data visualization
  • Algorithm details
  • FAQ
  • Educational materials
  • Development and contributions
  • Contacts

Development and contributions

Build from source

Run tests

Warning

CatBoost uses CMake-based build process since this commit. Previously Ya Make (Yandex's build system) had been used.

The following documentation describes running tests using Ya Make which is applicable only for versions prior to this commit.

Documentation for tests for CMake-based build is in progress.

CatBoost provides tests that check the compliance of the canonical data with the resulting data.

The required steps for running these tests depend on the implementation.

  1. Execute common tests:

    1. Open the catboost/pytest directory from the local copy of the CatBoost repository.

    2. Run the following command:

    ../../ya make -t -A [-Z]
    

    -Z — Optional key to replace the canonical files if the code breaks tests intentionally.

  2. Execute tests for the GPU implementation:

    1. Open the catboost/pytest/cuda_tests directory from the local copy of the CatBoost repository.

    2. Run the following command:

    ../../../ya make -DCUDA_ROOT=<path_to_CUDA_SDK> -t -A [-Z]
    
    • path_to_CUDA_SDK is the path to directory where CUDA SDK is installed. For example, the typical installation directory for Linux is /usr/local/cuda-X.Y, where X.Y is the installed CUDA SDK version.

    • -Z — Optional key to replace the canonical files if the code breaks tests intentionally.

Use the VCS diff tool to analyze the differences.

  1. Execute common tests:

    1. Open the catboost/python-package/ut/medium directory from the local copy of the CatBoost repository.

    2. Run the following command:

    ../../../../ya make -t -A [-Z]
    

    -Z — Optional key to replace the canonical files if the code breaks tests intentionally.

  2. Execute tests for the GPU implementation:

    1. Open the catboost/python-package/ut/medium/gpu directory from the local copy of the CatBoost repository.

    2. Run the following command:

    ../../../../../ya make -DCUDA_ROOT=<path_to_CUDA_SDK> -t -A [-Z]
    
    • path_to_CUDA_SDK is the path to directory where CUDA SDK is installed. For example, the typical installation directory for Linux is /usr/local/cuda-X.Y, where X.Y is the installed CUDA SDK version.

    • -Z — Optional key to replace the canonical files if the code breaks tests intentionally.

Use the VCS diff tool to analyze the differences.

  1. Install additional R packages that are required to run tests:

    • caret
    • dplyr
    • jsonlite
    • testthat
  2. Open the R-package directory from the local copy of the CatBoost repository.

  3. Run the following command:

    R CMD check .
    

To run tests using the devtools package:

  1. Install devtools.

  2. Run the following command from the R session:

    devtools::test()
    

Microsoft Visual Studio solution

Warning

Ready Microsoft Visual Studio solution had been provided until this commit.

For versions after this commit it is recommended to generate Microsoft Visual Studio 2019 solution using the corresponding CMake generator.

A solution for Visual Studio is available in the CatBoost repository:

catboost/msvs/arcadia.sln

Coding conventions

The following coding conventions must be followed in order to successfully contribute to the CatBoost project:

Versioning conventions

Do not change the package version when submitting pull requests. Yandex uses an internal repository for this purpose.

Yandex Contributor License Agreement

To contribute to CatBoost you need to read the Yandex CLA and indicate that you agree to its terms. Details of how to do that and the text of the CLA can be found in CONTRIBUTING.md.