docstr: Update global counts, write to tensorboard and save checkpoint.
docstr_tok: ["Update","global","counts",",","write","to","tensorboard","and","save","checkpoint","."]
code: def iter(self):
      """
      Update global counts, write to tensorboard and save checkpoint.
      """
      self.n_iter += 1
      self.n_total_iter += 1
  
      if self.n_total_iter % self.params.log_interval == 0:
          self.log_tensorboard()
          self.last_log = time.time()
      if self.n_total_iter % self.params.checkpoint_interval == 0:
          self.save_checkpoint()
  
imports: import math
  import os
  import time
  import psutil
  import torch
  from grouped_batch_sampler import GroupedBatchSampler, create_lengths_groups
  from lm_seqs_dataset import LmSeqsDataset
  from torch import nn
  from torch.optim import AdamW
  from torch.utils.data import BatchSampler, DataLoader, RandomSampler
  from torch.utils.data.distributed import DistributedSampler
  from tqdm import tqdm
  from transformers import get_linear_schedule_with_warmup
  from utils import logger
label_desc: Use image node_id 8 for calling the Distiller obj's underlying member method code with example usage: obj.iter() without return types