class_docstr: This pycrfsuite.Trainer prints information about each iteration
  on a single line.
class_docstr_tok: ["This","pycrfsuite.Trainer","prints","information","about","each","iteration","on","a","single","line","."]
code: def on_iteration(self, log, info):
      parts = [
          "Iter {num:<3} ",
          "time={time:<5.2f} ",
          "loss={loss:<8.2f} ",
      ]
  
      if "active_features" in info:
          parts += ["active={active_features:<5} "]
  
      if "avg_precision" in info:
          parts += [
              "precision={avg_precision:0.3f}  ",
              "recall={avg_recall:0.3f}  ",
              "F1={avg_f1:0.3f}  ",
              "Acc(item/seq)={item_accuracy_float:0.3f} {instance_accuracy_float:0.3f}  ",
          ]
  
      if "feature_norm" in info:
          parts += ["feature_norm={feature_norm:<8.2f}"]
  
      line = "".join(parts)
      print(line.format(**info).strip())
  
imports: import pycrfsuite
  from tabulate import tabulate
label_desc: Use image node_id 1 for calling the LinePerIterationTrainer obj's underlying member method code with example usage: obj.on_iteration(log, info) without return types