class_docstr: Measures time and reports progress.
  
  This is a modified fork of Chrono class from big_vision codebase:
  https://github.com/google-research/big_vision/blob/main/big_vision/utils.py
  
  Some concepts:
  1. This differentiates between three "types" of time:
    - training time: the time spent on actual training (fprop/bprop/update)
    - program time: overall time the program runs, including all overheads
    - pause time: the chronometer can be paused (eg during evals).
  2. This handles a "warmup": the first step is skipped for training time
      purposes, as it includes significant compilation overheads, which distort
      estimates.
  3. `accumulates` (i.e. integrates) timings, and saves/loads them across
      restarts.
class_docstr_tok: ["Measures","time","and","reports","progress",".","This","is","a","modified","fork","of","Chrono","class","from","big_vision","codebase",":","https",":","\/\/github.com\/google-research\/big_vision\/blob\/main\/big_vision\/utils.py","Some","concepts",":","1",".","This","differentiates","between","three","``","types","''","of","time",":","-","training","time",":","the","time","spent","on","actual","training","(","fprop\/bprop\/update",")","-","program","time",":","overall","time","the","program","runs",",","including","all","overheads","-","pause","time",":","the","chronometer","can","be","paused","(","eg","during","evals",")",".","2",".","This","handles","a","``","warmup","''",":","the","first","step","is","skipped","for","training","time","purposes",",","as","it","includes","significant","compilation","overheads",",","which","distort","estimates",".","3",".","`","accumulates","`","(","i.e",".","integrates",")","timings",",","and","saves\/loads","them","across","restarts","."]
docstr: Provide some extra info that's only known later in the program.
docstr_tok: ["Provide","some","extra","info","that","'s","only","known","later","in","the","program","."]
code: def inform(
      self,
      first_step: int,
      total_steps: int,
      global_bs: int,
      steps_per_epoch: int,
  ):
      """Provide some extra info that's only known later in the program."""
      self.prev_step = copy.deepcopy(first_step)
      self.first_step = copy.deepcopy(first_step)
      self.total_steps = total_steps
      self.steps_per_epoch = steps_per_epoch
      self.global_bs = global_bs
      if total_steps:
          self.note = f"Steps:{first_step}/{total_steps} [{first_step/total_steps:.1%}]"
  
imports: import collections.abc
  import copy
  import functools
  import os
  import re
  import time
  from typing import Any, Callable, Dict, Mapping, Optional, Sequence, Tuple, Union
  from absl import logging
  from clu import metric_writers
  import flax
  from flax import jax_utils
  from flax import struct
  import flax.linen
  from flax.training import checkpoints
  import jax
  import jax.numpy
  import ml_collections
  import numpy
  import optax
  from scenic.common_lib import debug_utils
  from scenic.dataset_lib import dataset_utils
  from scenic.dataset_lib import datasets
  from scenic.train_lib import optimizers
  from tensorflow.io import gfile
label_desc: Use image node_id 2 for calling the Chrono obj's underlying member method code with example usage: obj.inform(first_step, total_steps, global_bs, steps_per_epoch) without return types