class_docstr: Class for benchmarking multiple ForecastConfig on a rolling window basis.
  
  Attributes
  ----------
  df : `pandas.DataFrame`
      Timeseries data to forecast.
      Contains columns [`time_col`, `value_col`], and optional regressor columns.
      Regressor columns should include future values for prediction.
  
  configs : `Dict` [`str`,  `ForecastConfig`]
      Dictionary of model configurations.
      A model configuration is a ``ForecastConfig``.
      See :class:`~greykite.framework.templates.autogen.forecast_config.ForecastConfig` for details on
      valid ``ForecastConfig``.
      Validity of the ``configs`` for benchmarking is checked via the ``validate`` method.
  
  tscv : `~greykite.sklearn.cross_validation.RollingTimeSeriesSplit`
      Cross-validation object that determines the rolling window evaluation.
      See :class:`~greykite.sklearn.cross_validation.RollingTimeSeriesSplit` for details.
      The ``forecast_horizon`` and ``periods_between_train_test`` parameters of ``configs`` are
      matched against that of ``tscv``. A ValueError is raised if there is a mismatch.
  
  forecaster : `~greykite.framework.templates.forecaster.Forecaster`
      Forecaster used to create the forecasts.
  
  is_run : bool, default False
      Indicator of whether the `run` method is executed.
      After executing `run`, this indicator is set to True.
      Some class methods like ``get_forecast`` requires ``is_run`` to be True
      to be executed.
  
  result : `dict`
      Stores the benchmarking results. Has the same keys as ``configs``.
  
  forecasts : `pandas.DataFrame`, default None
      Merged DataFrame of forecasts, upper and lower confidence interval for all
      input ``configs``. Also stores train end date and forecast step for each prediction.
docstr: Returns a line plot of the grouped evaluation values of ``metric_dict`` of ``config_names``.
  These values are grouped by the grouping method chosen by ``groupby_time_feature``,
   ``groupby_sliding_window_size`` and ``groupby_custom_column``.
  See `~greykite.framework.output.univariate_forecast.UnivariateForecast.get_grouping_evaluation`
  for details on grouping method.
  
   Parameters
  ----------
  metric_dict : `dict` [`str`, `callable`]
      Evaluation metrics to compute. Same as
      `~greykite.framework.framework.benchmark.benchmark_class.BenchmarkForecastConfig.get_evaluation_metrics`.
      To get the best visualization, keep number of metrics <= 2.
  config_names : `list` [`str`], default None
      Which config results to plot. A list of config names.
      If None, uses all the available config keys.
  which: `str`
      "train" or "test". Which dataset to evaluate.
  groupby_time_feature : `str` or None, optional
      If provided, groups by a column generated by
      `~greykite.common.features.timeseries_features.build_time_features_df`.
      See that function for valid values.
  groupby_sliding_window_size : `int` or None, optional
      If provided, sequentially partitions data into groups of size
      ``groupby_sliding_window_size``.
  groupby_custom_column : `pandas.Series` or None, optional
      If provided, groups by this column value. Should be same length as the DataFrame.
  xlabel : `str` or None, default None
      x-axis label. If None, label is determined by the groupby column name.
  ylabel : `str` or None, default "Metric value"
      y-axis label.
  title : `str` or None, default None
      Plot title. If None, default is based on ``config_name``.
  showlegend : `bool`, default True
      Whether to show the legend.
  
  Returns
  -------
   fig : `plotly.graph_objects.Figure`
      Interactive plotly graph.
