class_docstr: Wrapper for forecasting models.
  
  This provides a unified API for the forecast method.
  Additionally, this wrapper knows how to work with models from
  certain packages such as AzureML and sktime.
  Other models are expected to have a forecast method that takes
  a DataFrame with the time series ID features and time feature.
class_docstr_tok: ["Wrapper","for","forecasting","models",".","This","provides","a","unified","API","for","the","forecast","method",".","Additionally",",","this","wrapper","knows","how","to","work","with","models","from","certain","packages","such","as","AzureML","and","sktime",".","Other","models","are","expected","to","have","a","forecast","method","that","takes","a","DataFrame","with","the","time","series","ID","features","and","time","feature","."]
docstr: Returns the forecast horizon for the passed data.
docstr_tok: ["Returns","the","forecast","horizon","for","the","passed","data","."]
code: def _get_forecast_horizon(self, X):
      """Returns the forecast horizon for the passed data."""
      # This method is only called if the model is from the sktime package
      # so we can assume that sktime is installed.
      # For non-sktime or more generally non-forecasting scenarios sktime
      # won't be needed so we don't want to add it as a requirement to the
      # responsibleai package.
      from sktime.forecasting.base import ForecastingHorizon
  
      return ForecastingHorizon(
          pd.to_datetime(X[self._time_feature].unique()).sort_values(),
          is_relative=False,
      )
  
file_path: responsible-ai-toolbox/responsibleai/responsibleai/_internal/_forecasting_wrappers.py
imports: import inspect
  import sys
  import pandas
  from ml_wrappers.model.base_wrapped_model import BaseWrappedModel
  from raiutils.models import Forecasting, ModelTask
label_desc: Use image node_id 4 for calling the _WrappedForecastingModel obj's underlying member method code with example usage: obj._get_forecast_horizon(X) and returns: ForecastingHorizon