tensorflow/models · error · NotImplementedError

Not implemented yet.

Error message

Not implemented yet.

What it means

Error "Not implemented yet." thrown in tensorflow/models.

Source

Thrown at official/nlp/modeling/layers/text_layers.py:653

    self.tokenize_with_offsets = tokenize_with_offsets
    self._basic_tokenizer = bert_tokenizer.BasicTokenizer(lower_case=lower_case)  # pyrefly: ignore[missing-attribute]

    # Read the vocab file into a list of tokens to create `fast_wp_tokenizer`.
    self._vocab = [line.rstrip() for line in tf.io.gfile.GFile(vocab_file)]
    self._fast_wp_tokenizer = text.FastWordpieceTokenizer(  # pyrefly: ignore[missing-attribute]
        vocab=self._vocab, token_out_type=tf.int32, no_pretokenization=True)
    self._special_tokens_dict = self._create_special_tokens_dict()

  @property
  def vocab_size(self):
    return len(self._vocab)

  def get_config(self):
    # Skip in tf.saved_model.save(); fail if called direcly.
    # We cannot just put the original, user-supplied vocab file name into
    # the config, because the path has to change as the SavedModel is copied
    # around.
    raise NotImplementedError("Not implemented yet.")

  def get_special_tokens_dict(self):
    """Returns dict of token ids, keyed by standard names for their purpose.

    Returns:
      A dict from Python strings to Python integers. Each key is a standard
      name for a special token describing its use. (For example, "padding_id"
      is what BERT traditionally calls "[PAD]" but others may call "<pad>".)
      The corresponding value is the integer token id. If a special token
      is not found, its entry is omitted from the dict.

      The supported keys and tokens are:
        * start_of_sequence_id: looked up from "[CLS]"
        * end_of_segment_id: looked up from "[SEP]"
        * padding_id: looked up form "[PAD]"
        * mask_id: looked up from "[MASK]"
        * vocab_size: one past the largest token id used
    """

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/nlp/modeling/layers/text_layers.py:653 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/5ee2737cf3bf6f85. Report an issue: GitHub.