docstr_tok: ["Returns","a","line","plot","of","the","grouped","evaluation","values","of","``","metric_dict","``","of","``","config_names","``",".","These","values","are","grouped","by","the","grouping","method","chosen","by","``","groupby_time_feature","``",",","``","groupby_sliding_window_size","``","and","``","groupby_custom_column","``",".","See","`","~greykite.framework.output.univariate_forecast.UnivariateForecast.get_grouping_evaluation","`","for","details","on","grouping","method",".","Parameters","--","--","--","--","--","metric_dict",":","`","dict","`","[","`","str","`",",","`","callable","`","]","Evaluation","metrics","to","compute",".","Same","as","`","~greykite.framework.framework.benchmark.benchmark_class.BenchmarkForecastConfig.get_evaluation_metrics","`",".","To","get","the","best","visualization",",","keep","number","of","metrics","<","=","2.","config_names",":","`","list","`","[","`","str","`","]",",","default","None","Which","config","results","to","plot",".","A","list","of","config","names",".","If","None",",","uses","all","the","available","config","keys",".","which",":","`","str","`","``","train","''","or","``","test","''",".","Which","dataset","to","evaluate",".","groupby_time_feature",":","`","str","`","or","None",",","optional","If","provided",",","groups","by","a","column","generated","by","`","~greykite.common.features.timeseries_features.build_time_features_df","`",".","See","that","function","for","valid","values",".","groupby_sliding_window_size",":","`","int","`","or","None",",","optional","If","provided",",","sequentially","partitions","data","into","groups","of","size","``","groupby_sliding_window_size","``",".","groupby_custom_column",":","`","pandas.Series","`","or","None",",","optional","If","provided",",","groups","by","this","column","value",".","Should","be","same","length","as","the","DataFrame",".","xlabel",":","`","str","`","or","None",",","default","None","x-axis","label",".","If","None",",","label","is","determined","by","the","groupby","column","name",".","ylabel",":","`","str","`","or","None",",","default","``","Metric","value","''","y-axis","label",".","title",":","`","str","`","or","None",",","default","None","Plot","title",".","If","None",",","default","is","based","on","``","config_name","``",".","showlegend",":","`","bool","`",",","default","True","Whether","to","show","the","legend",".","Returns","--","--","--","-","fig",":","`","plotly.graph_objects.Figure","`","Interactive","plotly","graph","."]
code: def plot_grouping_evaluation_metrics(
      self,
      metric_dict: Dict,
      config_names: List = None,
      which: str = "train",
      groupby_time_feature: str = None,
      groupby_sliding_window_size: int = None,
      groupby_custom_column: pd.Series = None,
      xlabel=None,
      ylabel="Metric value",
      title=None,
      showlegend=True,
  ):
      """Returns a line plot of the grouped evaluation values of ``metric_dict`` of ``config_names``.
      These values are grouped by the grouping method chosen by ``groupby_time_feature``,
       ``groupby_sliding_window_size`` and ``groupby_custom_column``.
      See `~greykite.framework.output.univariate_forecast.UnivariateForecast.get_grouping_evaluation`
      for details on grouping method.
  
       Parameters
      ----------
      metric_dict : `dict` [`str`, `callable`]
          Evaluation metrics to compute. Same as
          `~greykite.framework.framework.benchmark.benchmark_class.BenchmarkForecastConfig.get_evaluation_metrics`.
          To get the best visualization, keep number of metrics <= 2.
      config_names : `list` [`str`], default None
          Which config results to plot. A list of config names.
          If None, uses all the available config keys.
      which: `str`
          "train" or "test". Which dataset to evaluate.
      groupby_time_feature : `str` or None, optional
          If provided, groups by a column generated by
          `~greykite.common.features.timeseries_features.build_time_features_df`.
          See that function for valid values.
      groupby_sliding_window_size : `int` or None, optional
          If provided, sequentially partitions data into groups of size
          ``groupby_sliding_window_size``.
      groupby_custom_column : `pandas.Series` or None, optional
          If provided, groups by this column value. Should be same length as the DataFrame.
      xlabel : `str` or None, default None
          x-axis label. If None, label is determined by the groupby column name.
      ylabel : `str` or None, default "Metric value"
          y-axis label.
      title : `str` or None, default None
          Plot title. If None, default is based on ``config_name``.
      showlegend : `bool`, default True
          Whether to show the legend.
  
      Returns
      -------
       fig : `plotly.graph_objects.Figure`
          Interactive plotly graph.
      """
      grouped_evaluation_df = self.get_grouping_evaluation_metrics(
          metric_dict=metric_dict,
          config_names=config_names,
          which=which,
          groupby_time_feature=groupby_time_feature,
          groupby_sliding_window_size=groupby_sliding_window_size,
          groupby_custom_column=groupby_custom_column,
      )
  
      # Figures out groupby_col name by process of elimination
      cols = [
          col
          for col in grouped_evaluation_df.columns
          if col not in ["config_name", "split_num"]
      ]
      groupby_col = get_pattern_cols(
          cols, pos_pattern=".*", neg_pattern=which
      )[0]
  
      plot_df = (
          grouped_evaluation_df.drop(
              columns=["split_num"]
          )  # Drops redundant column
          .groupby(
              ["config_name", groupby_col]
          )  # Averages values across splits
          .mean()
          .dropna(how="all")  # Drops rows with all NA values
          .unstack(
              level=0
          )  # Moves config_name from multiindex rows to multiindex columns
          .sort_index(
              axis=1
          )  # Sorts on groupby_col to plot groups in logical order
      )
  
      # Flattens and renames multiindex columns
      cols = [groupby_col] + ["_".join(v) for v in plot_df.columns]
      plot_df = pd.DataFrame(plot_df.to_records())
      plot_df.columns = cols
  
      if xlabel is None:
          xlabel = groupby_col
      if title is None:
          title = (
              f"{which} performance by {xlabel} across rolling windows"
          )
      fig = plot_multivariate(
          df=plot_df,
          x_col=groupby_col,
          y_col_style_dict="plotly",
          xlabel=xlabel,
          ylabel=ylabel,
          title=title,
          showlegend=showlegend,
      )
  
      return fig
  
imports: from typing import Dict
  from typing import List
  import numpy
  import pandas
  import plotly.graph_objects
  from plotly.colors import DEFAULT_PLOTLY_COLORS
  from tqdm.autonotebook import tqdm
  from greykite.common.constants import ACTUAL_COL
  from greykite.common.constants import PREDICTED_COL
  from greykite.common.constants import PREDICTED_LOWER_COL
  from greykite.common.constants import PREDICTED_UPPER_COL
  from greykite.common.constants import TIME_COL
  from greykite.common.constants import VALUE_COL
  from greykite.common.evaluation import EvaluationMetricEnum
  from greykite.common.evaluation import add_finite_filter_to_scorer
  from greykite.common.logging import LoggingLevelEnum
  from greykite.common.logging import log_message
  from greykite.common.python_utils import get_pattern_cols
  from greykite.common.viz.timeseries_plotting import plot_multivariate
  from greykite.common.viz.timeseries_plotting import plot_multivariate_grouped
  from greykite.framework.benchmark.benchmark_class_helper import forecast_pipeline_rolling_evaluation
  from greykite.framework.constants import FORECAST_STEP_COL
  from greykite.framework.templates.autogen.forecast_config import ForecastConfig
  from greykite.framework.templates.forecaster import Forecaster
  from greykite.sklearn.cross_validation import RollingTimeSeriesSplit
label_desc: Use image node_id 10 for calling the BenchmarkForecastConfig obj's underlying member method code with example usage: obj.plot_grouping_evaluation_metrics(metric_dict, config_names, which, groupby_time_feature, groupby_sliding_window_size, groupby_custom_column, xlabel, ylabel, title, showlegend) and returns: fig