docstr: Whether AutoGluon should automatically utilize bagging and multi-layer stack ensembling to boost predictive accuracy.
  Set this = True if you are willing to tolerate longer training times in order to maximize predictive accuracy!
  Automatically sets `num_bag_folds` and `num_stack_levels` arguments based on dataset properties.
  Note: Setting `num_bag_folds` and `num_stack_levels` arguments will override `auto_stack`.
  Note: This can increase training time (and inference time) by up to 20x, but can greatly improve predictive performance.
docstr_tok: ["Whether","AutoGluon","should","automatically","utilize","bagging","and","multi-layer","stack","ensembling","to","boost","predictive","accuracy",".","Set","this","=","True","if","you","are","willing","to","tolerate","longer","training","times","in","order","to","maximize","predictive","accuracy","!","Automatically","sets","`","num_bag_folds","`","and","`","num_stack_levels","`","arguments","based","on","dataset","properties",".","Note",":","Setting","`","num_bag_folds","`","and","`","num_stack_levels","`","arguments","will","override","`","auto_stack","`",".","Note",":","This","can","increase","training","time","(","and","inference","time",")","by","up","to","20x",",","but","can","greatly","improve","predictive","performance","."]
code: def auto_stack(self, auto_stack: bool = True) -> ConfigBuilder:
      """
      Whether AutoGluon should automatically utilize bagging and multi-layer stack ensembling to boost predictive accuracy.
      Set this = True if you are willing to tolerate longer training times in order to maximize predictive accuracy!
      Automatically sets `num_bag_folds` and `num_stack_levels` arguments based on dataset properties.
      Note: Setting `num_bag_folds` and `num_stack_levels` arguments will override `auto_stack`.
      Note: This can increase training time (and inference time) by up to 20x, but can greatly improve predictive performance.
      """
      self.config["auto_stack"] = auto_stack
      return self
  
imports: from __future__ import annotations
  import copy
  from typing import Union
  from sklearn.base import BaseEstimator
  from autogluon.core.scheduler import scheduler_factory
  from autogluon.features import AutoMLPipelineFeatureGenerator
  from autogluon.tabular.configs.hyperparameter_configs import hyperparameter_config_dict
  from autogluon.tabular.configs.presets_configs import tabular_presets_dict
  from autogluon.tabular.trainer.model_presets.presets import MODEL_TYPES
label_desc: Use image node_id 5 for calling the ConfigBuilder obj's underlying member method code with example usage: obj.auto_stack(auto_stack) and returns: self