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.9

CostEstimator

Package: flyte.extras

Protocol for records that can estimate their own processing cost.

Implement this on your record type and the batcher will call it
automatically when no explicit `estimated_cost` is passed to
`DynamicBatcher.submit`.

Example::

    @dataclass
    class ApiRequest:
        payload: str

        def estimate_cost(self) -> int:
            return len(self.payload)
protocol CostEstimator()

Methods

Method Description
estimate_cost()

estimate_cost()

def estimate_cost()