def embed_claim_dataset(self, dataset):
    """Embed the claim only dataset and save them with claim_ids.

    Args:
      dataset: The claims only dataset (e.g. claim_tfds.py)

    Returns:
      Aligned claim ids and embeddings from the model
    """
    batched_examples = self._encode_and_batch(
        dataset, filter_claims=False, filter_evidence=False)
    claim_ids = []
    embeddings = []
    for batch in tqdm.tqdm(batched_examples, mininterval=5):
      # model.predict() is broken after model load due to missing shapes, so
      # have to do our own batching/unbatching.
      inputs, _ = batch
      # Cannot use self._model since it does not take extra arguments. Since
      # we're not using the keras API (namey .predict()), we can just use the
      # underlying model stored in self._inner_model.
      claim_encoding, _ = self._inner_model(
          inputs, embed_claim=True, embed_evidence=False)
      for m in inputs['metadata'].numpy():
        key = json.loads(m.decode('utf8'))
        claim_ids.append(int(key['claim_id']))
      embeddings.append(claim_encoding)

    return np.array(claim_ids), np.vstack(embeddings)
Embed the claim only dataset and save them with claim_ids.

    Args:
      dataset: The claims only dataset (e.g. claim_tfds.py)

    Returns:
      Aligned claim ids and embeddings from the model
    
language/serene/training.py