---
metadata:
  - name: generator
    content: Diplodoc Platform v5.50.3
alternate:
  - https://catboost.ai/docs/en/concepts/python-reference_catboost_fit.md
---
> **Documentation Index:** Fetch the complete configuration index at https://catboost.ai/docs/en/llms.txt

# fit

<!-- source: en/_includes/work_src/reusage/fit--purpose-desc.md -->
Train a model.
<!-- endsource: en/_includes/work_src/reusage/fit--purpose-desc.md -->


<!-- source: en/_includes/work_src/reusage-python/how-to-train-on-gpu.md -->
{% note info %}

Set the `task_type` parameter in the class constructor to GPU to train the model on GPU. Training on GPU requires NVIDIA Driver of version 450.xx or higher.

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage-python/how-to-train-on-gpu.md -->


## Method call format {#call-format}

```python
fit(X,
    y=None,
    cat_features=None,
    text_features=None,
    embedding_features=None,
    pairs=None,
    graph=None,
    sample_weight=None,
    group_id=None,
    group_weight=None,
    subgroup_id=None,
    pairs_weight=None,
    baseline=None,
    use_best_model=None,
    eval_set=None,
    verbose=None,
    logging_level=None,
    plot=False,
    plot_file=None,
    column_description=None,
    verbose_eval=None,
    metric_period=None,
    silent=None,
    early_stopping_rounds=None,
    save_snapshot=None,
    snapshot_file=None,
    snapshot_interval=None,
    init_model=None,
    log_cout=sys.stdout,
    log_cerr=sys.stderr)
```

## Parameters {#parameters}

