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

Function _callback

python/ctranslate2/extensions.py:481–485  ·  view source on GitHub ↗
(step_result)

Source from the content-addressed store, hash-verified

479 user_callback = lambda step_result: False
480
481 def _callback(step_result):
482 user_callback_result = user_callback(step_result)
483 step_results.put(step_result)
484
485 return generator_closed.is_set() or user_callback_result
486
487 kwargs.update(
488 {

Callers

nothing calls this directly

Calls 1

putMethod · 0.80

Tested by

no test coverage detected