tabular/src/autogluon/tabular/models/abstract/abstract_model.py
def _preprocess_nonadaptive(self, X: pd.DataFrame, **kwargs) -> pd.DataFrame:
        """
        Note: This method is intended for advanced users. It is usually sufficient to implement all preprocessing in `_preprocess` and leave this method untouched.
            The potential benefit of implementing preprocessing in this method is an inference speedup when used in a bagged ensemble.
        Data transformation logic that is non-stateful or ignores internal data values beyond feature dtypes should be added here.
        In bagged ensembles, preprocessing code that lives here will be executed only once per inference call regardless of the number of child models.
        If preprocessing code will produce the same output regardless of which child model processes the input data, then it should live here to avoid redundant repeated processing for each child.
        This means this method cannot be used for data normalization. Refer to `_preprocess` instead.
        """
        if self.features is None:
            self._preprocess_set_features(X=X)
        # TODO: In online-inference this becomes expensive, add option to remove it (only safe in controlled environment where it is already known features are present
        if list(X.columns) != self.features:
            X = X[self.features]
        return X

        Note: This method is intended for advanced users. It is usually sufficient to implement all preprocessing in `_preprocess` and leave this method untouched.
            The potential benefit of implementing preprocessing in this method is an inference speedup when used in a bagged ensemble.
        Data transformation logic that is non-stateful or ignores internal data values beyond feature dtypes should be added here.
        In bagged ensembles, preprocessing code that lives here will be executed only once per inference call regardless of the number of child models.
        If preprocessing code will produce the same output regardless of which child model processes the input data, then it should live here to avoid redundant repeated processing for each child.
        This means this method cannot be used for data normalization. Refer to `_preprocess` instead.
        
This method is intended for advanced users. It is usually sufficient to implement all preprocessing in `_preprocess` and leave this method untouched.
The potential benefit of implementing preprocessing in this method is an inference speedup when used in a bagged ensemble.
Data transformation logic that is non-stateful or ignores internal data values beyond feature dtypes should be added here.
In bagged ensembles, preprocessing code that lives here will be executed only once per inference call regardless of the number of child models.
If preprocessing code will produce the same output regardless of which child model processes the input data, then it should live here to avoid redundant repeated processing for each child.
This means this method cannot be used for data normalization. Refer to `_preprocess` instead.
This method is intended for advanced users . It is usually sufficient to implement all preprocessing in ` _preprocess ` and leave this method untouched . The potential benefit of implementing preprocessing in this method is an inference speedup when used in a bagged ensemble . Data transformation logic that is non - stateful or ignores internal data values beyond feature dtypes should be added here . In bagged ensembles preprocessing code that lives here will be executed only once per inference call regardless of the number of child models . If preprocessing code will produce the same output regardless of which child model processes the input data then it should live here to avoid redundant repeated processing for each child . This means this method cannot be used for data normalization . Refer to ` _preprocess ` instead .
def _preprocess_nonadaptive(self, X: pd.DataFrame, **kwargs) -> pd.DataFrame:
        if self.features is None:
            self._preprocess_set_features(X=X)
        if list(X.columns) != self.features:
            X = X[self.features]
        return X
def _preprocess_nonadaptive ( self , X : pd . DataFrame , ** kwargs ) -> pd . DataFrame : if self . features is None : self . _preprocess_set_features ( X = X ) if list ( X . columns ) != self . features : X = X [ self . features ] return X
Note: This method is intended for advanced users.
Note : This method is intended for advanced users .
"""
        Note: This method is intended for advanced users. It is usually sufficient to implement all preprocessing in `_preprocess` and leave this method untouched.
            The potential benefit of implementing preprocessing in this method is an inference speedup when used in a bagged ensemble.
        Data transformation logic that is non-stateful or ignores internal data values beyond feature dtypes should be added here.
        In bagged ensembles, preprocessing code that lives here will be executed only once per inference call regardless of the number of child models.
        If preprocessing code will produce the same output regardless of which child model processes the input data, then it should live here to avoid redundant repeated processing for each child.
        This means this method cannot be used for data normalization. Refer to `_preprocess` instead.
        """ # TODO: In online-inference this becomes expensive, add option to remove it (only safe in controlled environment where it is already known features are present
self
X
pd.DataFrame