<!-- source: en/_includes/work_src/reusage/python--catboost--precedence-p.md -->
Some parameters duplicate the ones specified in the constructor of the [CatBoost](https://catboost.ai/docs/en/concepts/python-reference_catboost.md) class. In these cases the values specified for the [fit](https://catboost.ai/docs/en/concepts/python-reference_catboost_fit.md) method take precedence. The rest of the training parameters must be set in the constructor of the [CatBoost](https://catboost.ai/docs/en/concepts/python-reference_catboost.md) class.
<!-- endsource: en/_includes/work_src/reusage/python--catboost--precedence-p.md -->

### X

#### Description

The description is different for each group of possible types.

**Possible types**

{% cut "catboost.Pool" %}

The input training dataset.

{% note info %}

If a nontrivial value of the `cat_features` parameter is specified in the constructor of this class, CatBoost checks the equivalence of categorical features indices specification from the constructor parameters and in this Pool class.

{% endnote %}

{% endcut %}

{% cut "list, numpy.ndarray, pandas.DataFrame, pandas.Series, polars.DataFrame" %}

The input training dataset in the form of a two-dimensional feature matrix.

{% endcut %}

{% cut "pandas.SparseDataFrame, scipy.sparse.spmatrix (all subclasses except dia_matrix)" %}

<!-- source: en/_includes/work_src/reusage-formats/libsvm__desc.md -->
The input training dataset in the form of a two-dimensional sparse feature matrix.
<!-- endsource: en/_includes/work_src/reusage-formats/libsvm__desc.md -->

{% endcut %}

**Default value**

Required parameter

**Supported processing units**

CPU and GPU


### y

#### Description

<!-- source: en/_includes/work_src/reusage/label--short-desc-training.md -->
The target variables (in other words, the objects' label values) for the training dataset.
<!-- endsource: en/_includes/work_src/reusage/label--short-desc-training.md -->

<!-- source: en/_includes/work_src/reusage/label--detailed-desc-generic.md -->
Must be in the form of a one- or two- dimensional array. The type of data in the array depends on the machine learning task being solved:
- Regression and ranking — One-dimensional array of numeric values.
- Multiregression - Two-dimensional array of numeric values. The first index is for a dimension, the second index is for an object.
- Binary classification
    One-dimensional array containing one of:

    * Booleans, integers or strings that represent the labels of the classes (only two unique values).
    * Numeric values.
        The interpretation of numeric values depends on the selected loss function:

        - Logloss — The value is considered a positive class if it is strictly greater than the value of the `target_border` training parameter. Otherwise, it is considered a negative class.
        - CrossEntropy — The value is interpreted as the probability that the dataset object belongs to the positive class. Possible values are in the range `[0; 1]`.

- Multiclassification — One-dimensional array of integers or strings that represent the labels of the classes.
- Multi label classification
    Two-dimensional array. The first index is for a label/class, the second index is for an object.

    Possible values depend on the selected loss function:

    * MultiLogloss — Only {0, 1} or {False, True} values are allowed that specify whether an object belongs to the class corresponding to the first index.
    * MultiCrossEntropy — Numerical values in the range `[0; 1]` that are interpreted as the probability that the dataset object belongs to the class corresponding to the first index.
<!-- endsource: en/_includes/work_src/reusage/label--detailed-desc-generic.md -->

{% note info %}

Do not use this parameter if the input training dataset (specified in the `X` parameter) type is catboost.Pool.

{% endnote %}

<!-- source: en/_includes/work_src/reusage/label--possible-types-default-supported-processing-units.md -->
**Possible types**

- list
- numpy.ndarray
- pandas.DataFrame
- pandas.Series
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)
- [polars.DataFrame](https://docs.pola.rs/api/python/stable/reference/dataframe/index.html)

**Default value**

None

**Supported processing units**

CPU and GPU
<!-- endsource: en/_includes/work_src/reusage/label--possible-types-default-supported-processing-units.md -->

### cat_features

#### Description

A one-dimensional array of categorical columns indices.

Use it only if the `X` parameter is a two-dimensional feature matrix (has one of the following types: list, numpy.ndarray, pandas.DataFrame, pandas.Series), polars.DataFrame.

{% note info %}

The `cat_features` parameter can also be specified in the constructor of the class. If it is, CatBoost checks the equivalence of the `cat_features` parameter specified in this method and in the constructor of the class.

{% endnote %}


**Possible types**


- list
- numpy.ndarray

**Default value**

None (all features are either considered numerical or of other types if specified precisely)

**Supported processing units**

CPU and GPU



### text_features

#### Description

A one-dimensional array of text columns indices (specified as integers) or names (specified as strings).

<!-- source: en/_includes/work_src/reusage/python__cat_features__description__non-catfeatures-text.md -->
Use only if the `data` parameter is a two-dimensional feature matrix (has one of the following types: list, numpy.ndarray, pandas.DataFrame, pandas.Series), polars.DataFrame.

If any elements in this array are specified as names instead of indices, names for all columns must be provided. To do this, either use the `feature_names` parameter of this constructor to explicitly specify them or pass a pandas.DataFrame, polars.DataFrame with column names specified in the `data` parameter.
<!-- endsource: en/_includes/work_src/reusage/python__cat_features__description__non-catfeatures-text.md -->


**Possible types**

- list
- numpy.ndarray

**Default value**

None (all features are either considered numerical or of other types if specified precisely)

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### embedding_features

#### Description

A one-dimensional array of embedding columns indices (specified as integers) or names (specified as strings).

<!-- source: en/_includes/work_src/reusage/python__cat_features__description__non-catfeatures-text.md -->
Use only if the `data` parameter is a two-dimensional feature matrix (has one of the following types: list, numpy.ndarray, pandas.DataFrame, pandas.Series), polars.DataFrame.

If any elements in this array are specified as names instead of indices, names for all columns must be provided. To do this, either use the `feature_names` parameter of this constructor to explicitly specify them or pass a pandas.DataFrame, polars.DataFrame with column names specified in the `data` parameter.
<!-- endsource: en/_includes/work_src/reusage/python__cat_features__description__non-catfeatures-text.md -->

**Possible types**

- list
- numpy.ndarray

**Default value**

<!-- source: en/_includes/concepts/default-value-none.md -->
**Default value**

None (all features are either considered numerical or of other types if specified precisely)
<!-- endsource: en/_includes/concepts/default-value-none.md -->

**Supported processing units**

CPU and GPU



### pairs

#### Description

The pairs description in the form of a two-dimensional matrix of shape `N` by 2:

- `N` is the number of pairs.
- The first element of the pair is the zero-based index of the winner object from the input dataset for pairwise comparison.
- The second element of the pair is the zero-based index of the loser object from the input dataset for pairwise comparison.

<!-- source: en/_includes/work_src/reusage/learn_pairs__where_is_used.md -->
This information is used for calculation and optimization of [Pairwise metrics](https://catboost.ai/docs/en/concepts/loss-functions-ranking.md).
<!-- endsource: en/_includes/work_src/reusage/learn_pairs__where_is_used.md -->


**Possible types**

- list
- numpy.ndarray
- pandas.DataFrame
- [polars.DataFrame](https://docs.pola.rs/api/python/stable/reference/dataframe/index.html)


**Default value**



<!-- source: en/_includes/work_src/reusage/python__pairs__default-short.md -->
None
<!-- endsource: en/_includes/work_src/reusage/python__pairs__default-short.md -->


<!-- source: en/_includes/work_src/reusage-common-phrases/pairwisemetrics_require_pairs_data.md -->
[Pairwise metrics](https://catboost.ai/docs/en/concepts/loss-functions-ranking.md) require pairs data. If this data is not provided explicitly by specifying this parameter, pairs are generated automatically in each group using object label values.
<!-- endsource: en/_includes/work_src/reusage-common-phrases/pairwisemetrics_require_pairs_data.md -->


**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->

### graph

#### Description

The graph description in the form of a two-dimensional matrix of shape `N` by 2:

- `N` is the number of edges.
- The first element of the edge is the zero-based index of start vertex (object) from the input dataset.
- The second element of the edge is the zero-based index of end vertex (object) from the input dataset.

<!-- source: en/_includes/work_src/reusage/graph__where_is_used.md -->
Graph information is used to calculate the [graph aggregated features](https://catboost.ai/docs/en/features/graph-aggregated-features.md).
<!-- endsource: en/_includes/work_src/reusage/graph__where_is_used.md -->

**Possible types**

- list
- numpy.ndarray
- pandas.DataFrame
- [polars.DataFrame](https://docs.pola.rs/api/python/stable/reference/dataframe/index.html)


**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### sample_weight

#### Description

<!-- source: en/_includes/work_src/reusage/python__weight__short-desc-intro.md -->
The weight of each object in the input data in the form of a one-dimensional array-like data.
<!-- endsource: en/_includes/work_src/reusage/python__weight__short-desc-intro.md -->


<!-- source: en/_includes/work_src/reusage/python__weight__short-desc__outro.md -->
By default, it is set to 1 for all objects.
<!-- endsource: en/_includes/work_src/reusage/python__weight__short-desc__outro.md -->


**Possible types**

- list
- numpy.ndarray
- pandas.DataFrame
- pandas.Series
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### group_id

#### Description

Group identifiers for all input objects. Supported identifier types are:
- int
- string types (string or unicode for Python 2 and bytes or string for Python 3).


**Possible types**

- list
- numpy.ndarray
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)

**Default value**



None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu.md -->
CPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu.md -->



### group_weight

#### Description

The weights of all objects within the defined groups from the input data in the form of one-dimensional array-like data.

Used for calculating the final values of trees. By default, it is set to 1 for all objects in all groups.

<!-- source: en/_includes/work_src/reusage/python__group-and-group-weight__restriction.md -->
{% note alert %}

Only one of the following parameters can be used at a time:

- `weight`
- `group_weight`

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage/python__group-and-group-weight__restriction.md -->


**Possible types**

- list
- numpy.ndarray
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu.md -->
CPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu.md -->



### subgroup_id

#### Description

Subgroup identifiers for all input objects. Supported identifier types are:
- int
- string types (string or unicode for Python 2 and bytes or string for Python 3).

**Possible types**

- list
- numpy.ndarray
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)

**Default value**



None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu.md -->
CPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu.md -->



### pairs_weight

#### Description


The weight of each input pair of objects in the form of one-dimensional array-like pairs. The number of given values must match the number of specified pairs.

<!-- source: en/_includes/work_src/reusage/learn_pairs__where_is_used.md -->
This information is used for calculation and optimization of [Pairwise metrics](https://catboost.ai/docs/en/concepts/loss-functions-ranking.md).
<!-- endsource: en/_includes/work_src/reusage/learn_pairs__where_is_used.md -->


By default, it is set to 1 for all pairs.


**Possible types**

- list
- numpy.ndarray
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### baseline

#### Description

<!-- source: en/_includes/work_src/reusage/baseline--short-desc1.md -->
Array of formula values for all input objects. The training starts from these values for all input objects instead of starting from zero.
<!-- endsource: en/_includes/work_src/reusage/baseline--short-desc1.md -->


{% note info %}

Do not use this parameter if the input training dataset (specified in the `X` parameter) type is catboost.Pool.

{% endnote %}


**Possible types**

- list
- numpy.ndarray
- [polars.Series](https://docs.pola.rs/api/python/stable/reference/series/index.html)
- [polars.DataFrame](https://docs.pola.rs/api/python/stable/reference/dataframe/index.html)

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### use_best_model

#### Description

If this parameter is set, the number of trees that are saved in the resulting model is defined as follows:
1. Build the number of trees defined by the training parameters.
1. Use the validation dataset to identify the iteration with the optimal value of the metric specified in  `--eval-metric` (`--eval-metric`).

No trees are saved after this iteration.

This option requires a validation dataset to be provided.

**Possible types**

bool

**Default value**

True if validation sets are specified (the `eval_set` parameter is defined) and at least one of the label values of objects in the last validation dataset differs from the others. False otherwise.

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->


### eval_set

#### Description

The validation dataset or datasets used for the following processes:
- [overfitting detector](https://catboost.ai/docs/en/concepts/overfitting-detector.md)
- the best iteration selection
- monitoring metrics' changes

**Possible types**

- catboost.Pool
- list of catboost.Pool
- tuple (X, y)
- list of tuples (X, y)
- string (path to the dataset file)
- list of strings (paths to dataset files)

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->


{% note info %}

GPU training does not support multiple validation datasets for now

{% endnote %}


### verbose

_Alias:_`verbose_eval`

#### Description

<!-- source: en/_includes/work_src/reusage/python__feature-importances__verbose__short-description__list-intro.md -->
The purpose of this parameter depends on the type of the given value:
<!-- endsource: en/_includes/work_src/reusage/python__feature-importances__verbose__short-description__list-intro.md -->


- bool — Defines the logging level:
    - <q>True</q>  corresponds to the Verbose logging level
    - <q>False</q> corresponds to the Silent logging level

- int — Use the Verbose logging level and set the logging period to the value of this parameter.

{% note alert %}

Do not use this parameter with the `logging_level` parameter.

{% endnote %}

**Possible types**

- bool
- int

**Default value**

1

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### logging_level

#### Description

The logging level to output to stdout.

Possible values:
- Silent — Do not output any logging information to stdout.

- Verbose — Output the following data to stdout:

    - optimized metric
    - elapsed time of training
    - remaining time of training

- Info — Output additional information and the number of trees.

- Debug — Output debugging information.

**Possible types**

string

**Default value**

None (corresponds to the Verbose logging level)

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### plot

#### Description

Plot the following information during training:
- the metric values;
- the custom loss values;
- the loss function change during feature selection;
- the time has passed since training started;
- the remaining time until the end of training.
  This [option can be used](https://catboost.ai/docs/en/features/visualization_jupyter-notebook.md) if training is performed in Jupyter notebook.

**Possible types**

bool

**Default value**

False

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu.md -->
CPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu.md -->



### plot_file

#### Description

Save a plot with the training progress information (metric values, custom loss values) to the file specified by this parameter.

**Possible types**

File-like object or string

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### column_description

#### Description

<!-- source: en/_includes/work_src/reusage/cd-short-desct.md -->
The path to the input file  that contains the [columns description](https://catboost.ai/docs/en/concepts/input-data_column-descfile.md).
<!-- endsource: en/_includes/work_src/reusage/cd-short-desct.md -->


The given file is used to build pools from the train and/or validation datasets, which are input from files.

**Possible types:**

string

**Default value**



None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### metric_period

#### Description

The frequency of iterations to calculate the values of [objectives and metrics](https://catboost.ai/docs/en/concepts/loss-functions.md). The value should be a positive integer.

The usage of this parameter speeds up the training.

{% note info %}

It is recommended to increase the value of this parameter to maintain training speed if a GPU processing unit type is used.

{% endnote %}

**Possible types**

int

**Default value**

1

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### silent

#### Description

Defines the logging level:
- <q>True</q> — corresponds to the Silent logging level
- <q>False</q> — corresponds to the Verbose logging level

**Possible types**

bool

**Default value**

False

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### early_stopping_rounds

#### Description

Sets the overfitting detector type to Iter and stops the training after the specified number of iterations since the iteration with the optimal metric value.

**Possible types**

int

**Default value**

False

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### save_snapshot

#### Description
Enable snapshotting for [restoring the training progress after an interruption](https://catboost.ai/docs/en/features/snapshots.md). If enabled, the default period for making snapshots is 600 seconds. Use the `snapshot_interval` parameter to change this period.

<!-- source: en/_includes/work_src/reusage-common-phrases/snapshot-not-working-for-cv.md -->
{% note info %}

This parameter is not supported in the `params` parameter of the [cv](https://catboost.ai/docs/en/concepts/python-reference_cv.md) function.

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage-common-phrases/snapshot-not-working-for-cv.md -->

**Possible types**

bool

**Default value**

None

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### snapshot_file

#### Description

The name of the file to save the training progress information in. This file is used for [recovering training after an interruption](https://catboost.ai/docs/en/features/snapshots.md).

<!-- source: en/_includes/work_src/reusage/snapshot-filename-desc.md -->
Depending on whether the specified file exists in the file system:
- Missing — Write information about training progress to the specified file.
- Exists — Load data from the specified file and continue training from where it left off.
<!-- endsource: en/_includes/work_src/reusage/snapshot-filename-desc.md -->


<!-- source: en/_includes/work_src/reusage-common-phrases/snapshot-not-working-for-cv.md -->
{% note info %}

This parameter is not supported in the `params` parameter of the [cv](https://catboost.ai/docs/en/concepts/python-reference_cv.md) function.

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage-common-phrases/snapshot-not-working-for-cv.md -->

**Possible types**

string

**Default value**

experiment.cbsnapshot

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### snapshot_interval

#### Description

The interval between saving snapshots in seconds.

The first snapshot is taken after the specified number of seconds since the start of training. Every subsequent snapshot is taken after the specified number of seconds since the previous one. The last snapshot is taken at the end of the training.

<!-- source: en/_includes/work_src/reusage-common-phrases/snapshot-not-working-for-cv.md -->
{% note info %}

This parameter is not supported in the `params` parameter of the [cv](https://catboost.ai/docs/en/concepts/python-reference_cv.md) function.

{% endnote %}
<!-- endsource: en/_includes/work_src/reusage-common-phrases/snapshot-not-working-for-cv.md -->

**Possible types**

int

**Default value**

600

**Supported processing units**

<!-- source: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->
CPU and GPU
<!-- endsource: en/_includes/work_src/reusage-python/cpu-and-gpu.md -->



### init_model

#### Description

The description is different for each group of possible types.

The model to continue learning from.

{% note info %}

The initial model must have the same problem type as the one being solved in the current training (binary classification, multiclassification or regression/ranking).

{% endnote %}

**Possible types**

{% cut "catboost.CatBoost, catboost.CatBoostClassifier, catboost.CatBoostRegressor" %}

The initial model object.

{% endcut %}


{% cut "string" %}

The path to the input file that contains the initial model.

{% endcut %}

**Default value**

None (incremental learning is not used)

**Supported processing units**

CPU

<!-- source: en/_includes/work_src/reusage-python/python__log-params.md -->
###  log_cout

Output stream or callback for logging.

**Possible types**

- callable Python object
- python object providing the `write()` method

**Default value**

sys.stdout

###  log_cerr

Error stream or callback for logging.

**Possible types**

- callable Python object
- python object providing the `write()` method

**Default value**

sys.stderr
<!-- endsource: en/_includes/work_src/reusage-python/python__log-params.md -->
