class_docstr: Class for fastai v1 neural network models that operate on tabular data.
  
  Hyperparameters:
      'y_scaler': on regression problems, the model can give unreasonable predictions on unseen data.
      To address this problem, AutoGluon scales y values by default for regression problems.
      This attribute allows to pass a custom scaler for y values. Please note that intermediate
      iteration metrics will be affected by this transform and as a result intermediate iteration scores will be
      different from the final ones (these will be correct).
      https://scikit-learn.org/stable/modules/classes.html#module-sklearn.preprocessing
  
      'clipping': on regression problems, extreme outliers of y can hurt performance of the model during training and
      on unseen data. To address this problem, AutoGluon clips input y values and output predictions by default to a
      range inferred from the training data. Setting this attribute to False disables clipping.
  
      'layers': list of hidden layers sizes; None - use model's heuristics; default is None
  
      'emb_drop': embedding layers dropout; default is 0.1
  
      'ps': linear layers dropout - list of values applied to every layer in `layers`; default is [0.1]
  
      'bs': batch size; default is 256
  
      'lr': maximum learning rate for one cycle policy; default is 1e-2;
      see also https://docs.fast.ai/callback.schedule.html#Learner.fit_one_cycle,
      One-cycle policy paper: https://arxiv.org/abs/1803.09820
  
      'epochs': number of epochs; default is 30
  
      # Early stopping settings. See more details here: https://docs.fast.ai/callback.tracker.html#EarlyStoppingCallback
      'early.stopping.min_delta': 0.0001,
      'early.stopping.patience': 10,
class_docstr_tok: ["Class","for","fastai","v1","neural","network","models","that","operate","on","tabular","data",".","Hyperparameters",":","'y_scaler","'",":","on","regression","problems",",","the","model","can","give","unreasonable","predictions","on","unseen","data",".","To","address","this","problem",",","AutoGluon","scales","y","values","by","default","for","regression","problems",".","This","attribute","allows","to","pass","a","custom","scaler","for","y","values",".","Please","note","that","intermediate","iteration","metrics","will","be","affected","by","this","transform","and","as","a","result","intermediate","iteration","scores","will","be","different","from","the","final","ones","(","these","will","be","correct",")",".","https",":","\/\/scikit-learn.org\/stable\/modules\/classes.html","#","module-sklearn.preprocessing","'clipping","'",":","on","regression","problems",",","extreme","outliers","of","y","can","hurt","performance","of","the","model","during","training","and","on","unseen","data",".","To","address","this","problem",",","AutoGluon","clips","input","y","values","and","output","predictions","by","default","to","a","range","inferred","from","the","training","data",".","Setting","this","attribute","to","False","disables","clipping",".","'layers","'",":","list","of","hidden","layers","sizes",";","None","-","use","model","'s","heuristics",";","default","is","None","'emb_drop","'",":","embedding","layers","dropout",";","default","is","0.1","'ps","'",":","linear","layers","dropout","-","list","of","values","applied","to","every","layer","in","`","layers","`",";","default","is","[","0.1","]","'bs","'",":","batch","size",";","default","is","256","'lr","'",":","maximum","learning","rate","for","one","cycle","policy",";","default","is","1e-2",";","see","also","https",":","\/\/docs.fast.ai\/callback.schedule.html","#","Learner.fit_one_cycle",",","One-cycle","policy","paper",":","https",":","\/\/arxiv.org\/abs\/1803.09820","'epochs","'",":","number","of","epochs",";","default","is","30","#","Early","stopping","settings",".","See","more","details","here",":","https",":","\/\/docs.fast.ai\/callback.tracker.html","#","EarlyStoppingCallback","'early.stopping.min_delta","'",":","0.0001",",","'early.stopping.patience","'",":","10",","]
docstr: Returns the time in seconds taken to fit a single batch
docstr_tok: ["Returns","the","time","in","seconds","taken","to","fit","a","single","batch"]
code: def _measure_batch_times(self, min_batches_count: int) -> float:
      """Returns the time in seconds taken to fit a single batch"""
      from fastai.callback.core import CancelFitException
  
      from .callbacks import BatchTimeTracker
  
      batch_time_tracker_callback = BatchTimeTracker(
          batches_to_measure=min_batches_count
      )
      try:
          with self.model.no_bar():
              with self.model.no_logging():
                  self.model.fit(
                      1, lr=0, cbs=[batch_time_tracker_callback]
                  )
      except CancelFitException:
          pass  # expected early exit
      batch_time = batch_time_tracker_callback.batch_measured_time
      if batch_time is None or batch_time < 0.00001:
          # Fixes rare issue where batch_time = None if the operation occurs too quickly
          batch_time = 0.00001
      return batch_time
  
imports: from __future__ import annotations
  import copy
  import logging
  import time
  from builtins import classmethod
  from functools import partial
  from pathlib import Path
  from typing import Dict, Union
  import numpy
  import pandas
  import sklearn
  from autogluon.common.features.types import R_BOOL, R_CATEGORY, R_DATETIME, R_FLOAT, R_INT, R_OBJECT, S_TEXT_AS_CATEGORY, S_TEXT_NGRAM, S_TEXT_SPECIAL
  from autogluon.common.utils.pandas_utils import get_approximate_df_mem_usage
  from autogluon.common.utils.resource_utils import ResourceManager
  from autogluon.common.utils.try_import import try_import_fastai
  from autogluon.core.constants import BINARY, QUANTILE, REGRESSION
  from autogluon.core.hpo.constants import RAY_BACKEND
  from autogluon.core.models import AbstractModel
  from autogluon.core.utils.exceptions import TimeLimitExceeded
  from autogluon.core.utils.files import make_temp_directory
  from autogluon.core.utils.loaders import load_pkl
  from autogluon.core.utils.savers import save_pkl
  from autogluon.tabular.models.tabular_nn.utils.nn_architecture_utils import infer_y_range
  from .hyperparameters.parameters import get_param_baseline
  from .hyperparameters.searchspaces import get_default_searchspace
label_desc: Use image node_id 8 for calling the NNFastAiTabularModel obj's underlying member method code with example usage: obj._measure_batch_times(min_batches_count) and returns: batch_time