def encode_train(
        self,
        target: SupportedTimeSeries,
        past_covariates: Optional[SupportedTimeSeries] = None,
        future_covariates: Optional[SupportedTimeSeries] = None,
        encode_past: bool = True,
        encode_future: bool = True,
    ) -> tuple[
        Union[TimeSeries, Sequence[TimeSeries]], Union[TimeSeries, Sequence[TimeSeries]]
    ]:
        """Returns encoded index for all past and/or future covariates for training.
        Which covariates are generated depends on the parameters used at model creation.

        Parameters
        ----------
        target
            The target TimeSeries used during training or passed to prediction as `series`.
        past_covariates
            Optionally, the past covariates used for training.
        future_covariates
            Optionally, the future covariates used for training.
        encode_past
            Whether to apply encoders for past covariates.
        encode_future
            Whether to apply encoders for future covariates.
        Returns
        -------
        Tuple[past_covariates, future_covariates]
            The past_covariates and/or future_covariates for training including the encodings.
            If input {x}_covariates is None and no {x}_encoders are given, will return `None`
            for the {x}_covariates.
        Raises
        ------
        Warning
            If model was created with `add_encoders` and there is suspicion of lazy loading.
            The encodings/covariates are generated eagerly before starting training for all individual targets and
            loaded into memory. Depending on the size of target data, this can create memory
            issues. In case this applies, consider setting `add_encoders=None` at model
            creation and build your encodings covariates manually for lazy loading.
        """
        if not self.fit_called:
            if not isinstance(target, (TimeSeries, list)):
                logger.warning(
                    "Fitting was called with `add_encoders` and suspicion of lazy loading. "
                    "The encodings/covariates are generated pre-train for all individual targets and "
                    "loaded into memory. Depending on the size of your data, this can create memory issues. "
                    "In case this applies, consider setting `add_encoders=None` at model creation."
                )

            self._fit_called = True
        past_covariates, future_covariates = self._launch_encoder(
            target=target,
            past_covariates=past_covariates,
            future_covariates=future_covariates,
            encoder_method=_EncoderMethod("train"),
            n=None,
            encode_past=encode_past,
            encode_future=encode_future,
        )
        self._fit_called = True
        return past_covariates, future_covariates
Returns encoded index for all past and/or future covariates for training.
        Which covariates are generated depends on the parameters used at model creation.

        Parameters
        ----------
        target
            The target TimeSeries used during training or passed to prediction as `series`.
        past_covariates
            Optionally, the past covariates used for training.
        future_covariates
            Optionally, the future covariates used for training.
        encode_past
            Whether to apply encoders for past covariates.
        encode_future
            Whether to apply encoders for future covariates.
        Returns
        -------
        Tuple[past_covariates, future_covariates]
            The past_covariates and/or future_covariates for training including the encodings.
            If input {x}_covariates is None and no {x}_encoders are given, will return `None`
            for the {x}_covariates.
        Raises
        ------
        Warning
            If model was created with `add_encoders` and there is suspicion of lazy loading.
            The encodings/covariates are generated eagerly before starting training for all individual targets and
            loaded into memory. Depending on the size of target data, this can create memory
            issues. In case this applies, consider setting `add_encoders=None` at model
            creation and build your encodings covariates manually for lazy loading.
        
darts/dataprocessing/encoders/encoders.py