class_docstr: A run of a training script.
class_docstr_tok: ["A","run","of","a","training","script","."]
code: def _repr_html_(self) -> str:
      out = '<p><b><pre style="display: inline">Experiment(id="{}")</pre></b></p>'.format(
          self.id
      )
      out += "<p>"
      # We should add status here, see https://github.com/replicate/keepsake/issues/334
      for field in ["created", "host", "user", "command", "duration"]:
          out += '<pre style="display: inline">{:10s}</pre> {}<br/>'.format(
              html.escape(field) + ":",
              html.escape(str(getattr(self, field))),
          )
      out += "</p>"
      out += '<p><b><pre style="display: inline">params:</pre></b></p>'
      out += '<table><tr><th style="text-align: left">Name</th><th style="text-align: left">Value</th></tr>'
      if self.params is not None:
          for key, value in self.params.items():
              out += '<tr><td style="text-align: left"><pre>{}</pre></td><td style="text-align: left">{}</td>'.format(
                  html.escape(key), html.escape(str(value))
              )
      out += "</table>"
  
      out += '<p><b><pre style="display: inline">checkpoints:</pre></b></p>'
      metrics = set()
      for chk in self.checkpoints:
          if chk.metrics is not None:
              metrics |= set(chk.metrics.keys())
  
      chk_headings = ["short_id", "step", "created"] + [
          'metrics["{}"]'.format(html.escape(str(m))) for m in metrics
      ]
      out += "<table><tr>"
      for heading in chk_headings:
          out += (
              '<th style="text-align: left"><pre>{}</pre></th>'.format(
                  html.escape(heading)
              )
          )
      out += "</tr>"
      best = self.best()
      for chk in self.checkpoints:
          out += "<tr>"
          is_best = False
          values = []
          for heading in chk_headings:
              if heading.startswith('metrics["'):
                  name = heading.split('"')[1].split('"')[0]
                  if chk.metrics is None:
                      value = ""
                  else:
                      value = chk.metrics.get(name)
                  if (
                      chk == best
                      and chk.primary_metric
                      and chk.primary_metric["name"] == name
                  ):
                      value = html.escape(str(value)) + " (best)"
                      is_best = True
              elif heading == "short_id":
                  value = chk.short_id()
              else:
                  value = html.escape(str(getattr(chk, heading)))
              values.append(value)
  
          for value in values:
              out += '<td style="text-align: left">'
              if is_best:
                  out += "<b>{}</b>".format(html.escape(str(value)))
              else:
                  out += html.escape(str(value))
          out += "</tr>"
      out += "</table>"
  
      return out
  
imports: import datetime
  import getpass
  import html
  import json
  import math
  import os
  import shlex
  import sys
  from typing import TYPE_CHECKING, Any, Callable, Dict, List, MutableSequence, Optional, Tuple
  from .None import console
  from .checkpoint import Checkpoint, CheckpointList, PrimaryMetric
  from .metadata import parse_rfc3339, rfc3339_datetime
  from .packages import get_imported_packages
  from .system import get_python_version
  from .validate import check_path
  from .version import version
label_desc: Use image node_id 16 for calling the Experiment obj's underlying member method code with example usage: obj._repr_html_() and returns: out