Flyte 2 is available today for local execution - distributed execution coming to open source soon. Preview Flyte 2 for production, hosted on Union.ai
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()