class_docstr: State for each phase (train, eval, predict).
  Modified by the framework, read-only for the user.
code: def __init__(
      self,
      *,
      # pyre-fixme[2]: Parameter annotation cannot contain `Any`.
      dataloader: Iterable[Any],
      max_epochs: Optional[int] = None,  # used only for train
      max_steps: Optional[int] = None,  # used only for train
      max_steps_per_epoch: Optional[int] = None,
      evaluate_every_n_steps: Optional[
          int
      ] = None,  # used only for evaluate
      evaluate_every_n_epochs: Optional[
          int
      ] = None,  # used only for evaluate
  ) -> None:
      _check_loop_condition("max_epochs", max_epochs)
      _check_loop_condition("max_steps", max_steps)
      _check_loop_condition("max_steps_per_epoch", max_steps_per_epoch)
      _check_loop_condition(
          "evaluate_every_n_steps", evaluate_every_n_steps
      )
      _check_loop_condition(
          "evaluate_every_n_epochs", evaluate_every_n_epochs
      )
  
      # pyre-fixme[4]: Attribute annotation cannot contain `Any`.
      self._dataloader: Iterable[Any] = dataloader
      self._max_epochs = max_epochs
      self._max_steps = max_steps
      self._max_steps_per_epoch = max_steps_per_epoch
      self._evaluate_every_n_steps = evaluate_every_n_steps
      self._evaluate_every_n_epochs = evaluate_every_n_epochs
  
      # pyre-fixme[4]: Attribute annotation cannot be `Any`.
      self._step_output: Any = None
      self._iteration_timer = BoundedTimer(
          cuda_sync=False, lower_bound=1_000, upper_bound=5_000
      )
  
imports: import logging
  from enum import auto, Enum
  from typing import Any, Iterable, Optional
  from torchtnt.utils.timer import BoundedTimer, TimerProtocol
label_desc: Use image node_id 1 to create a new PhaseState object  with example: obj = PhaseState()