2.0.11

TokenEstimator

Package: flyte.extras

Protocol for records that can estimate their own token count.

Implement this on your record type and the TokenBatcher will call it automatically when no explicit estimated_tokens is passed to TokenBatcher.submit.

protocol TokenEstimator()

Methods

Method Description
estimate_tokens()

estimate_tokens()

def estimate_tokens()