MCPcopy Index your code
hub / github.com/deepspeedai/DeepSpeedExamples / __call__

Method __call__

Megatron-LM/data_utils/tokenization.py:245–247  ·  view source on GitHub ↗

run preprocessing and encode text as Ids

(self, text, process_fn=None)

Source from the content-addressed store, hash-verified

243
244
245 def __call__(self, text, process_fn=None):
246 """run preprocessing and encode text as Ids"""
247 return self.EncodeAsIds(text, process_fn=process_fn)
248
249 def __len__(self):
250 """total number of tokens"""

Callers

nothing calls this directly

Calls 1

EncodeAsIdsMethod · 0.95

Tested by

no test coverage detected