class_docstr: A base class for model based early stopping strategies. Includes
  a helper function for processing MapData into arrays.
docstr: Processes the raw (untransformed) training data into arrays for
  use in modeling. The trailing dimensions of `X` are the map keys, in
  their originally specified order from `map_data`.
  
  Args:
      experiment: Experiment that contains the data.
      map_data: The MapData from the experiment, as can be obtained by
          via `_check_validity_and_get_data`.
      max_training_size: Subsample the learning curve to keep the total
          number of data points less than this threshold. Passed to
          MapData's `subsample` method as `limit_rows_per_metric`.
  
  Returns:
      An `EarlyStoppingTrainingData` that contains training data arrays X, Y,
          and Yvar + a list of arm names.
docstr_tok: ["Processes","the","raw","(","untransformed",")","training","data","into","arrays","for","use","in","modeling",".","The","trailing","dimensions","of","`","X","`","are","the","map","keys",",","in","their","originally","specified","order","from","`","map_data","`",".","Args",":","experiment",":","Experiment","that","contains","the","data",".","map_data",":","The","MapData","from","the","experiment",",","as","can","be","obtained","by","via","`","_check_validity_and_get_data","`",".","max_training_size",":","Subsample","the","learning","curve","to","keep","the","total","number","of","data","points","less","than","this","threshold",".","Passed","to","MapData","'s","`","subsample","`","method","as","`","limit_rows_per_metric","`",".","Returns",":","An","`","EarlyStoppingTrainingData","`","that","contains","training","data","arrays","X",",","Y",",","and","Yvar","+","a","list","of","arm","names","."]
code: def get_training_data(
      self,
      experiment: Experiment,
      map_data: MapData,
      max_training_size: Optional[int] = None,
      outcomes: Optional[Sequence[str]] = None,
      parameters: Optional[List[str]] = None,
  ) -> EarlyStoppingTrainingData:
      """Processes the raw (untransformed) training data into arrays for
      use in modeling. The trailing dimensions of `X` are the map keys, in
      their originally specified order from `map_data`.
  
      Args:
          experiment: Experiment that contains the data.
          map_data: The MapData from the experiment, as can be obtained by
              via `_check_validity_and_get_data`.
          max_training_size: Subsample the learning curve to keep the total
              number of data points less than this threshold. Passed to
              MapData's `subsample` method as `limit_rows_per_metric`.
  
      Returns:
          An `EarlyStoppingTrainingData` that contains training data arrays X, Y,
              and Yvar + a list of arm names.
      """
      if max_training_size is not None:
          map_data = map_data.subsample(
              map_key=map_data.map_keys[0],
              limit_rows_per_metric=max_training_size,
          )
      if outcomes is None:
          # default to the default objective
          metric_name, _ = self._default_objective_and_direction(
              experiment=experiment
          )
          outcomes = [metric_name]
  
      if parameters is None:
          parameters = list(experiment.search_space.parameters.keys())
          parameters = parameters + list(map_data.map_keys)
  
      # helper Ax model to make use of its transform functionality
      transform_model = get_transform_helper_model(
          experiment=experiment, data=map_data
      )
      observations_raw = transform_model.get_training_data()
      observations, _ = transform_model._transform_data(
          observations=observations_raw,
          search_space=transform_model._model_space,
          transforms=transform_model._raw_transforms,
          transform_configs=None,
      )
      obs_features, obs_data, arm_names = _unpack_observations(
          observations
      )
      X = observation_features_to_array(
          parameters=parameters, obsf=obs_features
      )
      Y, Yvar = observation_data_to_array(
          outcomes=list(outcomes), observation_data=obs_data
      )
      return EarlyStoppingTrainingData(
          X=X, Y=Y, Yvar=Yvar, arm_names=arm_names
      )
  
imports: import logging
  from abc import ABC, abstractmethod
  from dataclasses import dataclass
  from logging import Logger
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Set, Tuple, Type
  import numpy
  import pandas
  from ax.core.base_trial import TrialStatus
  from ax.core.data import Data
  from ax.core.experiment import Experiment
  from ax.core.map_data import MapData
  from ax.core.objective import MultiObjective
  from ax.modelbridge.map_torch import MapTorchModelBridge
  from ax.modelbridge.modelbridge_utils import _unpack_observations, observation_data_to_array, observation_features_to_array
  from ax.modelbridge.registry import Cont_X_trans, Y_trans
  from ax.modelbridge.transforms.base import Transform
  from ax.modelbridge.transforms.map_unit_x import MapUnitX
  from ax.models.torch_base import TorchModel
  from ax.utils.common.base import Base
  from ax.utils.common.logger import get_logger
  from ax.utils.common.typeutils import checked_cast, not_none
label_desc: Use image node_id 3 for calling the ModelBasedEarlyStoppingStrategy obj's underlying member method code with example usage: obj.get_training_data(experiment, map_data, max_training_size, outcomes, parameters) and returns: EarlyStoppingTrainingData