code: def compute_time_full(model, loss_fun, train_loader, test_loader):
      """Times model and data loader."""
      logger.info("Computing model and loader timings...")
      # Compute timings
      test_fw_time = compute_time_eval(model)
      train_fw_time, train_bw_time = compute_time_train(model, loss_fun)
      train_fw_bw_time = train_fw_time + train_bw_time
      train_loader_time = compute_time_loader(train_loader)
      # Output iter timing
      iter_times = {
          "test_fw_time": test_fw_time,
          "train_fw_time": train_fw_time,
          "train_bw_time": train_bw_time,
          "train_fw_bw_time": train_fw_bw_time,
          "train_loader_time": train_loader_time,
      }
      logger.info(logging.dump_log_data(iter_times, "iter_times"))
      # Output epoch timing
      epoch_times = {
          "test_fw_time": test_fw_time * len(test_loader),
          "train_fw_time": train_fw_time * len(train_loader),
          "train_bw_time": train_bw_time * len(train_loader),
          "train_fw_bw_time": train_fw_bw_time * len(train_loader),
          "train_loader_time": train_loader_time * len(train_loader),
      }
      logger.info(logging.dump_log_data(epoch_times, "epoch_times"))
      # Compute data loader overhead (assuming DATA_LOADER.NUM_WORKERS>1)
      overhead = (
          max(0, train_loader_time - train_fw_bw_time)
          / train_fw_bw_time
      )
      logger.info(
          "Overhead of data loader is {:.2f}%".format(overhead * 100)
      )
  
file_path: pycls/pycls/core/benchmark.py
imports: import pycls.core.logging
  import pycls.core.net
  import pycls.datasets.loader
  import torch
  import torch.cuda.amp
  from pycls.core.config import cfg
  from pycls.core.timer import Timer
label_desc: Use image node_id 5 for calling a global function with example usage: compute_time_full(model, loss_fun, train_loader, test_loader) without return types