class_docstr: A TFX ml-metadata store that provides read-only methods for notebooks.
class_docstr_tok: ["A","TFX","ml-metadata","store","that","provides","read-only","methods","for","notebooks","."]
docstr: Returns a Tensorboard link for `model_id` and `other_model_ids`.
  
  Args:
    model_id: A `int` indicating the id of a `TFXArtifactTypes.MODEL`
      artifact.
    *other_model_ids: (Optional) A list of `int` indicating the ids of other
      `TFXArtifactTypes.MODEL` artifacts to also include in the Tensorboard
      invocation for comparison.
docstr_tok: ["Returns","a","Tensorboard","link","for","`","model_id","`","and","`","other_model_ids","`",".","Args",":","model_id",":","A","`","int","`","indicating","the","id","of","a","`","TFXArtifactTypes.MODEL","`","artifact",".","*","other_model_ids",":","(","Optional",")","A","list","of","`","int","`","indicating","the","ids","of","other","`","TFXArtifactTypes.MODEL","`","artifacts","to","also","include","in","the","Tensorboard","invocation","for","comparison","."]
code: def display_tensorboard(self, model_id, *other_model_ids):
      """Returns a Tensorboard link for `model_id` and `other_model_ids`.
  
      Args:
        model_id: A `int` indicating the id of a `TFXArtifactTypes.MODEL`
          artifact.
        *other_model_ids: (Optional) A list of `int` indicating the ids of other
          `TFXArtifactTypes.MODEL` artifacts to also include in the Tensorboard
          invocation for comparison.
      """
      model_ids = [model_id] + list(other_model_ids)
      model_artifacts = self.metadata_store.get_artifacts_by_id(
          model_ids
      )
      model_ids_str = "-".join([str(m) for m in model_ids])
      log_file = os.path.join(
          os.environ["HOME"],
          "tensorboard_model_{}_log.txt".format(model_ids_str),
      )
      output_notebook_path = os.path.join(
          os.environ["HOME"],
          "spawn_tensorboard_{}_output.ipynb".format(model_ids_str),
      )
      tensorboard_logdir = ",".join(
          ["model_{}:{}".format(m.id, m.uri) for m in model_artifacts]
      )
      pm.execute_notebook(
          "spawn_tensorboard.ipynb",
          output_notebook_path,
          parameters=dict(
              tb_logdir=tensorboard_logdir, tb_run_log=log_file
          ),
          progress_bar=False,
      )
      time.sleep(5)  # Give it some time for log_filename to be flushed.
      with open(log_file) as f:
          for l in f:
              if "TensorBoard" in l:
                  # "TensorBoard 1.12.2 at http://... (Press CTRL+C to quit)"
                  return l.split(" ")[3]
  
imports: import os
  import time
  import papermill
  import tensorflow_data_validation
  import tensorflow_model_analysis
  import utils
  from ml_metadata.metadata_store import metadata_store
  from ml_metadata.proto import metadata_store_pb2
label_desc: Use image node_id 8 for calling the TFXReadonlyMetadataStore obj's underlying member method code with example usage: obj.display_tensorboard(model_id) and returns: l