nat.profiler.prediction_trie.data_models#
Classes#
Aggregated statistics for a single metric from profiler data. |
|
Predictions for an LLM call at a given position in the call hierarchy. |
|
A node in the prediction trie representing a function in the call hierarchy. |
Module Contents#
- class PredictionMetrics(/, **data: Any)#
Bases:
pydantic.BaseModelAggregated statistics for a single metric from profiler data.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.
- class LLMCallPrediction(/, **data: Any)#
Bases:
pydantic.BaseModelPredictions for an LLM call at a given position in the call hierarchy.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- remaining_calls: PredictionMetrics = None#
- interarrival_ms: PredictionMetrics = None#
- output_tokens: PredictionMetrics = None#
- class PredictionTrieNode(/, **data: Any)#
Bases:
pydantic.BaseModelA node in the prediction trie representing a function in the call hierarchy.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- children: dict[str, PredictionTrieNode] = None#
- predictions_by_call_index: dict[int, LLMCallPrediction] = None#
- predictions_any_index: LLMCallPrediction | None = None#