MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / _callback

Function _callback

python/tests/test_translator.py:217–219  ·  view source on GitHub ↗
(step_result)

Source from the content-addressed store, hash-verified

215 hypotheses = collections.defaultdict(list)
216
217 def _callback(step_result):
218 assert step_result.batch_id == 0
219 hypotheses[step_result.hypothesis_id].append(step_result.token)
220
221 source = ["آ", "ت", "ز", "م", "و", "ن"]
222 translator = _get_transliterator()

Callers 1

searchMethod · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected