class_docstr: Context manager to capture runtime context for stepwise mode.
  
  ``StepwiseContext`` allows one to call :func:`auto_arima` in the context
  of a runtime configuration that offers additional level of
  control required in certain scenarios. Use cases that are either
  sensitive to duration and/or the number of attempts to
  find the best fit can use ``StepwiseContext`` to control them.
  
  Parameters
  ----------
  max_steps : int, optional (default=100)
      The maximum number of steps to try to find a best fit. When
      the number of tries exceed this number, the stepwise process
      will stop and the best fit model at that time will be returned.
  
  max_dur : int, optional (default=None)
      The maximum duration in seconds to try to find a best fit.
      When the cumulative fit duration exceeds this number, the
      stepwise process will stop and the best fit model at that
      time will be returned. Please note that this is a soft limit.
  
  Notes
  -----
  Although the ``max_steps`` parameter is set to a default value of None
  here, the stepwise search is limited to 100 tries to find a best fit model.
  Defaulting the parameter to None here preserves the intention of the
  caller and properly handles the nested contexts, like:
  
  >>> with StepwiseContext(max_steps=10):
  ...     with StepwiseContext(max_dur=30):
  ...         auto_arima(sample, stepwise=True, ...)
  
  In the above example, the stepwise search will be limited to either
  a maximum of 10 steps or a maximum duration of 30 seconds, whichever
  occurs first and the best fit model at that time will be returned
class_docstr_tok: ["Context","manager","to","capture","runtime","context","for","stepwise","mode",".","``","StepwiseContext","``","allows","one","to","call",":","func",":","`","auto_arima","`","in","the","context","of","a","runtime","configuration","that","offers","additional","level","of","control","required","in","certain","scenarios",".","Use","cases","that","are","either","sensitive","to","duration","and\/or","the","number","of","attempts","to","find","the","best","fit","can","use","``","StepwiseContext","``","to","control","them",".","Parameters","--","--","--","--","--","max_steps",":","int",",","optional","(","default=100",")","The","maximum","number","of","steps","to","try","to","find","a","best","fit",".","When","the","number","of","tries","exceed","this","number",",","the","stepwise","process","will","stop","and","the","best","fit","model","at","that","time","will","be","returned",".","max_dur",":","int",",","optional","(","default=None",")","The","maximum","duration","in","seconds","to","try","to","find","a","best","fit",".","When","the","cumulative","fit","duration","exceeds","this","number",",","the","stepwise","process","will","stop","and","the","best","fit","model","at","that","time","will","be","returned",".","Please","note","that","this","is","a","soft","limit",".","Notes","--","--","-","Although","the","``","max_steps","``","parameter","is","set","to","a","default","value","of","None","here",",","the","stepwise","search","is","limited","to","100","tries","to","find","a","best","fit","model",".","Defaulting","the","parameter","to","None","here","preserves","the","intention","of","the","caller","and","properly","handles","the","nested","contexts",",","like",":",">",">",">","with","StepwiseContext","(","max_steps=10",")",":","...","with","StepwiseContext","(","max_dur=30",")",":","...","auto_arima","(","sample",",","stepwise=True",",","...",")","In","the","above","example",",","the","stepwise","search","will","be","limited","to","either","a","maximum","of","10","steps","or","a","maximum","duration","of","30","seconds",",","whichever","occurs","first","and","the","best","fit","model","at","that","time","will","be","returned"]
code: def get_type(self):
      return ContextType.STEPWISE
  
imports: import numpy
  from sklearn.linear_model import LinearRegression
  import functools
  import time
  import warnings
  from ..base import BaseARIMA
  from .None import _doc
  from .None import _validation
  from .utils import ndiffs, is_constant, nsdiffs
  from ..utils import diff, is_iterable, check_endog
  from ..utils.metaestimators import if_has_delegate
  from ._context import AbstractContext, ContextType
  from .None import _auto_solvers
  from ..compat.numpy import DTYPE
  from ..compat import statsmodels
label_desc: Use image node_id 2 for calling the StepwiseContext obj's underlying member method code with example usage: obj.get_type() and returns: ContextType