def _fit_model(
        self,
        series,
        past_covariates,
        future_covariates,
        max_samples_per_ts,
        sample_weight,
        **kwargs,
    ):
        """
        Custom fit function for `SKLearnModelWithCategoricalCovariates` models, adding logic to let the model
        handle categorical features directly.
        """
        cat_col_indices, _ = self._get_categorical_features(
            series=series,
            past_covariates=past_covariates,
            future_covariates=future_covariates,
        )
        self._categorical_indices = cat_col_indices

        # cat_param_name is None if model has no attribute to specify categorical features in `fit()`
        cat_param_name = self._categorical_fit_param

        # Add attributes in kwargs if applicable for model's `fit()` method
        if cat_param_name is not None and len(cat_col_indices) > 0:
            kwargs[cat_param_name] = cat_col_indices

        super()._fit_model(
            series=series,
            past_covariates=past_covariates,
            future_covariates=future_covariates,
            max_samples_per_ts=max_samples_per_ts,
            sample_weight=sample_weight,
            **kwargs,
        )

        Custom fit function for `SKLearnModelWithCategoricalCovariates` models, adding logic to let the model
        handle categorical features directly.
        
darts/models/forecasting/sklearn_model.py