SYMBOL INDEX (3998 symbols across 291 files) FILE: agentlightning/adapter/base.py class Adapter (line 13) | class Adapter(Generic[T_from, T_to]): method __call__ (line 39) | def __call__(self, source: T_from, /) -> T_to: method adapt (line 54) | def adapt(self, source: T_from, /) -> T_to: class OtelTraceAdapter (line 69) | class OtelTraceAdapter(Adapter[Sequence[ReadableSpan], T_to], Generic[T_... class TraceAdapter (line 87) | class TraceAdapter(Adapter[Sequence[Span], T_to], Generic[T_to]): FILE: agentlightning/adapter/messages.py class OpenAIMessages (line 23) | class OpenAIMessages(TypedDict): class _RawSpanInfo (line 35) | class _RawSpanInfo(TypedDict): function group_genai_dict (line 53) | def group_genai_dict(data: Dict[str, Any], prefix: str) -> Union[Dict[st... function convert_to_openai_messages (line 106) | def convert_to_openai_messages(prompt_completion_list: List[_RawSpanInfo... class TraceToMessages (line 199) | class TraceToMessages(TraceAdapter[List[OpenAIMessages]]): method get_tool_calls (line 211) | def get_tool_calls(self, completion: Span, all_spans: Sequence[Span], ... method adapt (line 234) | def adapt(self, source: Sequence[Span], /) -> List[OpenAIMessages]: FILE: agentlightning/adapter/triplet.py function _attributes_get_multiple (line 24) | def _attributes_get_multiple(attributes: Dict[str, Any], keys: List[str]... function _attributes_get_ids_multiple (line 37) | def _attributes_get_ids_multiple(attributes: Dict[str, Any], keys: List[... function _attributes_unflatten_multiple (line 52) | def _attributes_unflatten_multiple( class Transition (line 65) | class Transition(BaseModel): class RewardMatchPolicy (line 84) | class RewardMatchPolicy(str, Enum): class TraceTree (line 99) | class TraceTree: method __init__ (line 108) | def __init__( method start_time (line 119) | def start_time(self): method end_time (line 123) | def end_time(self): method find_id (line 126) | def find_id(self, id: str) -> "TraceTree | None": method add_child (line 135) | def add_child(self, child: "TraceTree") -> None: method visualize (line 138) | def visualize(self, filename: str, interested_span_match: str | None =... method names_tuple (line 189) | def names_tuple(self) -> Tuple[str, List[Any]]: method traverse (line 206) | def traverse(self) -> List["TraceTree"]: method to_json (line 213) | def to_json(self) -> dict[str, Any]: method from_spans (line 226) | def from_spans(cls, spans: List[Span]) -> "TraceTree": method agent_name (line 317) | def agent_name(self) -> Optional[str]: method maybe_reward_dict (line 367) | def maybe_reward_dict(self) -> dict[str, Any]: method is_reward_span (line 379) | def is_reward_span(self) -> bool: method find_llm_calls (line 398) | def find_llm_calls( method repair_hierarchy (line 478) | def repair_hierarchy(self) -> None: method match_rewards (line 522) | def match_rewards(self, reward_match: str, llm_calls: List["TraceTree"... method extract_prompt_image_urls (line 577) | def extract_prompt_image_urls(self, prompt_raw_content: Any) -> List[s... method span_to_triplet (line 631) | def span_to_triplet(self, span: Span, agent_name: str) -> Triplet: method to_trajectory (line 702) | def to_trajectory( method __repr__ (line 760) | def __repr__(self): class TraceToTripletBase (line 767) | class TraceToTripletBase(TraceAdapter[List[Triplet]]): class TracerTraceToTriplet (line 771) | class TracerTraceToTriplet(TraceToTripletBase): method __init__ (line 786) | def __init__( method visualize (line 802) | def visualize( method adapt (line 831) | def adapt(self, source: Union[Sequence[Span], Sequence[ReadableSpan]],... class LlmProxyTraceToTriplet (line 857) | class LlmProxyTraceToTriplet(TraceToTripletBase): method _literal_eval_maybe (line 877) | def _literal_eval_maybe(self, v: Any) -> Any: method _extract_tokens_from_raw (line 887) | def _extract_tokens_from_raw(self, attrs: Dict[str, Any]) -> Tuple[Lis... method _extract_tokens_from_openai (line 924) | def _extract_tokens_from_openai(self, attrs: Dict[str, Any]) -> Tuple[... method _maybe_reward_value (line 935) | def _maybe_reward_value(self, span: Span) -> Optional[float]: method _request_id_from_attrs (line 939) | def _request_id_from_attrs(self, attrs: Dict[str, Any]) -> Optional[str]: method adapt (line 944) | def adapt(self, source: Sequence[Span], /) -> List[Triplet]: # type: ... FILE: agentlightning/algorithm/__init__.py function APO (line 20) | def APO(*args: Any, **kwargs: Any) -> APOType[Any]: function VERL (line 26) | def VERL(*args: Any, **kwargs: Any) -> VERLType: FILE: agentlightning/algorithm/apo/apo.py class RolloutResultForAPO (line 53) | class RolloutResultForAPO(TypedDict): class VersionedPromptTemplate (line 63) | class VersionedPromptTemplate: class APO (line 81) | class APO(Algorithm, Generic[T_task]): method __init__ (line 101) | def __init__( method _create_versioned_prompt (line 162) | def _create_versioned_prompt( method _format_log_prefix (line 175) | def _format_log_prefix( method _log (line 199) | def _log(self, level: int, message: str, *, prefix: Optional[str] = No... method get_seed_prompt_template (line 209) | def get_seed_prompt_template(self) -> Tuple[str, PromptTemplate]: method get_adapter (line 230) | def get_adapter(self) -> TraceToMessages: method get_best_prompt (line 245) | def get_best_prompt(self) -> PromptTemplate: method compute_textual_gradient (line 259) | async def compute_textual_gradient( method textual_gradient_and_apply_edit (line 324) | async def textual_gradient_and_apply_edit( method get_rollout_results (line 391) | async def get_rollout_results( method evaluate_prompt_on_batch (line 430) | async def evaluate_prompt_on_batch( method _initialize_beam (line 512) | def _initialize_beam( method _sample_parent_prompts (line 546) | def _sample_parent_prompts( method _generate_candidate_prompts (line 577) | async def _generate_candidate_prompts( method _evaluate_and_select_beam (line 689) | async def _evaluate_and_select_beam( method _update_best_prompt (line 758) | async def _update_best_prompt( method run (line 809) | async def run( FILE: agentlightning/algorithm/base.py class Algorithm (line 25) | class Algorithm: method is_async (line 34) | def is_async(self) -> bool: method set_trainer (line 38) | def set_trainer(self, trainer: Trainer) -> None: method get_trainer (line 47) | def get_trainer(self) -> Trainer: method set_llm_proxy (line 61) | def set_llm_proxy(self, llm_proxy: LLMProxy | None) -> None: method get_llm_proxy (line 70) | def get_llm_proxy(self) -> Optional[LLMProxy]: method set_adapter (line 86) | def set_adapter(self, adapter: TraceAdapter[Any]) -> None: method get_adapter (line 92) | def get_adapter(self) -> TraceAdapter[Any]: method set_store (line 103) | def set_store(self, store: LightningStore) -> None: method get_store (line 112) | def get_store(self) -> LightningStore: method get_initial_resources (line 120) | def get_initial_resources(self) -> Optional[NamedResources]: method set_initial_resources (line 126) | def set_initial_resources(self, resources: NamedResources) -> None: method __call__ (line 132) | def __call__(self, *args: Any, **kwargs: Any) -> Any: method run (line 135) | def run( method get_client (line 151) | def get_client(self) -> AgentLightningClient: FILE: agentlightning/algorithm/decorator.py class AlgorithmFuncSyncFull (line 36) | class AlgorithmFuncSyncFull(Protocol): method __call__ (line 37) | def __call__( class AlgorithmFuncSyncOnlyStore (line 49) | class AlgorithmFuncSyncOnlyStore(Protocol): method __call__ (line 50) | def __call__(self, *, store: LightningStore) -> None: ... class AlgorithmFuncSyncOnlyDataset (line 53) | class AlgorithmFuncSyncOnlyDataset(Protocol): method __call__ (line 54) | def __call__(self, *, train_dataset: Optional[Dataset[Any]], val_datas... class AlgorithmFuncAsyncFull (line 57) | class AlgorithmFuncAsyncFull(Protocol): method __call__ (line 58) | def __call__( class AlgorithmFuncAsyncOnlyStore (line 70) | class AlgorithmFuncAsyncOnlyStore(Protocol): method __call__ (line 71) | def __call__(self, *, store: LightningStore) -> Awaitable[None]: ... class AlgorithmFuncAsyncOnlyDataset (line 74) | class AlgorithmFuncAsyncOnlyDataset(Protocol): method __call__ (line 75) | def __call__( class AlgorithmFuncSyncFallback (line 85) | class AlgorithmFuncSyncFallback(Protocol): method __call__ (line 86) | def __call__(self, *args: Any, **kwargs: Any) -> Any: ... class AlgorithmFuncAsyncFallback (line 89) | class AlgorithmFuncAsyncFallback(Protocol): method __call__ (line 90) | def __call__(self, *args: Any, **kwargs: Any) -> Awaitable[Any]: ... class FunctionalAlgorithm (line 103) | class FunctionalAlgorithm(Algorithm, Generic[AF]): method __init__ (line 113) | def __init__(self: "FunctionalAlgorithm[Literal[False]]", algorithm_fu... method __init__ (line 116) | def __init__(self: "FunctionalAlgorithm[Literal[True]]", algorithm_fun... method __init__ (line 118) | def __init__(self, algorithm_func: Union[AlgorithmFuncSyncLike, Algori... method is_async (line 134) | def is_async(self) -> bool: method run (line 138) | def run( method run (line 145) | def run( method __call__ (line 151) | def __call__(self, *args: Any, **kwargs: Any) -> Any: method run (line 154) | def run( function algo (line 203) | def algo(func: AlgorithmFuncAsync) -> FunctionalAlgorithm[Literal[True]]... function algo (line 207) | def algo(func: AlgorithmFuncAsyncFallback) -> FunctionalAlgorithm[Any]: ... function algo (line 211) | def algo(func: AlgorithmFuncSync) -> FunctionalAlgorithm[Literal[False]]... function algo (line 215) | def algo(func: AlgorithmFuncSyncFallback) -> FunctionalAlgorithm[Any]: ... function algo (line 218) | def algo( FILE: agentlightning/algorithm/fast.py class FastAlgorithm (line 24) | class FastAlgorithm(Algorithm): function _timestamp_to_iso_str (line 33) | def _timestamp_to_iso_str(timestamp: float) -> str: class Baseline (line 37) | class Baseline(FastAlgorithm): method __init__ (line 69) | def __init__( method _span_to_string (line 89) | def _span_to_string(self, rollout_id: str, attempt: Attempt, span: Spa... method _handle_rollout_finish (line 109) | async def _handle_rollout_finish(self, rollout: Rollout) -> None: method _enqueue_rollouts (line 146) | async def _enqueue_rollouts( method _harvest_rollout_spans (line 162) | async def _harvest_rollout_spans(self, rollout_id: str): method run (line 192) | async def run( FILE: agentlightning/algorithm/utils.py function batch_iter_over_dataset (line 42) | def batch_iter_over_dataset(dataset: Dataset[T_task], batch_size: int) -... function with_store (line 77) | def with_store( function with_llm_proxy (line 104) | def with_llm_proxy( function with_llm_proxy (line 114) | def with_llm_proxy( function with_llm_proxy (line 123) | def with_llm_proxy( FILE: agentlightning/algorithm/verl/interface.py class VERL (line 20) | class VERL(Algorithm): method __init__ (line 125) | def __init__( method run (line 145) | def run( method get_client (line 195) | def get_client(self) -> AgentLightningClient: FILE: agentlightning/cli/__init__.py function main (line 24) | def main(argv: Iterable[str] | None = None) -> int: FILE: agentlightning/cli/prometheus.py function ensure_prometheus_dir (line 24) | def ensure_prometheus_dir() -> str: function create_prometheus_app (line 36) | def create_prometheus_app(metrics_path: str = "/v1/prometheus") -> FastAPI: function main (line 64) | def main(argv: Iterable[str] | None = None) -> int: FILE: agentlightning/cli/store.py function main (line 26) | def main(argv: Iterable[str] | None = None) -> int: FILE: agentlightning/cli/vllm.py function main (line 8) | def main(argv: Iterable[str] | None = None) -> int: FILE: agentlightning/client.py class AgentLightningClient (line 26) | class AgentLightningClient: method __init__ (line 52) | def __init__(self, endpoint: str, poll_interval: float = 5.0, timeout:... method _request_json_async (line 70) | async def _request_json_async(self, url: str) -> Optional[Dict[str, An... method _post_json_async (line 89) | async def _post_json_async(self, url: str, payload: Dict[str, Any]) ->... method poll_next_task_async (line 109) | async def poll_next_task_async(self) -> Optional[Task]: method get_resources_by_id_async (line 128) | async def get_resources_by_id_async(self, resource_id: str) -> Optiona... method get_latest_resources_async (line 152) | async def get_latest_resources_async(self) -> Optional[ResourcesUpdate]: method post_rollout_async (line 168) | async def post_rollout_async(self, rollout: RolloutLegacy) -> Optional... method _request_json (line 181) | def _request_json(self, url: str) -> Optional[Dict[str, Any]]: method _post_json (line 198) | def _post_json(self, url: str, payload: Dict[str, Any]) -> Optional[Di... method poll_next_task (line 216) | def poll_next_task(self) -> Optional[Task]: method get_resources_by_id (line 235) | def get_resources_by_id(self, resource_id: str) -> Optional[ResourcesU... method get_latest_resources (line 259) | def get_latest_resources(self) -> Optional[ResourcesUpdate]: method post_rollout (line 274) | def post_rollout(self, rollout: RolloutLegacy) -> Optional[Dict[str, A... class DevTaskLoader (line 288) | class DevTaskLoader(AgentLightningClient): method __init__ (line 301) | def __init__( method rollouts (line 343) | def rollouts(self) -> List[RolloutLegacy]: method poll_next_task (line 347) | def poll_next_task(self) -> Optional[Task]: method get_resources_by_id (line 378) | def get_resources_by_id(self, resource_id: str) -> Optional[ResourcesU... method get_latest_resources (line 386) | def get_latest_resources(self) -> Optional[ResourcesUpdate]: method post_rollout (line 390) | def post_rollout(self, rollout: RolloutLegacy) -> Optional[Dict[str, A... method poll_next_task_async (line 395) | async def poll_next_task_async(self) -> Optional[Task]: method get_resources_by_id_async (line 398) | async def get_resources_by_id_async(self, resource_id: str) -> Optiona... method get_latest_resources_async (line 401) | async def get_latest_resources_async(self) -> Optional[ResourcesUpdate]: method post_rollout_async (line 404) | async def post_rollout_async(self, rollout: RolloutLegacy) -> Optional... method __repr__ (line 407) | def __repr__(self): FILE: agentlightning/config.py function nullable_str (line 45) | def nullable_str(value: str) -> str | None: function nullable_int (line 52) | def nullable_int(value: str) -> int | None: function nullable_float (line 62) | def nullable_float(value: str) -> float | None: function _str_to_bool (line 72) | def _str_to_bool(v: str) -> bool: function _get_param_type_details (line 85) | def _get_param_type_details(param_annotation: Any) -> Tuple[Any, bool, b... function _determine_argparse_type (line 118) | def _determine_argparse_type(param_type: Any) -> Callable[[str], Any]: function _determine_argparse_type_and_nargs (line 134) | def _determine_argparse_type_and_nargs( function _build_help_string (line 155) | def _build_help_string(cls_name: str, param_name: str, core_type: Any, i... function _add_argument_for_parameter (line 179) | def _add_argument_for_parameter( function _add_arguments_for_class (line 219) | def _add_arguments_for_class( function _create_argument_parser (line 255) | def _create_argument_parser() -> argparse.ArgumentParser: function _instantiate_classes (line 263) | def _instantiate_classes( function lightning_cli (line 306) | def lightning_cli(cls1: Type[_C1]) -> _C1: ... function lightning_cli (line 308) | def lightning_cli(cls1: Type[_C1], cls2: Type[_C2]) -> Tuple[_C1, _C2]: ... function lightning_cli (line 310) | def lightning_cli(cls1: Type[_C1], cls2: Type[_C2], cls3: Type[_C3]) -> ... function lightning_cli (line 312) | def lightning_cli(cls1: Type[_C1], cls2: Type[_C2], cls3: Type[_C3], cls... function lightning_cli (line 314) | def lightning_cli(*classes: Type[CliConfigurable]) -> Tuple[CliConfigura... function lightning_cli (line 320) | def lightning_cli(*classes: Type[CliConfigurable]) -> CliConfigurable | ... FILE: agentlightning/emitter/annotation.py function emit_annotation (line 35) | def emit_annotation(annotation: Dict[str, Any], propagate: bool = True) ... class OperationContext (line 70) | class OperationContext: method __init__ (line 88) | def __init__(self, name: str, attributes: Dict[str, Any], propagate: b... method __enter__ (line 111) | def __enter__(self) -> "OperationContext": method __exit__ (line 123) | def __exit__( method span (line 137) | def span(self) -> SpanCoreFields: method set_input (line 143) | def set_input(self, *args: Any, **kwargs: Any) -> None: method set_output (line 173) | def set_output(self, output: Any) -> None: method __call__ (line 187) | def __call__(self, fn: _FnType) -> _FnType: function operation (line 281) | def operation( function operation (line 287) | def operation( function operation (line 293) | def operation(fn: _FnType, *, name: Optional[str] = None, **additional_a... function operation (line 297) | def operation(*, name: Optional[str] = None, **additional_attributes: An... function operation (line 301) | def operation(fn: _FnType, **additional_attributes: Any) -> _FnType: ... function operation (line 305) | def operation(**additional_attributes: Any) -> OperationContext: ... function operation (line 308) | def operation( FILE: agentlightning/emitter/exception.py function emit_exception (line 15) | def emit_exception( FILE: agentlightning/emitter/message.py function emit_message (line 15) | def emit_message(message: str, attributes: Optional[Dict[str, Any]] = No... function get_message_value (line 49) | def get_message_value(span: SpanLike) -> Optional[str]: FILE: agentlightning/emitter/object.py function emit_object (line 17) | def emit_object(object: Any, attributes: Optional[Dict[str, Any]] = None... function encode_object (line 55) | def encode_object(object: Any) -> Dict[str, Any]: function get_object_value (line 87) | def get_object_value(span: SpanLike) -> Any: FILE: agentlightning/emitter/reward.py class RewardDimension (line 44) | class RewardDimension(TypedDict): class _RewardSpanData (line 51) | class _RewardSpanData(TypedDict): function _agentops_initialized (line 59) | def _agentops_initialized() -> bool: function reward (line 66) | def reward(fn: _FnType) -> _FnType: function emit_reward (line 148) | def emit_reward( function get_reward_value (line 213) | def get_reward_value(span: SpanLike) -> Optional[float]: function get_rewards_from_span (line 270) | def get_rewards_from_span(span: SpanLike) -> List[RewardPydanticModel]: function is_reward_span (line 289) | def is_reward_span(span: SpanLike) -> bool: function find_reward_spans (line 295) | def find_reward_spans(spans: Sequence[SpanLike]) -> List[SpanLike]: function find_final_reward (line 307) | def find_final_reward(spans: Sequence[SpanLike]) -> Optional[float]: FILE: agentlightning/env_var.py class LightningEnvVar (line 19) | class LightningEnvVar(Enum): function resolve_bool_env_var (line 48) | def resolve_bool_env_var(env_var: LightningEnvVar, override: bool, fallb... function resolve_bool_env_var (line 52) | def resolve_bool_env_var(env_var: LightningEnvVar, *, fallback: bool) ->... function resolve_bool_env_var (line 56) | def resolve_bool_env_var( function resolve_bool_env_var (line 61) | def resolve_bool_env_var( function resolve_int_env_var (line 89) | def resolve_int_env_var(env_var: LightningEnvVar, override: int, fallbac... function resolve_int_env_var (line 93) | def resolve_int_env_var(env_var: LightningEnvVar, *, fallback: int) -> i... function resolve_int_env_var (line 97) | def resolve_int_env_var( function resolve_int_env_var (line 102) | def resolve_int_env_var( function resolve_str_env_var (line 126) | def resolve_str_env_var(env_var: LightningEnvVar, override: str, fallbac... function resolve_str_env_var (line 130) | def resolve_str_env_var(env_var: LightningEnvVar, *, fallback: str) -> s... function resolve_str_env_var (line 134) | def resolve_str_env_var( function resolve_str_env_var (line 139) | def resolve_str_env_var( FILE: agentlightning/execution/base.py class AlgorithmBundle (line 15) | class AlgorithmBundle(Protocol): method __call__ (line 23) | async def __call__(self, store: LightningStore, event: ExecutionEvent)... class RunnerBundle (line 27) | class RunnerBundle(Protocol): method __call__ (line 31) | async def __call__(self, store: LightningStore, worker_id: int, event:... class ExecutionStrategy (line 35) | class ExecutionStrategy: method execute (line 50) | def execute(self, algorithm: AlgorithmBundle, runner: RunnerBundle, st... FILE: agentlightning/execution/client_server.py class ClientServerExecutionStrategy (line 22) | class ClientServerExecutionStrategy(ExecutionStrategy): method __init__ (line 65) | def __init__( method _execute_algorithm (line 127) | async def _execute_algorithm( method _execute_runner (line 167) | async def _execute_runner( method _spawn_runners (line 207) | def _spawn_runners( method _spawn_algorithm_process (line 240) | def _spawn_algorithm_process( method _join_until_deadline (line 267) | def _join_until_deadline( method _signal_processes (line 285) | def _signal_processes( method _shutdown_processes (line 297) | def _shutdown_processes( method _check_process_exitcodes (line 349) | def _check_process_exitcodes(self, processes: Iterable[multiprocessing... method execute (line 356) | def execute(self, algorithm: AlgorithmBundle, runner: RunnerBundle, st... FILE: agentlightning/execution/events.py class ExecutionEvent (line 9) | class ExecutionEvent(Protocol): method set (line 24) | def set(self) -> None: ... method clear (line 25) | def clear(self) -> None: ... method is_set (line 26) | def is_set(self) -> bool: ... method wait (line 27) | def wait(self, timeout: Optional[float] = None) -> bool: ... class ThreadingEvent (line 30) | class ThreadingEvent: method __init__ (line 35) | def __init__(self) -> None: method set (line 38) | def set(self) -> None: method clear (line 41) | def clear(self) -> None: method is_set (line 44) | def is_set(self) -> bool: method wait (line 47) | def wait(self, timeout: Optional[float] = None) -> bool: class MultiprocessingEvent (line 51) | class MultiprocessingEvent: method __init__ (line 56) | def __init__(self, *, ctx: Optional[BaseContext] = None) -> None: method set (line 59) | def set(self) -> None: method clear (line 62) | def clear(self) -> None: method is_set (line 65) | def is_set(self) -> bool: method wait (line 68) | def wait(self, timeout: Optional[float] = None) -> bool: FILE: agentlightning/execution/inter_process.py class InterProcessExecutionStrategy (line 6) | class InterProcessExecutionStrategy(ExecutionStrategy): FILE: agentlightning/execution/shared_memory.py class SharedMemoryExecutionStrategy (line 20) | class SharedMemoryExecutionStrategy(ExecutionStrategy): method __init__ (line 45) | def __init__( method _run_until_completed_or_canceled (line 70) | async def _run_until_completed_or_canceled(self, coro: Awaitable[Any],... method _run_algorithm (line 163) | def _run_algorithm( method _run_runner (line 181) | def _run_runner( method execute (line 200) | def execute(self, algorithm: AlgorithmBundle, runner: RunnerBundle, st... FILE: agentlightning/instrumentation/__init__.py function instrument_all (line 43) | def instrument_all(): function uninstrument_all (line 74) | def uninstrument_all(): FILE: agentlightning/instrumentation/agentops.py function enable_agentops_service (line 32) | def enable_agentops_service(enabled: bool = True) -> None: function _patch_exporters (line 49) | def _patch_exporters(): function _unpatch_exporters (line 61) | def _unpatch_exporters(): function _unwrap_legacy_response (line 73) | def _unwrap_legacy_response(response: Any) -> Any: function _patch_new_agentops (line 79) | def _patch_new_agentops(): function _unpatch_new_agentops (line 155) | def _unpatch_new_agentops(): function _patch_old_agentops (line 171) | def _patch_old_agentops(): function _unpatch_old_agentops (line 200) | def _unpatch_old_agentops(): function instrument_agentops (line 210) | def instrument_agentops(): function uninstrument_agentops (line 234) | def uninstrument_agentops(): class BypassableAuthenticatedOTLPExporter (line 248) | class BypassableAuthenticatedOTLPExporter(LightningStoreOTLPExporter, Au... method should_bypass (line 255) | def should_bypass(self) -> bool: class BypassableOTLPMetricExporter (line 259) | class BypassableOTLPMetricExporter(OTLPMetricExporter): method export (line 265) | def export(self, *args: Any, **kwargs: Any) -> MetricExportResult: class BypassableOTLPSpanExporter (line 273) | class BypassableOTLPSpanExporter(LightningStoreOTLPExporter): method should_bypass (line 281) | def should_bypass(self) -> bool: class BypassableV3Client (line 285) | class BypassableV3Client(V3Client): method fetch_auth_token (line 292) | def fetch_auth_token(self, *args: Any, **kwargs: Any) -> AuthTokenResp... class BypassableV4Client (line 300) | class BypassableV4Client(V4Client): method post (line 306) | def post(self, *args: Any, **kwargs: Any) -> requests.Response: FILE: agentlightning/instrumentation/agentops_langchain.py function on_chain_start (line 17) | def on_chain_start(self: Any, serialized: Dict[str, Any], inputs: Dict[s... function instrument_agentops_langchain (line 32) | def instrument_agentops_langchain(): function uninstrument_agentops_langchain (line 39) | def uninstrument_agentops_langchain(): FILE: agentlightning/instrumentation/litellm.py function patched_set_attributes (line 23) | def patched_set_attributes(self: Any, span: Any, kwargs: Any, response_o... function instrument_litellm (line 32) | def instrument_litellm(): function uninstrument_litellm (line 37) | def uninstrument_litellm(): FILE: agentlightning/instrumentation/vllm.py class ChatCompletionResponsePatched (line 18) | class ChatCompletionResponsePatched(ChatCompletionResponse): function chat_completion_full_generator (line 26) | async def chat_completion_full_generator( function instrument_vllm (line 66) | def instrument_vllm(): function uninstrument_vllm (line 79) | def uninstrument_vllm(): FILE: agentlightning/instrumentation/weave.py class InMemoryWeaveTraceServer (line 27) | class InMemoryWeaveTraceServer(TraceServerClientInterface): method __init__ (line 34) | def __init__(self): method from_env (line 45) | def from_env(cls, *args: Any, **kwargs: Any) -> InMemoryWeaveTraceServer: method server_info (line 48) | def server_info(self) -> ServerInfoRes: method ensure_project_exists (line 51) | def ensure_project_exists(self, entity: str, project: str) -> tsi.Ensu... method call_start (line 57) | def call_start(self, req: tsi.CallStartReq) -> tsi.CallStartRes: method call_end (line 80) | def call_end(self, req: tsi.CallEndReq) -> tsi.CallEndRes: method call_start_batch (line 95) | def call_start_batch(self, req: tsi.CallCreateBatchReq) -> tsi.CallCre... method call_read (line 104) | def call_read(self, req: tsi.CallReadReq) -> tsi.CallReadRes: method calls_query (line 109) | def calls_query(self, req: tsi.CallsQueryReq) -> tsi.CallsQueryRes: method calls_query_stream (line 113) | def calls_query_stream(self, req: tsi.CallsQueryReq) -> Iterator[tsi.C... method calls_delete (line 117) | def calls_delete(self, req: tsi.CallsDeleteReq) -> tsi.CallsDeleteRes: method call_update (line 126) | def call_update(self, req: tsi.CallUpdateReq) -> tsi.CallUpdateRes: method calls_query_stats (line 130) | def calls_query_stats(self, req: tsi.CallsQueryStatsReq) -> tsi.CallsQ... method cost_create (line 136) | def cost_create(self, req: tsi.CostCreateReq) -> tsi.CostCreateRes: method cost_query (line 140) | def cost_query(self, req: tsi.CostQueryReq) -> tsi.CostQueryRes: method cost_purge (line 144) | def cost_purge(self, req: tsi.CostPurgeReq) -> tsi.CostPurgeRes: method obj_create (line 150) | def obj_create(self, req: tsi.ObjCreateReq) -> tsi.ObjCreateRes: method obj_read (line 156) | def obj_read(self, req: tsi.ObjReadReq) -> tsi.ObjReadRes: method objs_query (line 160) | def objs_query(self, req: tsi.ObjQueryReq) -> tsi.ObjQueryRes: method obj_delete (line 164) | def obj_delete(self, req: tsi.ObjDeleteReq) -> tsi.ObjDeleteRes: method table_create (line 170) | def table_create(self, req: tsi.TableCreateReq) -> tsi.TableCreateRes: method table_create_from_digests (line 174) | def table_create_from_digests(self, req: tsi.TableCreateFromDigestsReq... method table_update (line 178) | def table_update(self, req: tsi.TableUpdateReq) -> tsi.TableUpdateRes: method table_query (line 182) | def table_query(self, req: tsi.TableQueryReq) -> tsi.TableQueryRes: method table_query_stream (line 186) | def table_query_stream(self, req: tsi.TableQueryReq) -> Iterator[tsi.T... method table_query_stats (line 190) | def table_query_stats(self, req: tsi.TableQueryStatsReq) -> tsi.TableQ... method table_query_stats_batch (line 194) | def table_query_stats_batch(self, req: tsi.TableQueryStatsBatchReq) ->... method refs_read_batch (line 200) | def refs_read_batch(self, req: tsi.RefsReadBatchReq) -> tsi.RefsReadBa... method file_create (line 205) | def file_create(self, req: tsi.FileCreateReq) -> tsi.FileCreateRes: method file_content_read (line 209) | def file_content_read(self, req: tsi.FileContentReadReq) -> tsi.FileCo... method files_stats (line 212) | def files_stats(self, req: tsi.FilesStatsReq) -> tsi.FilesStatsRes: method feedback_create (line 219) | def feedback_create(self, req: tsi.FeedbackCreateReq) -> tsi.FeedbackC... method feedback_create_batch (line 229) | def feedback_create_batch(self, req: tsi.FeedbackCreateBatchReq) -> ts... method feedback_query (line 237) | def feedback_query(self, req: tsi.FeedbackQueryReq) -> tsi.FeedbackQue... method feedback_purge (line 241) | def feedback_purge(self, req: tsi.FeedbackPurgeReq) -> tsi.FeedbackPur... method feedback_replace (line 246) | def feedback_replace(self, req: tsi.FeedbackReplaceReq) -> tsi.Feedbac... method actions_execute_batch (line 257) | def actions_execute_batch(self, req: tsi.ActionsExecuteBatchReq) -> ts... method completions_create (line 263) | def completions_create(self, req: tsi.CompletionsCreateReq) -> tsi.Com... method completions_create_stream (line 267) | def completions_create_stream(self, req: tsi.CompletionsCreateReq) -> ... method image_create (line 274) | def image_create(self, req: tsi.ImageGenerationCreateReq) -> tsi.Image... method project_stats (line 280) | def project_stats(self, req: tsi.ProjectStatsReq) -> tsi.ProjectStatsRes: method threads_query_stream (line 291) | def threads_query_stream(self, req: tsi.ThreadsQueryReq) -> Iterator[t... method evaluate_model (line 297) | def evaluate_model(self, req: tsi.EvaluateModelReq) -> tsi.EvaluateMod... method evaluation_status (line 301) | def evaluation_status(self, req: tsi.EvaluationStatusReq) -> tsi.Evalu... method otel_export (line 306) | def otel_export(self, req: tsi.OtelExportReq) -> tsi.OtelExportRes: method op_create (line 314) | def op_create(self, req: tsi.OpCreateReq) -> tsi.OpCreateRes: method op_read (line 317) | def op_read(self, req: tsi.OpReadReq) -> tsi.OpReadRes: method op_list (line 320) | def op_list(self, req: tsi.OpListReq) -> Iterator[tsi.OpReadRes]: method op_delete (line 323) | def op_delete(self, req: tsi.OpDeleteReq) -> tsi.OpDeleteRes: method dataset_create (line 327) | def dataset_create(self, req: tsi.DatasetCreateReq) -> tsi.DatasetCrea... method dataset_read (line 330) | def dataset_read(self, req: tsi.DatasetReadReq) -> tsi.DatasetReadRes: method dataset_list (line 333) | def dataset_list(self, req: tsi.DatasetListReq) -> Iterator[tsi.Datase... method dataset_delete (line 336) | def dataset_delete(self, req: tsi.DatasetDeleteReq) -> tsi.DatasetDele... method scorer_create (line 340) | def scorer_create(self, req: tsi.ScorerCreateReq) -> tsi.ScorerCreateRes: method scorer_read (line 343) | def scorer_read(self, req: tsi.ScorerReadReq) -> tsi.ScorerReadRes: method scorer_list (line 346) | def scorer_list(self, req: tsi.ScorerListReq) -> Iterator[tsi.ScorerRe... method scorer_delete (line 349) | def scorer_delete(self, req: tsi.ScorerDeleteReq) -> tsi.ScorerDeleteRes: method evaluation_create (line 353) | def evaluation_create(self, req: tsi.EvaluationCreateReq) -> tsi.Evalu... method evaluation_read (line 358) | def evaluation_read(self, req: tsi.EvaluationReadReq) -> tsi.Evaluatio... method evaluation_list (line 361) | def evaluation_list(self, req: tsi.EvaluationListReq) -> Iterator[tsi.... method evaluation_delete (line 364) | def evaluation_delete(self, req: tsi.EvaluationDeleteReq) -> tsi.Evalu... method model_create (line 368) | def model_create(self, req: tsi.ModelCreateReq) -> tsi.ModelCreateRes: method model_read (line 373) | def model_read(self, req: tsi.ModelReadReq) -> tsi.ModelReadRes: method model_list (line 376) | def model_list(self, req: tsi.ModelListReq) -> Iterator[tsi.ModelReadR... method model_delete (line 379) | def model_delete(self, req: tsi.ModelDeleteReq) -> tsi.ModelDeleteRes: method evaluation_run_create (line 383) | def evaluation_run_create(self, req: tsi.EvaluationRunCreateReq) -> ts... method evaluation_run_read (line 386) | def evaluation_run_read(self, req: tsi.EvaluationRunReadReq) -> tsi.Ev... method evaluation_run_list (line 389) | def evaluation_run_list(self, req: tsi.EvaluationRunListReq) -> Iterat... method evaluation_run_delete (line 392) | def evaluation_run_delete(self, req: tsi.EvaluationRunDeleteReq) -> ts... method evaluation_run_finish (line 395) | def evaluation_run_finish(self, req: tsi.EvaluationRunFinishReq) -> ts... method prediction_create (line 399) | def prediction_create(self, req: tsi.PredictionCreateReq) -> tsi.Predi... method prediction_read (line 402) | def prediction_read(self, req: tsi.PredictionReadReq) -> tsi.Predictio... method prediction_list (line 405) | def prediction_list(self, req: tsi.PredictionListReq) -> Iterator[tsi.... method prediction_delete (line 408) | def prediction_delete(self, req: tsi.PredictionDeleteReq) -> tsi.Predi... method prediction_finish (line 411) | def prediction_finish(self, req: tsi.PredictionFinishReq) -> tsi.Predi... method score_create (line 415) | def score_create(self, req: tsi.ScoreCreateReq) -> tsi.ScoreCreateRes: method score_read (line 418) | def score_read(self, req: tsi.ScoreReadReq) -> tsi.ScoreReadRes: method score_list (line 421) | def score_list(self, req: tsi.ScoreListReq) -> Iterator[tsi.ScoreReadR... method score_delete (line 424) | def score_delete(self, req: tsi.ScoreDeleteReq) -> tsi.ScoreDeleteRes: method annotation_queue_create (line 429) | def annotation_queue_create(self, *args: Any, **kwargs: Any) -> Any: method annotation_queues_query_stream (line 432) | def annotation_queues_query_stream(self, *args: Any, **kwargs: Any) ->... method annotation_queue_read (line 435) | def annotation_queue_read(self, *args: Any, **kwargs: Any) -> Any: method annotation_queue_add_calls (line 438) | def annotation_queue_add_calls(self, *args: Any, **kwargs: Any) -> Any: method annotation_queues_stats (line 441) | def annotation_queues_stats(self, *args: Any, **kwargs: Any) -> Any: method annotation_queue_items_query (line 444) | def annotation_queue_items_query(self, *args: Any, **kwargs: Any) -> Any: method annotator_queue_items_progress_update (line 447) | def annotator_queue_items_progress_update(self, *args: Any, **kwargs: ... method calls_complete (line 450) | def calls_complete(self, *args: Any, **kwargs: Any) -> Any: method call_start_v2 (line 453) | def call_start_v2(self, *args: Any, **kwargs: Any) -> Any: method call_end_v2 (line 456) | def call_end_v2(self, *args: Any, **kwargs: Any) -> Any: method call_stats (line 459) | def call_stats(self, *args: Any, **kwargs: Any) -> Any: method trace_usage (line 462) | def trace_usage(self, *args: Any, **kwargs: Any) -> Any: method calls_usage (line 465) | def calls_usage(self, *args: Any, **kwargs: Any) -> Any: function init_weave_get_server_factory (line 475) | def init_weave_get_server_factory(server: InMemoryWeaveTraceServer) -> C... function get_entity_project_from_project_name_factory (line 483) | def get_entity_project_from_project_name_factory(entity_name: str) -> tu... function get_username (line 497) | def get_username() -> str: function instrument_weave (line 509) | def instrument_weave(server: InMemoryWeaveTraceServer): function uninstrument_weave (line 521) | def uninstrument_weave(): FILE: agentlightning/litagent/decorator.py class LlmRolloutFuncSync2 (line 38) | class LlmRolloutFuncSync2(Protocol[T_contra]): method __call__ (line 39) | def __call__(self, task: T_contra, llm: LLM) -> RolloutRawResult: ... class LlmRolloutFuncSync3 (line 42) | class LlmRolloutFuncSync3(Protocol[T_contra]): method __call__ (line 43) | def __call__(self, task: T_contra, llm: LLM, rollout: Rollout) -> Roll... class LlmRolloutFuncAsync2 (line 46) | class LlmRolloutFuncAsync2(Protocol[T_contra]): method __call__ (line 47) | def __call__(self, task: T_contra, llm: LLM) -> Awaitable[RolloutRawRe... class LlmRolloutFuncAsync3 (line 50) | class LlmRolloutFuncAsync3(Protocol[T_contra]): method __call__ (line 51) | def __call__(self, task: T_contra, llm: LLM, rollout: Rollout) -> Awai... class PromptRolloutFuncSync2 (line 62) | class PromptRolloutFuncSync2(Protocol[T_contra]): method __call__ (line 63) | def __call__(self, task: T_contra, prompt_template: PromptTemplate) ->... class PromptRolloutFuncAsync2 (line 66) | class PromptRolloutFuncAsync2(Protocol[T_contra]): method __call__ (line 67) | def __call__(self, task: T_contra, prompt_template: PromptTemplate) ->... class PromptRolloutFuncSync3 (line 70) | class PromptRolloutFuncSync3(Protocol[T_contra]): method __call__ (line 71) | def __call__(self, task: T_contra, prompt_template: PromptTemplate, ro... class PromptRolloutFuncAsync3 (line 74) | class PromptRolloutFuncAsync3(Protocol[T_contra]): method __call__ (line 75) | def __call__( class FunctionalLitAgentFunc (line 88) | class FunctionalLitAgentFunc(Protocol[T_contra]): method __call__ (line 89) | def __call__( class FunctionalLitAgent (line 94) | class FunctionalLitAgent(LitAgent[T]): method __init__ (line 102) | def __init__(self, rollout_func: FunctionalLitAgentFunc[T], *, strip_p... method _accepts_rollout (line 124) | def _accepts_rollout(self) -> bool: method _accepts_llm (line 127) | def _accepts_llm(self) -> bool: method _accepts_prompt_template (line 130) | def _accepts_prompt_template(self) -> bool: method __call__ (line 133) | def __call__(self, *args: Any, **kwargs: Any) -> Any: method is_async (line 137) | def is_async(self) -> bool: method rollout (line 140) | def rollout(self, task: T, resources: NamedResources, rollout: Rollout... method rollout_async (line 160) | async def rollout_async(self, task: T, resources: NamedResources, roll... method _get_kwargs (line 180) | def _get_kwargs(self, resources: NamedResources, rollout: Rollout) -> ... method _get_llm_resource (line 206) | def _get_llm_resource(self, resources: NamedResources, rollout: Rollou... method _get_prompt_template_resource (line 237) | def _get_prompt_template_resource(self, resources: NamedResources, rol... method _strip_proxy_helper (line 265) | def _strip_proxy_helper(self, proxy_llm: LLM, rollout: Rollout) -> LLM: function llm_rollout (line 297) | def llm_rollout(func: LlmRolloutFunc[T]) -> FunctionalLitAgent[T]: ... function llm_rollout (line 301) | def llm_rollout(*, strip_proxy: bool = True) -> Callable[[LlmRolloutFunc... function llm_rollout (line 304) | def llm_rollout( function _validate_llm_rollout_func (line 352) | def _validate_llm_rollout_func(func: Any) -> TypeGuard[LlmRolloutFunc[An... function prompt_rollout (line 384) | def prompt_rollout(func: PromptRolloutFunc[T]) -> FunctionalLitAgent[T]:... function prompt_rollout (line 388) | def prompt_rollout() -> Callable[[PromptRolloutFunc[T]], FunctionalLitAg... function prompt_rollout (line 391) | def prompt_rollout( function _validate_prompt_rollout_func (line 434) | def _validate_prompt_rollout_func(func: Any) -> TypeGuard[PromptRolloutF... function rollout (line 465) | def rollout(func: Union[LlmRolloutFunc[T], PromptRolloutFunc[T], Callabl... FILE: agentlightning/litagent/litagent.py function is_v0_1_rollout_api (line 30) | def is_v0_1_rollout_api(func: Callable[..., Any]) -> bool: class LitAgent (line 45) | class LitAgent(Generic[T]): method __init__ (line 52) | def __init__(self, *, trained_agents: Optional[str] = None) -> None: ... method is_async (line 75) | def is_async(self) -> bool: method set_trainer (line 92) | def set_trainer(self, trainer: Trainer) -> None: method get_trainer (line 100) | def get_trainer(self) -> Trainer: method trainer (line 110) | def trainer(self) -> Trainer: method get_tracer (line 114) | def get_tracer(self) -> Tracer: method tracer (line 122) | def tracer(self) -> Tracer: method set_runner (line 126) | def set_runner(self, runner: Runner[T]) -> None: method get_runner (line 134) | def get_runner(self) -> Runner[T]: method runner (line 144) | def runner(self) -> Runner[T]: method on_rollout_start (line 148) | def on_rollout_start(self, task: Task, runner: Runner[T], tracer: Trac... method on_rollout_end (line 164) | def on_rollout_end(self, task: Task, rollout: Rollout, runner: Runner[... method rollout (line 181) | def rollout(self, task: T, resources: NamedResources, rollout: Rollout... method rollout_async (line 205) | async def rollout_async(self, task: T, resources: NamedResources, roll... method training_rollout (line 220) | def training_rollout(self, task: T, resources: NamedResources, rollout... method validation_rollout (line 228) | def validation_rollout(self, task: T, resources: NamedResources, rollo... method training_rollout_async (line 237) | async def training_rollout_async(self, task: T, resources: NamedResour... method validation_rollout_async (line 245) | async def validation_rollout_async(self, task: T, resources: NamedReso... FILE: agentlightning/llm_proxy.py class ModelConfig (line 68) | class ModelConfig(TypedDict): function _get_pre_call_data (line 83) | def _get_pre_call_data(args: Any, kwargs: Any) -> Dict[str, Any]: function _reset_litellm_logging_worker (line 110) | def _reset_litellm_logging_worker() -> None: function _reset_litellm_logging_callback_manager (line 134) | def _reset_litellm_logging_callback_manager() -> None: class AddReturnTokenIds (line 149) | class AddReturnTokenIds(CustomLogger): method async_pre_call_hook (line 159) | async def async_pre_call_hook(self, *args: Any, **kwargs: Any) -> Opti... class AddLogprobs (line 178) | class AddLogprobs(CustomLogger): method async_pre_call_hook (line 185) | async def async_pre_call_hook(self, *args: Any, **kwargs: Any) -> Opti... class LightningSpanExporter (line 196) | class LightningSpanExporter(SpanExporter): method __init__ (line 213) | def __init__(self, _store: Optional[LightningStore] = None): method _ensure_loop (line 227) | def _ensure_loop(self) -> asyncio.AbstractEventLoop: method _ensure_lock (line 240) | def _ensure_lock(self) -> threading.Lock: method _clear_loop_and_lock (line 251) | def _clear_loop_and_lock(self) -> None: method _run_loop (line 266) | def _run_loop(self) -> None: method shutdown (line 272) | def shutdown(self) -> None: method export (line 294) | def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: method _maybe_flush (line 321) | def _maybe_flush(self): method _get_root_span_ids (line 441) | def _get_root_span_ids(self) -> Iterable[int]: method _get_subtrees (line 455) | def _get_subtrees(self, root_span_id: int) -> Iterable[int]: method _pop_subtrees (line 476) | def _pop_subtrees(self, root_span_id: int) -> List[ReadableSpan]: class LightningOpenTelemetry (line 499) | class LightningOpenTelemetry(OpenTelemetry): method __init__ (line 509) | def __init__(self): method async_pre_call_deployment_hook (line 518) | async def async_pre_call_deployment_hook( class RolloutAttemptMiddleware (line 536) | class RolloutAttemptMiddleware(BaseHTTPMiddleware): method dispatch (line 544) | async def dispatch(self, request: Request, call_next: Callable[[Reques... class MessageInspectionMiddleware (line 580) | class MessageInspectionMiddleware(BaseHTTPMiddleware): method dispatch (line 586) | async def dispatch(self, request: Request, call_next: Callable[[Reques... class StreamConversionMiddleware (line 598) | class StreamConversionMiddleware(BaseHTTPMiddleware): method dispatch (line 607) | async def dispatch(self, request: Request, call_next: Callable[[Reques... method _handle_stream_case (line 642) | async def _handle_stream_case( method anthropic_stream_generator (line 722) | async def anthropic_stream_generator(self, original_response: Dict[str... method openai_stream_generator (line 840) | async def openai_stream_generator(self, response_json: Dict[str, Any])... class LLMProxy (line 1007) | class LLMProxy: method __init__ (line 1064) | def __init__( method get_store (line 1136) | def get_store(self) -> Optional[LightningStore]: method set_store (line 1144) | def set_store(self, store: LightningStore) -> None: method update_model_list (line 1152) | def update_model_list(self, model_list: List[ModelConfig]) -> None: method initialize (line 1162) | def initialize(self): method _serve_context (line 1206) | async def _serve_context(self) -> AsyncGenerator[None, None]: method start (line 1249) | async def start(self): method stop (line 1283) | async def stop(self): method restart (line 1294) | async def restart(self, *, _port: int | None = None) -> None: method is_running (line 1306) | def is_running(self) -> bool: method as_resource (line 1314) | def as_resource( function get_active_llm_proxy (line 1373) | def get_active_llm_proxy() -> LLMProxy: function set_active_llm_proxy (line 1384) | def set_active_llm_proxy(proxy: LLMProxy) -> None: function initialize_llm_callbacks (line 1394) | def initialize_llm_callbacks(callback_classes: List[Type[CustomLogger]])... function _check_tracer_provider (line 1441) | def _check_tracer_provider() -> bool: FILE: agentlightning/logging.py function configure_logger (line 18) | def configure_logger(level: int = logging.INFO, name: str = "agentlightn... function _to_level_value (line 56) | def _to_level_value(lvl: int | str) -> int: function _ensure_file_handler (line 65) | def _ensure_file_handler( function setup (line 95) | def setup( function setup_module (line 286) | def setup_module( function _has_width (line 368) | def _has_width() -> bool: FILE: agentlightning/runner/agent.py class LitAgentRunner (line 60) | class LitAgentRunner(Runner[T_task]): method __init__ (line 71) | def __init__( method init (line 114) | def init(self, agent: LitAgent[T_task], *, hooks: Optional[Sequence[Ho... method init_worker (line 132) | def init_worker(self, worker_id: int, store: LightningStore, **kwargs:... method teardown (line 149) | def teardown(self, *args: Any, **kwargs: Any) -> None: method teardown_worker (line 166) | def teardown_worker(self, worker_id: int, *args: Any, **kwargs: Any) -... method tracer (line 181) | def tracer(self) -> Tracer: method get_agent (line 189) | def get_agent(self) -> LitAgent[T_task]: method get_store (line 202) | def get_store(self) -> LightningStore: method get_worker_id (line 215) | def get_worker_id(self) -> str: method _log_prefix (line 224) | def _log_prefix(self, rollout_id: Optional[str] = None) -> str: method _trigger_hooks (line 246) | async def _trigger_hooks( method _post_process_rollout_result (line 270) | async def _post_process_rollout_result( method _emit_heartbeat (line 388) | async def _emit_heartbeat(self, store: LightningStore) -> None: method _start_heartbeat_loop (line 432) | def _start_heartbeat_loop(self, store: LightningStore) -> Optional[Cal... method _start_heartbeat_asyncio_loop (line 448) | def _start_heartbeat_asyncio_loop(self, store: LightningStore) -> Opti... method _start_heartbeat_thread_loop (line 484) | def _start_heartbeat_thread_loop(self, store: LightningStore) -> Optio... method _sleep_until_next_poll (line 599) | async def _sleep_until_next_poll(self, event: Optional[ExecutionEvent]... method _step_impl (line 621) | async def _step_impl(self, next_rollout: AttemptedRollout, raise_on_ex... method iter (line 737) | async def iter(self, *, event: Optional[ExecutionEvent] = None) -> None: method step (line 794) | async def step( FILE: agentlightning/runner/base.py class Runner (line 25) | class Runner(ParallelWorkerBase, Generic[T_task]): method init (line 35) | def init(self, agent: LitAgent[T_task], **kwargs: Any) -> None: method init_worker (line 50) | def init_worker(self, worker_id: int, store: LightningStore, **kwargs:... method run (line 66) | def run(self, *args: Any, **kwargs: Any) -> None: method teardown (line 78) | def teardown(self, *args: Any, **kwargs: Any) -> None: method teardown_worker (line 86) | def teardown_worker(self, worker_id: int, *args: Any, **kwargs: Any) -... method run_context (line 98) | def run_context( method iter (line 142) | async def iter(self, *, event: Optional[ExecutionEvent] = None) -> None: method step (line 157) | async def step( FILE: agentlightning/runner/legacy.py class LegacyAgentRunner (line 26) | class LegacyAgentRunner(Runner[Any]): method __init__ (line 42) | def __init__( method init (line 62) | def init(self, *args: Any, **kwargs: Any) -> None: method init_worker (line 65) | def init_worker(self, worker_id: int, *args: Any, **kwargs: Any) -> None: method teardown_worker (line 68) | def teardown_worker(self, worker_id: int, *args: Any, **kwargs: Any) -... method teardown (line 71) | def teardown(self, *args: Any, **kwargs: Any) -> None: method _log_prefix (line 74) | def _log_prefix(self, rollout_id: Optional[str] = None) -> str: method _to_rollout_object (line 85) | def _to_rollout_object( method run (line 157) | def run(self) -> bool: # type: ignore method iter (line 219) | def iter(self) -> int: # type: ignore method run_async (line 234) | async def run_async(self) -> bool: method iter_async (line 297) | async def iter_async(self) -> int: FILE: agentlightning/semconv.py class LightningResourceAttributes (line 47) | class LightningResourceAttributes(Enum): class LightningSpanAttributes (line 63) | class LightningSpanAttributes(Enum): class RewardAttributes (line 108) | class RewardAttributes(Enum): class RewardPydanticModel (line 126) | class RewardPydanticModel(BaseModel): class LinkAttributes (line 136) | class LinkAttributes(Enum): class LinkPydanticModel (line 157) | class LinkPydanticModel(BaseModel): FILE: agentlightning/server.py class ServerDataStore (line 36) | class ServerDataStore: method __init__ (line 48) | def __init__(self): method add_task (line 61) | async def add_task( method get_next_task (line 95) | async def get_next_task(self) -> Optional[Task]: method update_resources (line 120) | async def update_resources(self, update: ResourcesUpdate): method get_resources_by_id (line 132) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 154) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method store_rollout (line 160) | async def store_rollout(self, rollout: RolloutLegacy): method retrieve_rollout (line 171) | async def retrieve_rollout(self, rollout_id: str) -> Optional[RolloutL... method retrieve_completed_rollouts (line 184) | async def retrieve_completed_rollouts(self) -> List[RolloutLegacy]: method get_processing_tasks (line 191) | def get_processing_tasks(self) -> Dict[str, Task]: method requeue_task (line 195) | async def requeue_task(self, task: Task): class AgentLightningServer (line 204) | class AgentLightningServer: method __init__ (line 217) | def __init__(self, host: str = "127.0.0.1", port: int = 8000, task_tim... method _lifespan (line 248) | async def _lifespan(self, app: FastAPI): method _check_and_requeue_stale_tasks (line 262) | async def _check_and_requeue_stale_tasks(self): method _setup_routes (line 277) | def _setup_routes(self): method start (line 331) | async def start(self): method stop (line 337) | async def stop(self): method run_forever (line 345) | async def run_forever(self): method queue_task (line 349) | async def queue_task( method update_resources (line 361) | async def update_resources(self, resources: NamedResources) -> str: method get_completed_rollout (line 372) | async def get_completed_rollout(self, rollout_id: str) -> Optional[Rol... method poll_completed_rollout (line 378) | async def poll_completed_rollout(self, rollout_id: str, timeout: Optio... method retrieve_completed_rollouts (line 397) | async def retrieve_completed_rollouts(self) -> List[RolloutLegacy]: FILE: agentlightning/store/base.py function is_queuing (line 27) | def is_queuing(rollout: Rollout) -> bool: function is_running (line 31) | def is_running(rollout: Rollout) -> bool: function is_finished (line 35) | def is_finished(rollout: Rollout) -> bool: class _UnsetType (line 39) | class _UnsetType: method __repr__ (line 44) | def __repr__(self) -> str: method __reduce__ (line 47) | def __reduce__(self): function _get_unset (line 51) | def _get_unset() -> _UnsetType: class LightningStoreCapabilities (line 59) | class LightningStoreCapabilities(TypedDict, total=False): class LightningStoreStatistics (line 75) | class LightningStoreStatistics(TypedDict, total=False): class LightningStore (line 104) | class LightningStore: method capabilities (line 127) | def capabilities(self) -> LightningStoreCapabilities: method statistics (line 136) | async def statistics(self) -> LightningStoreStatistics: method otlp_traces_endpoint (line 142) | def otlp_traces_endpoint(self) -> str: method start_rollout (line 158) | async def start_rollout( method enqueue_rollout (line 200) | async def enqueue_rollout( method enqueue_many_rollouts (line 234) | async def enqueue_many_rollouts(self, rollouts: Sequence[EnqueueRollou... method dequeue_rollout (line 250) | async def dequeue_rollout(self, worker_id: Optional[str] = None) -> Op... method dequeue_many_rollouts (line 277) | async def dequeue_many_rollouts( method start_attempt (line 300) | async def start_attempt(self, rollout_id: str, worker_id: Optional[str... method add_many_spans (line 322) | async def add_many_spans(self, spans: Sequence[Span]) -> Sequence[Span]: method add_span (line 330) | async def add_span(self, span: Span) -> Optional[Span]: method add_otel_span (line 355) | async def add_otel_span( method query_rollouts (line 386) | async def query_rollouts( method query_attempts (line 433) | async def query_attempts( method get_rollout_by_id (line 465) | async def get_rollout_by_id(self, rollout_id: str) -> Optional[Rollout]: method get_latest_attempt (line 479) | async def get_latest_attempt(self, rollout_id: str) -> Optional[Attempt]: method query_resources (line 494) | async def query_resources( method get_resources_by_id (line 529) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 543) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method get_next_span_sequence_id (line 555) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method get_many_span_sequence_ids (line 579) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... method wait_for_rollouts (line 593) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method query_spans (line 619) | async def query_spans( method add_resources (line 681) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 699) | async def update_resources(self, resources_id: str, resources: NamedRe... method update_rollout (line 718) | async def update_rollout( method update_attempt (line 756) | async def update_attempt( method query_workers (line 799) | async def query_workers( method get_worker_by_id (line 827) | async def get_worker_by_id(self, worker_id: str) -> Optional[Worker]: method update_worker (line 841) | async def update_worker( FILE: agentlightning/store/client_server.py class RolloutRequest (line 81) | class RolloutRequest(BaseModel): class DequeueRolloutRequest (line 90) | class DequeueRolloutRequest(BaseModel): class StartAttemptRequest (line 94) | class StartAttemptRequest(BaseModel): class EnqueueManyRolloutsRequest (line 98) | class EnqueueManyRolloutsRequest(BaseModel): class DequeueManyRolloutsRequest (line 102) | class DequeueManyRolloutsRequest(BaseModel): class QueryRolloutsRequest (line 107) | class QueryRolloutsRequest(BaseModel): class WaitForRolloutsRequest (line 121) | class WaitForRolloutsRequest(BaseModel): class NextSequenceIdRequest (line 126) | class NextSequenceIdRequest(BaseModel): class NextSequenceIdResponse (line 131) | class NextSequenceIdResponse(BaseModel): class UpdateRolloutRequest (line 135) | class UpdateRolloutRequest(BaseModel): class UpdateAttemptRequest (line 144) | class UpdateAttemptRequest(BaseModel): class UpdateWorkerRequest (line 151) | class UpdateWorkerRequest(BaseModel): class QueryAttemptsRequest (line 155) | class QueryAttemptsRequest(BaseModel): class QueryResourcesRequest (line 164) | class QueryResourcesRequest(BaseModel): class QuerySpansRequest (line 176) | class QuerySpansRequest(BaseModel): class QueryWorkersRequest (line 197) | class QueryWorkersRequest(BaseModel): class CachedStaticFiles (line 210) | class CachedStaticFiles(StaticFiles): method file_response (line 211) | def file_response(self, *args: Any, **kwargs: Any) -> Response: class LightningStoreServer (line 218) | class LightningStoreServer(LightningStore): method __init__ (line 246) | def __init__( method capabilities (line 311) | def capabilities(self) -> LightningStoreCapabilities: method otlp_traces_endpoint (line 320) | def otlp_traces_endpoint(self) -> str: method __getstate__ (line 324) | def __getstate__(self): method __setstate__ (line 341) | def __setstate__(self, state: Dict[str, Any]): method _normalize_cors_origins (line 365) | def _normalize_cors_origins( method _apply_cors (line 387) | def _apply_cors(self) -> None: method endpoint (line 401) | def endpoint(self) -> str: method start (line 405) | async def start(self): method run_forever (line 419) | async def run_forever(self): method stop (line 426) | async def stop(self): method _setup_routes (line 435) | def _setup_routes(self): method _setup_metrics (line 850) | def _setup_metrics(self, api: APIRouter, app: FastAPI): method _setup_otlp (line 940) | def _setup_otlp(self, api: APIRouter): method _setup_dashboard (line 970) | def _setup_dashboard(self): method _call_store_method (line 1010) | async def _call_store_method(self, method_name: str, *args: Any, **kwa... method statistics (line 1049) | async def statistics(self) -> LightningStoreStatistics: method start_rollout (line 1052) | async def start_rollout( method enqueue_rollout (line 1071) | async def enqueue_rollout( method enqueue_many_rollouts (line 1088) | async def enqueue_many_rollouts(self, rollouts: Sequence[EnqueueRollou... method dequeue_rollout (line 1091) | async def dequeue_rollout(self, worker_id: Optional[str] = None) -> Op... method dequeue_many_rollouts (line 1094) | async def dequeue_many_rollouts( method start_attempt (line 1102) | async def start_attempt(self, rollout_id: str, worker_id: Optional[str... method query_rollouts (line 1105) | async def query_rollouts( method query_attempts (line 1133) | async def query_attempts( method get_latest_attempt (line 1151) | async def get_latest_attempt(self, rollout_id: str) -> Optional[Attempt]: method query_resources (line 1154) | async def query_resources( method get_rollout_by_id (line 1174) | async def get_rollout_by_id(self, rollout_id: str) -> Optional[Rollout]: method add_resources (line 1177) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 1180) | async def update_resources(self, resources_id: str, resources: NamedRe... method get_resources_by_id (line 1183) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 1186) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method add_span (line 1189) | async def add_span(self, span: Span) -> Optional[Span]: method add_many_spans (line 1192) | async def add_many_spans(self, spans: Sequence[Span]) -> Sequence[Span]: method get_next_span_sequence_id (line 1195) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method get_many_span_sequence_ids (line 1198) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... method add_otel_span (line 1201) | async def add_otel_span( method wait_for_rollouts (line 1216) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method query_spans (line 1219) | async def query_spans( method update_rollout (line 1257) | async def update_rollout( method update_attempt (line 1278) | async def update_attempt( method query_workers (line 1297) | async def query_workers( method get_worker_by_id (line 1319) | async def get_worker_by_id(self, worker_id: str) -> Optional[Worker]: method update_worker (line 1322) | async def update_worker( class LightningStoreClient (line 1334) | class LightningStoreClient(LightningStore): method __init__ (line 1350) | def __init__( method capabilities (line 1377) | def capabilities(self) -> LightningStoreCapabilities: method otlp_traces_endpoint (line 1386) | def otlp_traces_endpoint(self) -> str: method statistics (line 1390) | async def statistics(self) -> LightningStoreStatistics: method __getstate__ (line 1394) | def __getstate__(self): method __setstate__ (line 1409) | def __setstate__(self, state: Dict[str, Any]): method _get_session (line 1426) | async def _get_session(self) -> aiohttp.ClientSession: method _wait_until_healthy (line 1458) | async def _wait_until_healthy(self, session: aiohttp.ClientSession) ->... method _request_json (line 1485) | async def _request_json( method close (line 1549) | async def close(self): method start_rollout (line 1570) | async def start_rollout( method enqueue_rollout (line 1593) | async def enqueue_rollout( method enqueue_many_rollouts (line 1621) | async def enqueue_many_rollouts(self, rollouts: Sequence[EnqueueRollou... method _dequeue_batch (line 1632) | async def _dequeue_batch( method dequeue_rollout (line 1660) | async def dequeue_rollout(self, worker_id: Optional[str] = None) -> Op... method dequeue_many_rollouts (line 1674) | async def dequeue_many_rollouts( method start_attempt (line 1682) | async def start_attempt(self, rollout_id: str, worker_id: Optional[str... method query_rollouts (line 1691) | async def query_rollouts( method query_attempts (line 1734) | async def query_attempts( method get_latest_attempt (line 1754) | async def get_latest_attempt(self, rollout_id: str) -> Optional[Attempt]: method get_rollout_by_id (line 1777) | async def get_rollout_by_id(self, rollout_id: str) -> Optional[Rollout]: method query_resources (line 1805) | async def query_resources( method add_resources (line 1834) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 1838) | async def update_resources(self, resources_id: str, resources: NamedRe... method get_resources_by_id (line 1844) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 1867) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method add_span (line 1885) | async def add_span(self, span: Span) -> Optional[Span]: method add_many_spans (line 1889) | async def add_many_spans(self, spans: Sequence[Span]) -> Sequence[Span]: method get_next_span_sequence_id (line 1897) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method get_many_span_sequence_ids (line 1906) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... method add_otel_span (line 1912) | async def add_otel_span( method wait_for_rollouts (line 1930) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method query_spans (line 1951) | async def query_spans( method update_rollout (line 1997) | async def update_rollout( method update_attempt (line 2024) | async def update_attempt( method query_workers (line 2050) | async def query_workers( method get_worker_by_id (line 2075) | async def get_worker_by_id(self, worker_id: str) -> Optional[Worker]: method update_worker (line 2081) | async def update_worker( FILE: agentlightning/store/collection/base.py function resolve_error_type (line 67) | def resolve_error_type(exc: BaseException | None) -> str: function tracked (line 84) | def tracked(operation: str): function ensure_numeric (line 99) | def ensure_numeric(value: Any, *, description: str) -> TypeGuard[Real]: class DuplicatedPrimaryKeyError (line 112) | class DuplicatedPrimaryKeyError(ValueError): class TrackedCollection (line 118) | class TrackedCollection: method __init__ (line 121) | def __init__(self, tracker: MetricsBackend | None = None): method tracker (line 125) | def tracker(self) -> MetricsBackend | None: method collection_name (line 129) | def collection_name(self) -> str: method extra_tracking_labels (line 134) | def extra_tracking_labels(self) -> Mapping[str, Any]: method tracking_context (line 139) | async def tracking_context(self, operation: str, collection: str): class Collection (line 189) | class Collection(TrackedCollection, Generic[T]): method primary_keys (line 192) | def primary_keys(self) -> Sequence[str]: method __repr__ (line 196) | def __repr__(self) -> str: method item_type (line 199) | def item_type(self) -> Type[T]: method size (line 203) | async def size(self) -> int: method query (line 207) | async def query( method get (line 236) | async def get( method insert (line 253) | async def insert(self, items: Sequence[T]) -> None: method update (line 261) | async def update(self, items: Sequence[T], update_fields: Sequence[str... method upsert (line 277) | async def upsert(self, items: Sequence[T], update_fields: Sequence[str... method delete (line 300) | async def delete(self, items: Sequence[T]) -> None: class Queue (line 312) | class Queue(TrackedCollection, Generic[T]): method __repr__ (line 315) | def __repr__(self) -> str: method item_type (line 318) | def item_type(self) -> Type[T]: method has (line 322) | async def has(self, item: T) -> bool: method enqueue (line 326) | async def enqueue(self, items: Sequence[T]) -> Sequence[T]: method dequeue (line 337) | async def dequeue(self, limit: int = 1) -> Sequence[T]: method peek (line 349) | async def peek(self, limit: int = 1) -> Sequence[T]: method size (line 361) | async def size(self) -> int: class KeyValue (line 366) | class KeyValue(TrackedCollection, Generic[K, V]): method __repr__ (line 369) | def __repr__(self) -> str: method has (line 372) | async def has(self, key: K) -> bool: method get (line 376) | async def get(self, key: K, default: V | None = None) -> V | None: method set (line 380) | async def set(self, key: K, value: V) -> None: method inc (line 384) | async def inc(self, key: K, amount: V) -> V: method chmax (line 392) | async def chmax(self, key: K, value: V) -> V: method pop (line 400) | async def pop(self, key: K, default: V | None = None) -> V | None: method size (line 404) | async def size(self) -> int: class LightningCollections (line 409) | class LightningCollections(TrackedCollection): method __init__ (line 416) | def __init__(self, tracker: MetricsBackend | None = None, extra_labels... method register_collection_metrics (line 420) | def register_collection_metrics(self, extra_labels: Optional[Sequence[... method tracker (line 435) | def tracker(self) -> MetricsBackend | None: method rollouts (line 439) | def rollouts(self) -> Collection[Rollout]: method attempts (line 444) | def attempts(self) -> Collection[Attempt]: method spans (line 449) | def spans(self) -> Collection[Span]: method resources (line 454) | def resources(self) -> Collection[ResourcesUpdate]: method workers (line 459) | def workers(self) -> Collection[Worker]: method rollout_queue (line 464) | def rollout_queue(self) -> Queue[str]: method span_sequence_ids (line 469) | def span_sequence_ids(self) -> KeyValue[str, int]: method atomic (line 473) | def atomic( method execute (line 498) | async def execute( function merge_must_filters (line 519) | def merge_must_filters(target: MutableMapping[str, FilterField], definit... function normalize_filter_options (line 549) | def normalize_filter_options( function resolve_sort_options (line 574) | def resolve_sort_options(sort: Optional[SortOptions]) -> Tuple[Optional[... FILE: agentlightning/store/collection/memory.py function _item_matches_filters (line 76) | def _item_matches_filters( function _get_sort_value (line 143) | def _get_sort_value(item: object, sort_by: str) -> Any: class ListBasedCollection (line 175) | class ListBasedCollection(Collection[T]): method __init__ (line 200) | def __init__( method collection_name (line 225) | def collection_name(self) -> str: method primary_keys (line 228) | def primary_keys(self) -> Sequence[str]: method item_type (line 232) | def item_type(self) -> Type[T]: method size (line 236) | async def size(self) -> int: method __repr__ (line 240) | def __repr__(self) -> str: method _ensure_item_type (line 247) | def _ensure_item_type(self, item: T) -> None: method _extract_primary_key_values (line 252) | def _extract_primary_key_values(self, item: T) -> Tuple[Any, ...]: method _render_key_values (line 265) | def _render_key_values(self, key_values: Sequence[Any]) -> str: method _locate_node (line 268) | def _locate_node( method _mutate_single (line 309) | def _mutate_single(self, item: T, mode: MutationMode, update_fields: S... method _iter_items (line 393) | def _iter_items( method _iter_matching_items (line 421) | def _iter_matching_items( method query (line 507) | async def query( method get (line 571) | async def get( method insert (line 608) | async def insert(self, items: Sequence[T]) -> None: method update (line 630) | async def update(self, items: Sequence[T], update_fields: Sequence[str... method upsert (line 645) | async def upsert(self, items: Sequence[T], update_fields: Sequence[str... method delete (line 656) | async def delete(self, items: Sequence[T]) -> None: class DequeBasedQueue (line 669) | class DequeBasedQueue(Queue[T]): method __init__ (line 675) | def __init__( method item_type (line 689) | def item_type(self) -> Type[T]: method collection_name (line 693) | def collection_name(self) -> str: method __repr__ (line 696) | def __repr__(self) -> str: method has (line 700) | async def has(self, item: T) -> bool: method enqueue (line 706) | async def enqueue(self, items: Sequence[T]) -> Sequence[T]: method dequeue (line 714) | async def dequeue(self, limit: int = 1) -> Sequence[T]: method peek (line 723) | async def peek(self, limit: int = 1) -> Sequence[T]: method size (line 735) | async def size(self) -> int: class DictBasedKeyValue (line 739) | class DictBasedKeyValue(KeyValue[K, V]): method __init__ (line 742) | def __init__( method collection_name (line 750) | def collection_name(self) -> str: method has (line 754) | async def has(self, key: K) -> bool: method get (line 758) | async def get(self, key: K, default: V | None = None) -> V | None: method set (line 762) | async def set(self, key: K, value: V) -> None: method inc (line 766) | async def inc(self, key: K, amount: V) -> V: method chmax (line 779) | async def chmax(self, key: K, value: V) -> V: method pop (line 793) | async def pop(self, key: K, default: V | None = None) -> V | None: method size (line 797) | async def size(self) -> int: class InMemoryLightningCollections (line 801) | class InMemoryLightningCollections(LightningCollections): method __init__ (line 807) | def __init__(self, lock_type: Literal["thread", "asyncio"], tracker: M... method collection_name (line 840) | def collection_name(self) -> str: method rollouts (line 844) | def rollouts(self) -> ListBasedCollection[Rollout]: method attempts (line 848) | def attempts(self) -> ListBasedCollection[Attempt]: method spans (line 852) | def spans(self) -> ListBasedCollection[Span]: method resources (line 856) | def resources(self) -> ListBasedCollection[ResourcesUpdate]: method workers (line 860) | def workers(self) -> ListBasedCollection[Worker]: method rollout_queue (line 864) | def rollout_queue(self) -> DequeBasedQueue[str]: method span_sequence_ids (line 868) | def span_sequence_ids(self) -> DictBasedKeyValue[str, int]: method atomic (line 872) | async def atomic( method evict_spans_for_rollout (line 907) | async def evict_spans_for_rollout(self, rollout_id: str) -> None: class _LoopAwareAsyncLock (line 915) | class _LoopAwareAsyncLock: method __init__ (line 923) | def __init__(self) -> None: method __getstate__ (line 928) | def __getstate__(self) -> dict[str, Any]: method __setstate__ (line 931) | def __setstate__(self, state: dict[str, Any]) -> None: method _get_lock_for_current_loop (line 934) | def _get_lock_for_current_loop(self) -> asyncio.Lock: method __aenter__ (line 942) | async def __aenter__(self) -> asyncio.Lock: method __aexit__ (line 947) | async def __aexit__(self, exc_type: type[BaseException] | None, exc: B... class _ThreadSafeAsyncLock (line 955) | class _ThreadSafeAsyncLock: method __init__ (line 961) | def __init__(self): method __aenter__ (line 964) | async def __aenter__(self): method __aexit__ (line 968) | async def __aexit__(self, *args: Any, **kwargs: Any): FILE: agentlightning/store/collection/mongo.py function resolve_mongo_error_type (line 90) | def resolve_mongo_error_type(exc: BaseException | None) -> str | None: function _field_ops_to_conditions (line 112) | def _field_ops_to_conditions(field: str, ops: Mapping[str, Any]) -> List... function _build_mongo_filter (line 144) | def _build_mongo_filter(filter_options: Optional[FilterOptions]) -> Dict... function _ensure_collection (line 196) | async def _ensure_collection( class MongoClientPool (line 250) | class MongoClientPool(Generic[T_mapping]): method __init__ (line 257) | def __init__(self, *, mongo_uri: str, mongo_client_kwargs: Mapping[str... method __aenter__ (line 265) | async def __aenter__(self) -> Self: method __aexit__ (line 268) | async def __aexit__(self, exc_type: type[BaseException] | None, exc: B... method close (line 271) | async def close(self) -> None: method get_client (line 285) | async def get_client(self) -> AsyncMongoClient[T_mapping]: method get_collection (line 307) | async def get_collection(self, database_name: str, collection_name: st... class MongoBasedCollection (line 325) | class MongoBasedCollection(Collection[T_model]): method __init__ (line 339) | def __init__( method collection_name (line 368) | def collection_name(self) -> str: method extra_tracking_labels (line 372) | def extra_tracking_labels(self) -> Mapping[str, str]: method ensure_collection (line 378) | async def ensure_collection(self) -> AsyncCollection[Mapping[str, Any]]: method with_session (line 393) | def with_session(self, session: AsyncClientSession) -> MongoBasedColle... method primary_keys (line 409) | def primary_keys(self) -> Sequence[str]: method item_type (line 413) | def item_type(self) -> Type[T_model]: method size (line 417) | async def size(self) -> int: method _pk_filter (line 421) | def _pk_filter(self, item: T_model) -> Dict[str, Any]: method _render_pk_values (line 431) | def _render_pk_values(self, values: Sequence[Any]) -> str: method _ensure_item_type (line 434) | def _ensure_item_type(self, item: T_model) -> None: method _inject_partition_filter (line 438) | def _inject_partition_filter(self, filter: Optional[FilterOptions]) ->... method _model_validate_item (line 461) | def _model_validate_item(self, raw: Mapping[str, Any]) -> T_model: method query (line 470) | async def query( method get (line 516) | async def get( method insert (line 545) | async def insert(self, items: Sequence[T_model]) -> None: method update (line 579) | async def update(self, items: Sequence[T_model], update_fields: Sequen... method upsert (line 626) | async def upsert(self, items: Sequence[T_model], update_fields: Sequen... method delete (line 676) | async def delete(self, items: Sequence[T_model]) -> None: class MongoBasedQueue (line 690) | class MongoBasedQueue(Queue[T_generic], Generic[T_generic]): method __init__ (line 696) | def __init__( method item_type (line 724) | def item_type(self) -> Type[T_generic]: method extra_tracking_labels (line 728) | def extra_tracking_labels(self) -> Mapping[str, str]: method collection_name (line 734) | def collection_name(self) -> str: method ensure_collection (line 738) | async def ensure_collection(self) -> AsyncCollection[Mapping[str, Any]]: method with_session (line 750) | def with_session(self, session: AsyncClientSession) -> MongoBasedQueue... method has (line 764) | async def has(self, item: T_generic) -> bool: method enqueue (line 778) | async def enqueue(self, items: Sequence[T_generic]) -> Sequence[T_gene... method dequeue (line 801) | async def dequeue(self, limit: int = 1) -> Sequence[T_generic]: method peek (line 832) | async def peek(self, limit: int = 1) -> Sequence[T_generic]: method size (line 858) | async def size(self) -> int: class MongoBasedKeyValue (line 869) | class MongoBasedKeyValue(KeyValue[K, V], Generic[K, V]): method __init__ (line 872) | def __init__( method extra_tracking_labels (line 906) | def extra_tracking_labels(self) -> Mapping[str, str]: method collection_name (line 912) | def collection_name(self) -> str: method ensure_collection (line 916) | async def ensure_collection(self, *, create_indexes: bool = True) -> A... method with_session (line 925) | def with_session(self, session: AsyncClientSession) -> MongoBasedKeyVa... method has (line 941) | async def has(self, key: K) -> bool: method get (line 954) | async def get(self, key: K, default: V | None = None) -> V | None: method set (line 971) | async def set(self, key: K, value: V) -> None: method inc (line 995) | async def inc(self, key: K, amount: V) -> V: method chmax (line 1024) | async def chmax(self, key: K, value: V) -> V: method pop (line 1053) | async def pop(self, key: K, default: V | None = None) -> V | None: method size (line 1070) | async def size(self) -> int: class MongoLightningCollections (line 1080) | class MongoLightningCollections(LightningCollections): method __init__ (line 1086) | def __init__( method collection_name (line 1203) | def collection_name(self) -> str: method extra_tracking_labels (line 1207) | def extra_tracking_labels(self) -> Mapping[str, str]: method with_session (line 1212) | def with_session(self, session: AsyncClientSession) -> Self: method rollouts (line 1230) | def rollouts(self) -> MongoBasedCollection[Rollout]: method attempts (line 1234) | def attempts(self) -> MongoBasedCollection[Attempt]: method spans (line 1238) | def spans(self) -> MongoBasedCollection[Span]: method resources (line 1242) | def resources(self) -> MongoBasedCollection[ResourcesUpdate]: method workers (line 1246) | def workers(self) -> MongoBasedCollection[Worker]: method rollout_queue (line 1250) | def rollout_queue(self) -> MongoBasedQueue[str]: method span_sequence_ids (line 1254) | def span_sequence_ids(self) -> MongoBasedKeyValue[str, int]: method _ensure_collections (line 1258) | async def _ensure_collections(self) -> None: method _lock_manager (line 1272) | async def _lock_manager(self, labels: Optional[Sequence[AtomicLabels]]): method atomic (line 1286) | async def atomic( method execute (line 1307) | async def execute( method with_transaction (line 1342) | async def with_transaction( FILE: agentlightning/store/collection_based.py function _with_collections_execute (line 97) | def _with_collections_execute(labels: Sequence[AtomicLabels]): function tracked (line 126) | def tracked(name: str): function healthcheck_before (line 180) | def healthcheck_before(func: T_callable) -> T_callable: function _generate_resources_id (line 211) | def _generate_resources_id() -> str: function _generate_rollout_id (line 215) | def _generate_rollout_id() -> str: function _generate_attempt_id (line 219) | def _generate_attempt_id() -> str: class CollectionBasedLightningStore (line 224) | class CollectionBasedLightningStore(LightningStore, Generic[T_collection... method __init__ (line 245) | def __init__( method statistics (line 291) | async def statistics(self) -> LightningStoreStatistics: method _get_latest_resources (line 305) | async def _get_latest_resources(self) -> Optional[ResourcesUpdate]: method _update_or_insert_worker (line 311) | async def _update_or_insert_worker(self, worker: Worker, update_fields... method _unlocked_sync_worker_with_attempt (line 318) | async def _unlocked_sync_worker_with_attempt( method capabilities (line 361) | def capabilities(self) -> LightningStoreCapabilities: method _sync_workers_with_attempts (line 369) | async def _sync_workers_with_attempts(self, attempts: Sequence[Attempt... method _dequeue_mark_worker_idle (line 379) | async def _dequeue_mark_worker_idle(self, worker_id: str) -> None: method start_rollout (line 395) | async def start_rollout( method _enqueue_many_rollouts (line 463) | async def _enqueue_many_rollouts(self, collections: T_collections, rol... method _prepare_single_rollout (line 470) | async def _prepare_single_rollout( method enqueue_rollout (line 501) | async def enqueue_rollout( method enqueue_many_rollouts (line 536) | async def enqueue_many_rollouts(self, rollouts: Sequence[EnqueueRollou... method _unlocked_query_rollouts_by_rollout_ids (line 563) | async def _unlocked_query_rollouts_by_rollout_ids( method _post_dequeue_rollouts (line 581) | async def _post_dequeue_rollouts( method dequeue_rollout (line 632) | async def dequeue_rollout(self, worker_id: Optional[str] = None) -> Op... method dequeue_many_rollouts (line 671) | async def dequeue_many_rollouts( method start_attempt (line 708) | async def start_attempt(self, rollout_id: str, worker_id: Optional[str... method query_rollouts (line 762) | async def query_rollouts( method _unlocked_query_attempts_for_rollout (line 826) | async def _unlocked_query_attempts_for_rollout(self, collections: T_co... method get_rollout_by_id (line 836) | async def get_rollout_by_id(self, rollout_id: str) -> Optional[Union[R... method _unlocked_rollout_to_attempted_rollout (line 852) | async def _unlocked_rollout_to_attempted_rollout( method _unlocked_many_rollouts_to_attempted_rollouts (line 866) | async def _unlocked_many_rollouts_to_attempted_rollouts( method _unlocked_get_latest_attempt (line 874) | async def _unlocked_get_latest_attempt(self, collections: T_collection... method query_attempts (line 883) | async def query_attempts( method get_latest_attempt (line 903) | async def get_latest_attempt(self, rollout_id: str) -> Optional[Attempt]: method query_resources (line 912) | async def query_resources( method add_resources (line 940) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 961) | async def update_resources( method get_resources_by_id (line 992) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 1001) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method _issue_many_span_sequence_ids (line 1009) | async def _issue_many_span_sequence_ids(self, rollout_ids: List[str]) ... method _sync_span_sequence_id (line 1035) | async def _sync_span_sequence_id(self, rollout_id: str, sequence_id: i... method get_next_span_sequence_id (line 1041) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method get_many_span_sequence_ids (line 1052) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... method add_span (line 1057) | async def add_span(self, span: Span) -> Optional[Span]: method add_many_spans (line 1068) | async def add_many_spans(self, spans: Sequence[Span]) -> Sequence[Span]: method add_otel_span (line 1087) | async def add_otel_span( method _insert_spans_with_fallback (line 1113) | async def _insert_spans_with_fallback(self, spans: Sequence[Span]) -> ... method _add_many_spans_helper (line 1150) | async def _add_many_spans_helper(self, rollout_id: str, attempt_id: st... method _post_add_spans (line 1182) | async def _post_add_spans(self, spans: Sequence[Span], rollout_id: str... method _on_attempt_heartbeat (line 1203) | async def _on_attempt_heartbeat( method wait_for_rollouts (line 1239) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method wait_for_rollout (line 1270) | async def wait_for_rollout(self, rollout_id: str, timeout: Optional[fl... method query_spans (line 1313) | async def query_spans( method update_rollout (line 1386) | async def update_rollout( method update_attempt (line 1417) | async def update_attempt( method _unlocked_update_rollout_only (line 1452) | async def _unlocked_update_rollout_only( method _post_update_rollout (line 1500) | async def _post_update_rollout( method _unlocked_update_attempt_and_rollout (line 1555) | async def _unlocked_update_attempt_and_rollout( method query_workers (line 1629) | async def query_workers( method get_worker_by_id (line 1657) | async def get_worker_by_id(self, worker_id: str) -> Optional[Worker]: method update_worker (line 1662) | async def update_worker( method _unlocked_get_running_rollouts (line 1676) | async def _unlocked_get_running_rollouts(self, collections: T_collecti... method _scan_for_unhealthy_rollouts (line 1696) | async def _scan_for_unhealthy_rollouts(self) -> None: method _should_scan_for_unhealthy_rollouts (line 1711) | async def _should_scan_for_unhealthy_rollouts(self) -> bool: method _find_and_update_unhealthy_rollouts (line 1731) | async def _find_and_update_unhealthy_rollouts( function get_current_store_methods (line 1767) | def get_current_store_methods() -> Tuple[str, str]: FILE: agentlightning/store/memory.py function estimate_model_size (line 42) | def estimate_model_size(obj: Any) -> int: function _detect_total_memory_bytes (line 57) | def _detect_total_memory_bytes() -> int: class InMemoryLightningStore (line 70) | class InMemoryLightningStore(CollectionBasedLightningStore[InMemoryLight... method __init__ (line 88) | def __init__( method capabilities (line 147) | def capabilities(self) -> LightningStoreCapabilities: method statistics (line 156) | async def statistics(self) -> LightningStoreStatistics: method wait_for_rollout (line 167) | async def wait_for_rollout(self, rollout_id: str, timeout: Optional[fl... method add_resources (line 207) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 214) | async def update_resources(self, resources_id: str, resources: NamedRe... method _post_update_rollout (line 221) | async def _post_update_rollout( method _unlocked_query_rollouts_by_rollout_ids (line 245) | async def _unlocked_query_rollouts_by_rollout_ids( method _unlocked_get_running_rollouts (line 256) | async def _unlocked_get_running_rollouts(self, collections: InMemoryLi... method query_spans (line 276) | async def query_spans( method _post_add_spans (line 287) | async def _post_add_spans(self, spans: Sequence[Span], rollout_id: str... method _get_latest_resources (line 299) | async def _get_latest_resources(self) -> Optional[ResourcesUpdate]: method _resolve_memory_threshold (line 310) | def _resolve_memory_threshold( method _account_span_size (line 340) | async def _account_span_size(self, span: Span) -> int: method _maybe_evict_spans (line 351) | async def _maybe_evict_spans(self, collections: InMemoryLightningColle... method _evict_spans_for_rollout (line 374) | async def _evict_spans_for_rollout(self, collections: InMemoryLightnin... FILE: agentlightning/store/mongo.py function _generate_partition_id (line 24) | def _generate_partition_id() -> str: class MongoLightningStore (line 28) | class MongoLightningStore(CollectionBasedLightningStore[MongoLightningCo... method __init__ (line 43) | def __init__( method capabilities (line 81) | def capabilities(self) -> LightningStoreCapabilities: method close (line 90) | async def close(self) -> None: method wait_for_rollouts (line 96) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method _unlocked_many_rollouts_to_attempted_rollouts (line 143) | async def _unlocked_many_rollouts_to_attempted_rollouts( FILE: agentlightning/store/threading.py class LightningStoreThreaded (line 29) | class LightningStoreThreaded(LightningStore): method __init__ (line 36) | def __init__(self, store: LightningStore) -> None: method capabilities (line 42) | def capabilities(self) -> LightningStoreCapabilities: method statistics (line 51) | async def statistics(self) -> LightningStoreStatistics: method start_rollout (line 56) | async def start_rollout( method enqueue_rollout (line 75) | async def enqueue_rollout( method enqueue_many_rollouts (line 86) | async def enqueue_many_rollouts(self, rollouts: Sequence[EnqueueRollou... method dequeue_rollout (line 90) | async def dequeue_rollout(self, worker_id: Optional[str] = None) -> Op... method dequeue_many_rollouts (line 94) | async def dequeue_many_rollouts( method start_attempt (line 103) | async def start_attempt(self, rollout_id: str, worker_id: Optional[str... method query_rollouts (line 107) | async def query_rollouts( method query_attempts (line 135) | async def query_attempts( method get_rollout_by_id (line 153) | async def get_rollout_by_id(self, rollout_id: str) -> Optional[Rollout]: method get_latest_attempt (line 157) | async def get_latest_attempt(self, rollout_id: str) -> Optional[Attempt]: method query_resources (line 161) | async def query_resources( method add_resources (line 181) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 185) | async def update_resources(self, resources_id: str, resources: NamedRe... method get_resources_by_id (line 189) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 193) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method add_many_spans (line 197) | async def add_many_spans(self, spans: Sequence[Span]) -> Sequence[Span]: method add_span (line 201) | async def add_span(self, span: Span) -> Optional[Span]: method add_otel_span (line 205) | async def add_otel_span( method wait_for_rollouts (line 215) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method get_next_span_sequence_id (line 219) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method get_many_span_sequence_ids (line 223) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... method query_spans (line 227) | async def query_spans( method update_rollout (line 265) | async def update_rollout( method update_attempt (line 286) | async def update_attempt( method query_workers (line 305) | async def query_workers( method get_worker_by_id (line 326) | async def get_worker_by_id(self, worker_id: str) -> Optional[Worker]: method update_worker (line 330) | async def update_worker( FILE: agentlightning/store/utils.py function rollout_status_from_attempt (line 60) | async def rollout_status_from_attempt( function scan_unhealthy_rollouts (line 87) | async def scan_unhealthy_rollouts( FILE: agentlightning/tracer/agentops.py class AgentOpsTracer (line 32) | class AgentOpsTracer(OtelTracer): method __init__ (line 52) | def __init__(self, *, agentops_managed: bool = True, instrument_manage... method instrument (line 64) | def instrument(self, worker_id: int): method uninstrument (line 67) | def uninstrument(self, worker_id: int): method _initialize_tracer_provider (line 70) | def _initialize_tracer_provider(self, worker_id: int): method teardown_worker (line 98) | def teardown_worker(self, worker_id: int) -> None: method trace_context (line 110) | async def trace_context( method _trace_context_sync (line 142) | def _trace_context_sync( method _agentops_trace_context (line 181) | def _agentops_trace_context(self, rollout_id: Optional[str], attempt_i... method get_langchain_handler (line 194) | def get_langchain_handler(self, tags: List[str] | None = None) -> Lang... method _get_tracer_provider (line 220) | def _get_tracer_provider(self) -> TracerProviderImpl: FILE: agentlightning/tracer/base.py class Tracer (line 27) | class Tracer(ParallelWorkerBase): method init_worker (line 64) | def init_worker(self, worker_id: int, store: Optional[LightningStore] ... method trace_context (line 74) | def trace_context( method _trace_context_sync (line 98) | def _trace_context_sync( method get_last_trace (line 108) | def get_last_trace(self) -> List[Span]: method trace_run (line 117) | def trace_run(self, func: Callable[..., Any], *args: Any, **kwargs: An... method create_span (line 134) | def create_span( method operation_context (line 156) | def operation_context( method trace_run_async (line 176) | async def trace_run_async(self, func: Callable[..., Awaitable[Any]], *... method get_langchain_handler (line 193) | def get_langchain_handler(self) -> Optional[BaseCallbackHandler]: # t... method lifespan (line 202) | def lifespan(self, store: Optional[LightningStore] = None): function set_active_tracer (line 229) | def set_active_tracer(tracer: Tracer): function clear_active_tracer (line 241) | def clear_active_tracer(): function get_active_tracer (line 247) | def get_active_tracer() -> Optional[Tracer]: class _ActiveTracerAsyncCM (line 257) | class _ActiveTracerAsyncCM(AsyncContextManager[T]): method __init__ (line 258) | def __init__(self, tracer: Tracer, inner: AsyncContextManager[T]): method __aenter__ (line 262) | async def __aenter__(self) -> T: method __aexit__ (line 270) | async def __aexit__(self, *args: Any, **kwargs: Any) -> Optional[bool]: function with_active_tracer_context (line 277) | def with_active_tracer_context( FILE: agentlightning/tracer/dummy.py class DummySpanRecordingContext (line 27) | class DummySpanRecordingContext(SpanRecordingContext): method __init__ (line 30) | def __init__(self, name: str, attributes: Optional[Attributes] = None,... method record_exception (line 37) | def record_exception(self, exception: BaseException) -> None: method record_attributes (line 41) | def record_attributes(self, attributes: Attributes) -> None: method record_status (line 44) | def record_status(self, status_code: StatusCode, description: Optional... method finalize (line 47) | def finalize(self, end_time: Optional[float] = None) -> None: method get_recorded_span (line 50) | def get_recorded_span(self) -> SpanCoreFields: class DummyTracer (line 62) | class DummyTracer(Tracer): method create_span (line 68) | def create_span( method operation_context (line 90) | def operation_context( FILE: agentlightning/tracer/otel.py function to_otel_status_code (line 33) | def to_otel_status_code(status_code: StatusCode) -> trace_api.StatusCode: class OtelSpanRecordingContext (line 42) | class OtelSpanRecordingContext(SpanRecordingContext): method __init__ (line 43) | def __init__(self, span: trace_api.Span) -> None: method record_exception (line 46) | def record_exception(self, exception: BaseException) -> None: method record_attributes (line 50) | def record_attributes(self, attributes: Attributes) -> None: method record_status (line 53) | def record_status(self, status_code: StatusCode, description: Optional... method get_otel_span (line 57) | def get_otel_span(self) -> trace_api.Span: method get_recorded_span (line 60) | def get_recorded_span(self) -> SpanCoreFields: class OtelTracer (line 73) | class OtelTracer(Tracer): method __init__ (line 80) | def __init__(self): method init_worker (line 89) | def init_worker(self, worker_id: int, store: Optional[LightningStore] ... method _initialize_tracer_provider (line 93) | def _initialize_tracer_provider(self, worker_id: int): method teardown_worker (line 119) | def teardown_worker(self, worker_id: int): method trace_context (line 125) | async def trace_context( method create_span (line 175) | def create_span( method operation_context (line 206) | def operation_context( method get_last_trace (line 232) | def get_last_trace(self) -> List[Span]: method _get_tracer_provider (line 243) | def _get_tracer_provider(self) -> TracerProviderImpl: method _enable_native_otlp_exporter (line 250) | def _enable_native_otlp_exporter(self, store: LightningStore, rollout_... method _disable_native_otlp_exporter (line 290) | def _disable_native_otlp_exporter(self): class LightningSpanProcessor (line 308) | class LightningSpanProcessor(SpanProcessor): method __init__ (line 318) | def __init__(self, disable_store_submission: bool = False): method __repr__ (line 335) | def __repr__(self) -> str: method store (line 345) | def store(self) -> Optional[LightningStore]: method rollout_id (line 350) | def rollout_id(self) -> Optional[str]: method attempt_id (line 355) | def attempt_id(self) -> Optional[str]: method disable_store_submission (line 360) | def disable_store_submission(self) -> bool: method disable_store_submission (line 365) | def disable_store_submission(self, value: bool) -> None: method _ensure_loop (line 368) | def _ensure_loop(self) -> None: method _loop_runner (line 383) | def _loop_runner(self): method __enter__ (line 391) | def __enter__(self): method __exit__ (line 396) | def __exit__(self, exc_type: Any, exc_val: Any, exc_tb: Any): method _await_in_loop (line 401) | def _await_in_loop(self, coro: Awaitable[Any], timeout: Optional[float... method shutdown (line 435) | def shutdown(self) -> None: method force_flush (line 442) | def force_flush(self, timeout_millis: int = 30000) -> bool: method spans (line 445) | def spans(self) -> List[Span]: method with_context (line 455) | def with_context(self, store: LightningStore, rollout_id: str, attempt... method on_end (line 472) | def on_end(self, span: ReadableSpan) -> None: FILE: agentlightning/tracer/weave.py function op_name_to_func_name (line 58) | def op_name_to_func_name(op_name: str) -> str: function random_project_name (line 70) | def random_project_name() -> str: function get_timestamp_or_throw (line 74) | def get_timestamp_or_throw(date: Optional[datetime], field_name: str) ->... class WeaveSpanRecordingContext (line 80) | class WeaveSpanRecordingContext(SpanRecordingContext): method __init__ (line 83) | def __init__(self, call: Call) -> None: method record_exception (line 86) | def record_exception(self, exception: BaseException) -> None: method _get_input_from_attributes (line 91) | def _get_input_from_attributes(self, attributes: Attributes) -> Dict[s... method _get_output_from_attributes (line 104) | def _get_output_from_attributes(self, attributes: Attributes) -> Any: method record_attributes (line 110) | def record_attributes(self, attributes: Attributes) -> None: method record_status (line 139) | def record_status(self, status_code: StatusCode, description: Optional... method finalize (line 148) | def finalize(self) -> None: method get_recorded_span (line 152) | def get_recorded_span(self) -> SpanCoreFields: class WeaveTracerManagedTraceServer (line 164) | class WeaveTracerManagedTraceServer(InMemoryWeaveTraceServer): method __init__ (line 167) | def __init__( method trigger_callbacks (line 177) | def trigger_callbacks(self, call_id: str) -> None: method call_start (line 190) | def call_start(self, req: tsi.CallStartReq) -> tsi.CallStartRes: method call_end (line 199) | def call_end(self, req: tsi.CallEndReq) -> tsi.CallEndRes: method clear (line 208) | def clear(self) -> None: class WeaveTracer (line 212) | class WeaveTracer(Tracer): method __init__ (line 224) | def __init__( method instrument (line 257) | def instrument(self, worker_id: int): method uninstrument (line 260) | def uninstrument(self, worker_id: int): method init_worker (line 263) | def init_worker(self, worker_id: int, store: Optional[LightningStore] ... method teardown_worker (line 304) | def teardown_worker(self, worker_id: int): method trace_context (line 319) | async def trace_context( method create_span (line 393) | def create_span( method operation_context (line 427) | def operation_context( method _init_trace_context (line 453) | async def _init_trace_context(self) -> None: method _get_weave_client (line 461) | def _get_weave_client(self) -> WeaveClient: method _ensure_loop (line 468) | def _ensure_loop(self) -> tuple[asyncio.AbstractEventLoop, bool]: method get_last_trace (line 492) | def get_last_trace(self) -> List[Span]: method partial_call_callback (line 495) | def partial_call_callback(self, request_content: Dict[str, Any]) -> None: method complete_call_callback (line 516) | def complete_call_callback(self, call: tsi.CallSchema) -> None: method _get_next_sequence_id (line 528) | async def _get_next_sequence_id(self) -> int: method partial_call_handler (line 539) | async def partial_call_handler(self, request_content: Dict[str, Any]) ... method complete_call_handler (line 551) | async def complete_call_handler(self, call: tsi.CallSchema) -> None: method convert_call_to_span (line 580) | async def convert_call_to_span( FILE: agentlightning/trainer/init_utils.py function load_class (line 15) | def load_class(path: str) -> type[Any]: function instantiate_component (line 22) | def instantiate_component( function instantiate_from_spec (line 38) | def instantiate_from_spec( function _ensure_expected_type (line 73) | def _ensure_expected_type( function build_component (line 88) | def build_component( function build_component (line 105) | def build_component( function build_component (line 122) | def build_component( function build_component (line 138) | def build_component( FILE: agentlightning/trainer/legacy.py class TrainerLegacy (line 24) | class TrainerLegacy(ParallelWorkerBase): method __init__ (line 27) | def __init__(self, *args: Any, **kwargs: Any): method _extract_client_from_data (line 41) | def _extract_client_from_data( method _extract_dataset_from_data (line 53) | def _extract_dataset_from_data( method _determine_backend (line 61) | def _determine_backend( method init (line 91) | def init(self, backend: Union[str, AgentLightningClient]) -> None: method teardown (line 100) | def teardown(self) -> None: method client (line 107) | def client(self) -> AgentLightningClient: method _init_client (line 113) | def _init_client(self, backend: Union[str, AgentLightningClient]) -> A... method _worker_main_loop (line 130) | def _worker_main_loop(self, agent: LitAgent[Any], worker_id: int, is_a... method _initialize_worker_env (line 185) | def _initialize_worker_env(self, worker_id: int): method _teardown_worker_env (line 189) | def _teardown_worker_env(self, worker_id: int): method kill_orphaned_processes (line 195) | def kill_orphaned_processes() -> None: method _terminate_processes (line 207) | def _terminate_processes(self, processes: List[multiprocessing.Process... method fit_v0 (line 225) | def fit_v0( FILE: agentlightning/trainer/trainer.py class Trainer (line 36) | class Trainer(TrainerLegacy): method __init__ (line 120) | def __init__( method _make_tracer (line 252) | def _make_tracer(self, tracer: ComponentSpec[Tracer]) -> Tracer: method _make_algorithm (line 269) | def _make_algorithm(self, algorithm: ComponentSpec[Algorithm]) -> Opti... method _make_adapter (line 280) | def _make_adapter(self, adapter: ComponentSpec[TraceAdapter[Any]]) -> ... method _make_store (line 293) | def _make_store(self, store: ComponentSpec[LightningStore], strategy: ... method _make_strategy (line 310) | def _make_strategy( method _make_llm_proxy (line 342) | def _make_llm_proxy( method _make_runner (line 367) | def _make_runner(self, runner: ComponentSpec[Runner[Any]]) -> Runner[A... method _normalize_hooks (line 386) | def _normalize_hooks(self, hooks: Optional[Union[Hook, Sequence[Hook]]... method fit (line 394) | def fit( method dev (line 440) | def dev( method _algorithm_bundle (line 487) | async def _algorithm_bundle( method _runner_bundle (line 535) | async def _runner_bundle( FILE: agentlightning/types/core.py class Triplet (line 69) | class Triplet(BaseModel): class RolloutLegacy (line 78) | class RolloutLegacy(BaseModel): class Attempt (line 136) | class Attempt(BaseModel): class RolloutConfig (line 161) | class RolloutConfig(BaseModel): class Rollout (line 174) | class Rollout(BaseModel): class AttemptedRollout (line 202) | class AttemptedRollout(Rollout): method check_consistency (line 209) | def check_consistency(self) -> AttemptedRollout: class EnqueueRolloutRequest (line 215) | class EnqueueRolloutRequest(BaseModel): class Worker (line 236) | class Worker(BaseModel): class Task (line 263) | class Task(BaseModel): class TaskIfAny (line 286) | class TaskIfAny(BaseModel): class GenericResponse (line 318) | class GenericResponse(BaseModel): class ParallelWorkerBase (line 336) | class ParallelWorkerBase: method __init__ (line 351) | def __init__(self) -> None: method init (line 355) | def init(self, *args: Any, **kwargs: Any) -> None: method init_worker (line 359) | def init_worker(self, worker_id: int, *args: Any, **kwargs: Any) -> None: method run (line 363) | def run(self, *args: Any, **kwargs: Any) -> Any: method teardown_worker (line 367) | def teardown_worker(self, worker_id: int, *args: Any, **kwargs: Any) -... method teardown (line 371) | def teardown(self, *args: Any, **kwargs: Any) -> None: class Dataset (line 376) | class Dataset(Protocol, Generic[T_co]): method __getitem__ (line 383) | def __getitem__(self, index: SupportsIndex, /) -> T_co: ... method __len__ (line 385) | def __len__(self) -> int: ... class Hook (line 388) | class Hook(ParallelWorkerBase): method on_trace_start (line 391) | async def on_trace_start( method on_trace_end (line 406) | async def on_trace_end( method on_rollout_start (line 421) | async def on_rollout_start(self, *, agent: LitAgent[Any], runner: Runn... method on_rollout_end (line 434) | async def on_rollout_end( class FilterField (line 455) | class FilterField(TypedDict, total=False): class SortOptions (line 504) | class SortOptions(TypedDict): class PaginatedResult (line 516) | class PaginatedResult(BaseModel, Sequence[T_item]): method __len__ (line 531) | def __len__(self) -> int: method __getitem__ (line 535) | def __getitem__(self, index: int) -> T_item: ... method __getitem__ (line 538) | def __getitem__(self, index: slice) -> Sequence[T_item]: ... method __getitem__ (line 540) | def __getitem__(self, index: Union[int, slice]) -> Union[T_item, Seque... method __iter__ (line 546) | def __iter__(self) -> Iterator[T_item]: # type: ignore method __repr__ (line 549) | def __repr__(self) -> str: FILE: agentlightning/types/resources.py class Resource (line 36) | class Resource(BaseModel): class LLM (line 43) | class LLM(Resource): method get_base_url (line 56) | def get_base_url(self, *args: Any, **kwargs: Any) -> str: class ProxyLLM (line 65) | class ProxyLLM(LLM): method model_post_init (line 75) | def model_post_init(self, __context: Any) -> None: method __getattribute__ (line 80) | def __getattribute__(self, name: str) -> Any: method with_attempted_rollout (line 101) | def with_attempted_rollout(self, rollout: AttemptedRollout) -> LLM: method get_base_url (line 110) | def get_base_url(self, rollout_id: Optional[str], attempt_id: Optional... class PromptTemplate (line 146) | class PromptTemplate(Resource): method format (line 155) | def format(self, **kwargs: Any) -> str: class ResourcesUpdate (line 192) | class ResourcesUpdate(BaseModel): FILE: agentlightning/types/tracer.py function convert_timestamp (line 42) | def convert_timestamp(timestamp: Optional[int]) -> Optional[float]: function extract_extra_fields (line 56) | def extract_extra_fields(src: Any, excluded_fields: List[str]) -> Dict[s... class SpanContext (line 95) | class SpanContext(BaseModel): method from_opentelemetry (line 110) | def from_opentelemetry(cls, src: trace_api.SpanContext) -> "SpanContext": class TraceStatus (line 122) | class TraceStatus(BaseModel): method from_opentelemetry (line 133) | def from_opentelemetry(cls, src: OtelStatus) -> "TraceStatus": class Event (line 143) | class Event(BaseModel): method from_opentelemetry (line 156) | def from_opentelemetry(cls, src: OtelEvent) -> "Event": class Link (line 167) | class Link(BaseModel): method from_opentelemetry (line 178) | def from_opentelemetry(cls, src: trace_api.Link) -> "Link": class OtelResource (line 188) | class OtelResource(BaseModel): method from_opentelemetry (line 203) | def from_opentelemetry(cls, src: Resource) -> "OtelResource": class SpanCoreFields (line 213) | class SpanCoreFields(BaseModel): class SpanRecordingContext (line 231) | class SpanRecordingContext(Protocol): method record_exception (line 234) | def record_exception(self, exception: BaseException) -> None: method record_attributes (line 238) | def record_attributes(self, attributes: Attributes) -> None: method record_status (line 242) | def record_status(self, status_code: StatusCode, description: Optional... method get_recorded_span (line 246) | def get_recorded_span(self) -> SpanCoreFields: class Span (line 251) | class Span(BaseModel): method from_opentelemetry (line 309) | def from_opentelemetry( method from_attributes (line 374) | def from_attributes( method from_core_fields (line 450) | def from_core_fields( class SpanNames (line 481) | class SpanNames(str, Enum): class SpanAttributeNames (line 502) | class SpanAttributeNames(str, Enum): FILE: agentlightning/utils/id.py function generate_id (line 9) | def generate_id(length: int) -> str: FILE: agentlightning/utils/metrics.py function _validate_labels (line 35) | def _validate_labels( function _normalize_label_names (line 65) | def _normalize_label_names(label_names: Optional[Sequence[str]]) -> Tupl... function _normalize_prometheus_metric_name (line 79) | def _normalize_prometheus_metric_name(metric_name: str) -> str: class _CounterDef (line 86) | class _CounterDef: class _HistogramDef (line 95) | class _HistogramDef: class _CounterState (line 105) | class _CounterState: class _HistogramState (line 113) | class _HistogramState: class MetricsBackend (line 120) | class MetricsBackend: method has_prometheus (line 123) | def has_prometheus(self) -> bool: method register_counter (line 127) | def register_counter( method register_histogram (line 149) | def register_histogram( method inc_counter (line 174) | async def inc_counter( method observe_histogram (line 193) | async def observe_histogram( class ConsoleMetricsBackend (line 213) | class ConsoleMetricsBackend(MetricsBackend): method __init__ (line 248) | def __init__( method register_counter (line 284) | def register_counter( method register_histogram (line 311) | def register_histogram( method inc_counter (line 350) | async def inc_counter( method observe_histogram (line 392) | async def observe_histogram( method _prune_events (line 435) | def _prune_events( method _should_log_locked (line 462) | def _should_log_locked(self, now: float) -> bool: method _snapshot_locked (line 480) | def _snapshot_locked( method _truncate_labels_for_logging (line 533) | def _truncate_labels_for_logging(self, labels: LabelDict, group_level:... method _log (line 550) | def _log(self, message: str) -> None: method _log_snapshot (line 554) | def _log_snapshot( method _effective_group_level (line 581) | def _effective_group_level(self, metric_name: str, *, is_histogram: bo... method _group_counter_snapshots (line 593) | def _group_counter_snapshots( method _group_histogram_snapshots (line 629) | def _group_histogram_snapshots( method _log_counter (line 662) | def _log_counter( method _log_histogram (line 685) | def _log_histogram( function _format_label_string (line 720) | def _format_label_string(labels: LabelDict) -> str: function _format_duration (line 727) | def _format_duration(value: float) -> str: class PrometheusMetricsBackend (line 738) | class PrometheusMetricsBackend(MetricsBackend): method __init__ (line 751) | def __init__(self) -> None: method has_prometheus (line 770) | def has_prometheus(self) -> bool: method register_counter (line 774) | def register_counter( method register_histogram (line 806) | def register_histogram( method inc_counter (line 856) | async def inc_counter( method observe_histogram (line 875) | async def observe_histogram( method _register_prometheus_metric_name (line 894) | def _register_prometheus_metric_name(self, name: str) -> str: class MultiMetricsBackend (line 908) | class MultiMetricsBackend(MetricsBackend): method __init__ (line 911) | def __init__(self, backends: Sequence[MetricsBackend]) -> None: method has_prometheus (line 924) | def has_prometheus(self) -> bool: method register_counter (line 928) | def register_counter( method register_histogram (line 938) | def register_histogram( method inc_counter (line 954) | async def inc_counter( method observe_histogram (line 964) | async def observe_histogram( function setup_multiprocess_prometheus (line 979) | def setup_multiprocess_prometheus(): function get_prometheus_registry (line 997) | def get_prometheus_registry() -> CollectorRegistry: function shutdown_metrics (line 1010) | def shutdown_metrics(server: Any = None, worker: Any = None, *args: Any,... FILE: agentlightning/utils/otel.py function full_qualified_name (line 52) | def full_qualified_name(obj: type) -> str: function get_tracer_provider (line 58) | def get_tracer_provider(inspect: bool = True) -> TracerProviderImpl: function get_span_processors (line 126) | def get_span_processors( function get_tracer (line 145) | def get_tracer(use_active_span_processor: bool = True) -> trace_api.Tracer: function make_tag_attributes (line 190) | def make_tag_attributes(tags: List[str]) -> Dict[str, Any]: function extract_tags_from_attributes (line 202) | def extract_tags_from_attributes(attributes: Dict[str, Any]) -> List[str]: function make_link_attributes (line 212) | def make_link_attributes(links: Dict[str, str]) -> Dict[str, Any]: function query_linked_spans (line 232) | def query_linked_spans(spans: Sequence[T_SpanLike], links: List[LinkPyda... function extract_links_from_attributes (line 280) | def extract_links_from_attributes(attributes: Dict[str, Any]) -> List[Li... function filter_attributes (line 290) | def filter_attributes(attributes: Dict[str, Any], prefix: str) -> Dict[s... function filter_and_unflatten_attributes (line 305) | def filter_and_unflatten_attributes(attributes: Dict[str, Any], prefix: ... function flatten_attributes (line 327) | def flatten_attributes( function unflatten_attributes (line 397) | def unflatten_attributes(flat_data: Dict[str, Any]) -> Union[Dict[str, A... function sanitize_attribute_value (line 462) | def sanitize_attribute_value(object: Any, force: bool = True) -> Attribu... function sanitize_attributes (line 481) | def sanitize_attributes(attributes: Dict[str, Any], force: bool = True) ... function sanitize_list_attribute_sanity (line 497) | def sanitize_list_attribute_sanity(maybe_list: List[Any]) -> AttributeVa... function check_attributes_sanity (line 515) | def check_attributes_sanity(attributes: Dict[Any, Any]) -> None: function format_exception_attributes (line 531) | def format_exception_attributes(exception: BaseException) -> Attributes: FILE: agentlightning/utils/otlp.py function handle_otlp_export (line 56) | async def handle_otlp_export( function spans_from_proto (line 113) | async def spans_from_proto( class LightningStoreOTLPExporter (line 229) | class LightningStoreOTLPExporter(OTLPSpanExporter): method __repr__ (line 246) | def __repr__(self) -> str: method endpoint (line 256) | def endpoint(self) -> Optional[str]: method rollout_id (line 263) | def rollout_id(self) -> Optional[str]: method attempt_id (line 270) | def attempt_id(self) -> Optional[str]: method enable_store_otlp (line 276) | def enable_store_otlp(self, endpoint: str, rollout_id: str, attempt_id... method disable_store_otlp (line 284) | def disable_store_otlp(self) -> None: method should_bypass (line 291) | def should_bypass(self) -> bool: method export (line 295) | def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult: function _read_body_maybe_gzip (line 318) | def _read_body_maybe_gzip(request: Request, raw_body: bytes) -> bytes: function _maybe_gzip_response (line 328) | def _maybe_gzip_response(request: Request, payload: bytes) -> Tuple[byte... function _bad_request_response (line 341) | def _bad_request_response(request: Request, message: str, content_type: ... function _normalize_rollout_attempt_id (line 364) | def _normalize_rollout_attempt_id( function _normalize_sequence_id (line 373) | def _normalize_sequence_id(sequence_id: Optional[AttributeValue]) -> Opt... function _any_value_to_python (line 388) | def _any_value_to_python(value: AnyValue) -> Any: function _kv_list_to_dict (line 412) | def _kv_list_to_dict(kvs: Sequence[KeyValue]) -> Attributes: function _bytes_to_trace_id_hex (line 424) | def _bytes_to_trace_id_hex(b: bytes) -> str: function _bytes_to_span_id_hex (line 431) | def _bytes_to_span_id_hex(b: bytes) -> str: function _events_from_proto (line 438) | def _events_from_proto(span: ProtoSpan) -> List[Event]: function _links_from_proto (line 450) | def _links_from_proto(span: ProtoSpan) -> List[Link]: function _resource_from_proto (line 471) | def _resource_from_proto(resource: ProtoResource, schema_url: str = "") ... FILE: agentlightning/utils/server_launcher.py class PythonServerLauncherArgs (line 37) | class PythonServerLauncherArgs: class ChildEvent (line 74) | class ChildEvent: class GunicornApp (line 90) | class GunicornApp(BaseApplication): method __init__ (line 98) | def __init__(self, app: FastAPI, options: Dict[str, Any]): method load_config (line 103) | def load_config(self): method load (line 110) | def load(self): function shutdown_uvicorn_server (line 114) | async def shutdown_uvicorn_server(server: uvicorn.Server, task: asyncio.... function noop_context (line 133) | async def noop_context() -> AsyncIterator[None]: function run_uvicorn_asyncio (line 138) | async def run_uvicorn_asyncio( function run_uvicorn_thread (line 239) | def run_uvicorn_thread( function run_uvicorn_subprocess (line 318) | def run_uvicorn_subprocess( function run_gunicorn (line 402) | def run_gunicorn( function _get_default_ipv4_address (line 576) | def _get_default_ipv4_address() -> str: class PythonServerLauncher (line 597) | class PythonServerLauncher: method __init__ (line 608) | def __init__( method initialize (line 620) | def initialize(self): method __getstate__ (line 643) | def __getstate__(self): method __setstate__ (line 654) | def __setstate__(self, state: Dict[str, Any]): method endpoint (line 664) | def endpoint(self) -> str: method access_endpoint (line 669) | def access_endpoint(self) -> str: method health_url (line 674) | def health_url(self) -> Optional[str]: method start (line 683) | async def start(self): method stop (line 697) | async def stop(self): method reload (line 711) | async def reload(self): method run_forever (line 717) | async def run_forever(self): method is_running (line 757) | def is_running(self) -> bool: method _normalize_app_ref (line 762) | def _normalize_app_ref(app: FastAPI) -> str: method _ensure_host (line 768) | def _ensure_host(self) -> str: method _ensure_port (line 774) | def _ensure_port(self) -> int: method _ensure_access_host (line 780) | def _ensure_access_host(self) -> str: method _create_uvicorn_server (line 794) | def _create_uvicorn_server(self) -> uvicorn.Server: method _ctx (line 806) | def _ctx(self) -> AsyncContextManager[Any]: method _start_uvicorn_asyncio (line 815) | async def _start_uvicorn_asyncio(self): method _stop_uvicorn_asyncio (line 833) | async def _stop_uvicorn_asyncio(self): method _start_uvicorn_thread (line 845) | async def _start_uvicorn_thread(self): method _stop_uvicorn_thread (line 891) | async def _stop_uvicorn_thread(self): method _start_serving_process (line 911) | async def _start_serving_process(self): method _stop_serving_process (line 1009) | async def _stop_serving_process(self): FILE: agentlightning/utils/system_snapshot.py function system_snapshot (line 15) | def system_snapshot(include_gpu: bool = False) -> Dict[str, Any]: FILE: agentlightning/verl/async_server.py function _unwrap_ray_remote (line 16) | def _unwrap_ray_remote(cls): class PatchedvLLMServer (line 23) | class PatchedvLLMServer(_unwrap_ray_remote(AsyncvLLMServer)): method __init__ (line 25) | def __init__(self, *args, **kwargs): method chat_completion (line 32) | async def chat_completion(self, raw_request: Request): FILE: agentlightning/verl/daemon.py function ids_startswith (line 35) | def ids_startswith( function log_mismatch_detail (line 75) | def log_mismatch_detail( function get_left_padded_ids_and_attention_mask (line 114) | def get_left_padded_ids_and_attention_mask( function get_right_padded_ids_and_attention_mask (line 145) | def get_right_padded_ids_and_attention_mask( function _find_available_port (line 176) | def _find_available_port() -> int: function _to_native (line 182) | def _to_native(obj: Any) -> Any: class AgentModeDaemon (line 204) | class AgentModeDaemon: method __init__ (line 213) | def __init__( method _internal_loop_runner (line 286) | def _internal_loop_runner(self): method _is_mrope_model (line 296) | def _is_mrope_model(self) -> bool: method _resolve_image_path (line 303) | def _resolve_image_path(self, path: str) -> str: method _get_image_grid_thw (line 313) | def _get_image_grid_thw(self, image_urls: List[str]) -> Optional[torch... method _compute_mrope_position_ids (line 338) | def _compute_mrope_position_ids( method _start_proxy_server_v0 (line 363) | def _start_proxy_server_v0(self): method _update_proxy_server_v1 (line 453) | async def _update_proxy_server_v1(self): method start (line 474) | def start(self): method _async_set_up (line 500) | async def _async_set_up(self, data: Dict[str, Any], server_addresses: ... method set_up_data_and_server (line 590) | def set_up_data_and_server(self, data: Dict[str, Any], server_addresse... method _validate_data (line 610) | def _validate_data(self, rollout: RolloutLegacy): method _validate_data_v1 (line 624) | async def _validate_data_v1(self, rollout: Rollout) -> RolloutLegacy: method _async_run_until_finished (line 673) | async def _async_run_until_finished(self, verbose: bool = True): method run_until_all_finished (line 700) | def run_until_all_finished(self, verbose: bool = True): method get_test_metrics (line 722) | def get_test_metrics(self): method get_train_data_batch (line 807) | def get_train_data_batch( method clear_data_and_server (line 1136) | def clear_data_and_server(self): method _fillna_reward (line 1146) | def _fillna_reward(self, rollout: RolloutLegacy): FILE: agentlightning/verl/dataset.py class AgentDataset (line 18) | class AgentDataset(RLHFDataset): method __init__ (line 20) | def __init__(self, *args, **kwargs): method __getitem__ (line 25) | def __getitem__(self, item): class LoadedDataset (line 36) | class LoadedDataset(AgentDataset): method __init__ (line 38) | def __init__(self, dataset: Dataset): method _read_files_and_tokenize (line 43) | def _read_files_and_tokenize(self): FILE: agentlightning/verl/entrypoint.py function main (line 36) | def main(config: Any): function run_ppo (line 52) | def run_ppo( class TaskRunner (line 93) | class TaskRunner: method run (line 94) | def run( FILE: agentlightning/verl/trainer.py function _timer (line 49) | def _timer(name: str, timing_raw: Dict[str, float]): function compute_data_metrics (line 65) | def compute_data_metrics(batch: DataProto, use_critic: bool = True, suff... class AgentLightningTrainer (line 159) | class AgentLightningTrainer(RayPPOTrainer): method __init__ (line 176) | def __init__( method _validate (line 190) | def _validate(self): method _compute_reference_log_prob (line 208) | def _compute_reference_log_prob(self, batch: DataProto) -> DataProto: method _train_step (line 239) | def _train_step(self, batch_dict: dict) -> dict: method fit (line 438) | def fit(self): FILE: contrib/agentlightning/contrib/adapter/agentos.py class FlightRecorderAdapter (line 19) | class FlightRecorderAdapter: method __init__ (line 33) | def __init__( method _convert_entry (line 50) | def _convert_entry(self, entry: Any, index: int) -> Dict[str, Any]: method get_spans (line 84) | def get_spans(self) -> List[Dict[str, Any]]: method import_to_store (line 94) | def import_to_store(self, store: Any) -> int: method get_violation_summary (line 119) | def get_violation_summary(self) -> Dict[str, Any]: FILE: contrib/agentlightning/contrib/adapter/triplet_group.py class TracerTraceToTripletGroup (line 11) | class TracerTraceToTripletGroup(TracerTraceToTriplet): method __init__ (line 26) | def __init__(self, *args, **kwargs): method _extract_span_groups (line 29) | def _extract_span_groups(self, spans): method adapt_group (line 89) | def adapt_group(self, source: Sequence[Span], /) -> List[Triplet]: FILE: contrib/agentlightning/contrib/agent/env_agent.py class EnvAgent (line 23) | class EnvAgent(LitAgent): method __init__ (line 24) | def __init__(self, config, trained_agents: str | None = None) -> None: method _build_agent (line 29) | def _build_agent(self, llm: LLM, temperature: float): method _get_instructed_prompt (line 49) | def _get_instructed_prompt(self, prompt, sep="\n\n"): method rollout_async (line 68) | async def rollout_async( FILE: contrib/agentlightning/contrib/algorithm/env_verl/daemon.py function get_left_padded_ids_and_attention_mask (line 36) | def get_left_padded_ids_and_attention_mask( function get_right_padded_ids_and_attention_mask (line 67) | def get_right_padded_ids_and_attention_mask( function _find_available_port (line 98) | def _find_available_port() -> int: function _to_native (line 104) | def _to_native(obj: Any) -> Any: class EnvAgentModeDaemon (line 126) | class EnvAgentModeDaemon: method __init__ (line 135) | def __init__( method _internal_loop_runner (line 202) | def _internal_loop_runner(self): method _start_proxy_server_v0 (line 210) | def _start_proxy_server_v0(self): method _update_proxy_server_v1 (line 300) | async def _update_proxy_server_v1(self): method start (line 321) | def start(self): method _async_set_up (line 347) | async def _async_set_up(self, data: Dict[str, Any], server_addresses: ... method set_up_data_and_server (line 437) | def set_up_data_and_server(self, data: Dict[str, Any], server_addresse... method _validate_data (line 457) | def _validate_data(self, rollout: RolloutLegacy): method _validate_data_v1 (line 471) | async def _validate_data_v1(self, rollout: Rollout) -> RolloutLegacy: method _async_run_until_finished (line 522) | async def _async_run_until_finished(self, verbose: bool = True): method run_until_all_finished (line 549) | def run_until_all_finished(self, verbose: bool = True): method get_test_metrics (line 571) | def get_test_metrics(self): method get_train_data_batch (line 656) | def get_train_data_batch( method clear_data_and_server (line 854) | def clear_data_and_server(self): method _fillna_reward (line 864) | def _fillna_reward(self, rollout: RolloutLegacy): FILE: contrib/agentlightning/contrib/algorithm/env_verl/trainer.py function _timer (line 49) | def _timer(name: str, timing_raw: Dict[str, float]): function compute_data_metrics (line 65) | def compute_data_metrics(batch: DataProto, use_critic: bool = True, suff... class EnvAgentLightningTrainer (line 159) | class EnvAgentLightningTrainer(RayPPOTrainer): method __init__ (line 176) | def __init__( method _validate (line 190) | def _validate(self): method _compute_reference_log_prob (line 208) | def _compute_reference_log_prob(self, batch: DataProto) -> DataProto: method _train_step (line 239) | def _train_step(self, batch_dict: dict) -> dict: method fit (line 435) | def fit(self): FILE: contrib/agentlightning/contrib/reward/agentos.py class PolicyReward (line 18) | class PolicyReward: method __init__ (line 31) | def __init__( method _default_reward (line 67) | def _default_reward(self, rollout: Any) -> float: method __call__ (line 71) | def __call__(self, rollout: Any, *, emit: bool = True) -> float: method _emit_reward (line 99) | def _emit_reward( method get_stats (line 121) | def get_stats(self) -> Dict[str, float]: FILE: contrib/agentlightning/contrib/runner/agentos.py class PolicyViolation (line 23) | class PolicyViolation: method penalty (line 33) | def penalty(self) -> float: class GovernedRollout (line 50) | class GovernedRollout: method total_penalty (line 65) | def total_penalty(self) -> float: class AgentOSRunner (line 69) | class AgentOSRunner(Generic[T_task]): method __init__ (line 87) | def __init__( method _setup_hooks (line 116) | def _setup_hooks(self) -> None: method _handle_violation (line 139) | def _handle_violation( method _emit_violation_span (line 162) | def _emit_violation_span(self, violation: PolicyViolation) -> None: method agent (line 182) | def agent(self) -> Any: method agent (line 194) | def agent(self, value: Any) -> None: method init (line 198) | def init(self, agent: Any, **kwargs: Any) -> None: method init_worker (line 202) | def init_worker(self, worker_id: int, store: Any, **kwargs: Any) -> None: method teardown (line 207) | def teardown(self) -> None: method teardown_worker (line 211) | def teardown_worker(self, worker_id: int) -> None: method step (line 215) | async def step( method get_stats (line 268) | def get_stats(self) -> dict: class PolicyViolationError (line 277) | class PolicyViolationError(Exception): method __init__ (line 280) | def __init__(self, violation: PolicyViolation): FILE: contrib/recipes/agentos/demo_governed_training.py function build_kernel (line 31) | def build_kernel(): function build_runner (line 51) | def build_runner(kernel): function build_reward (line 68) | def build_reward(kernel, base_reward_fn=None): function accuracy_reward (line 89) | def accuracy_reward(completions: list[str], references: list[str]) -> li... function demo_violation_detection (line 94) | def demo_violation_detection(kernel): function demo_training_loop (line 119) | def demo_training_loop(runner, reward_fn): function demo_audit_trail (line 142) | def demo_audit_trail(kernel): function main (line 159) | def main(): class _StubKernel (line 187) | class _StubKernel: method check_action (line 190) | def check_action(self, action_type, params): FILE: contrib/recipes/envs/add_instruction.py function _get_instruction (line 24) | def _get_instruction(type: str, env_name: str = None): function add_chat_instruction (line 45) | def add_chat_instruction(prompt, type: str, sep: str = "\n\n", env_name:... function add_single_instruction (line 70) | def add_single_instruction(prompt, type: str, sep: str = "\n\n", env_nam... FILE: contrib/recipes/envs/prompt_builder.py class HistoryPromptBuilder (line 8) | class HistoryPromptBuilder: method __init__ (line 17) | def __init__(self, max_history: int = -1, prompt_type: str = "chat"): method update_step_count (line 32) | def update_step_count(self): method update_instruction_prompt (line 36) | def update_instruction_prompt(self, instruction: str): method update_single_obs_template (line 40) | def update_single_obs_template(self, single_obs_template_wo_his: str, ... method update_observation (line 51) | def update_observation(self, obs: dict): method update_action (line 60) | def update_action(self, action: str): method update_admissible_actions (line 69) | def update_admissible_actions(self, admissible_actions): method init (line 73) | def init(self, env): method get_chat_prompt (line 91) | def get_chat_prompt(self): method get_single_prompt (line 125) | def get_single_prompt(self): method get_prompt (line 174) | def get_prompt(self): FILE: contrib/recipes/envs/train_env_agent.py function run_cmd (line 15) | def run_cmd(cmd): function kill_process_on_port (line 26) | def kill_process_on_port(port): function train_val_dataset (line 35) | def train_val_dataset(cfg): function get_config (line 44) | def get_config(path): FILE: contrib/recipes/search_r1/qa_em.py function normalize_answer (line 23) | def normalize_answer(s: str) -> str: function em_check (line 42) | def em_check(prediction: str, golden_answers: Union[str, Sequence[str]])... function subem_check (line 55) | def subem_check(prediction: str, golden_answers: Union[str, Sequence[str... function extract_solution (line 68) | def extract_solution(solution_str: str) -> Optional[str]: function compute_score_em (line 85) | def compute_score_em( function compute_score_subem (line 111) | def compute_score_subem( FILE: contrib/recipes/search_r1/retrieval_server.py function load_corpus (line 37) | def load_corpus(corpus_path: str) -> Any: function read_jsonl (line 42) | def read_jsonl(file_path: str) -> List[Dict[str, Any]]: function load_docs (line 50) | def load_docs(corpus: Any, doc_idxs: Sequence[int]) -> Docs: function load_model (line 55) | def load_model(model_path: str, use_fp16: bool = False) -> Tuple[torch.n... function pooling (line 67) | def pooling( class Encoder (line 85) | class Encoder: method __init__ (line 86) | def __init__( method encode (line 104) | def encode(self, query_list: Union[List[str], str], is_query: bool = T... class Config (line 153) | class Config: method __init__ (line 159) | def __init__( class BaseRetriever (line 188) | class BaseRetriever: method __init__ (line 189) | def __init__(self, config: Config) -> None: method _search (line 197) | def _search(self, query: str, num: Optional[int], return_score: bool) ... method _batch_search (line 200) | def _batch_search( method search (line 205) | def search( method batch_search (line 210) | def batch_search( class BM25Retriever (line 216) | class BM25Retriever(BaseRetriever): method __init__ (line 217) | def __init__(self, config: Config) -> None: method _check_contain_doc (line 231) | def _check_contain_doc(self) -> bool: method _search (line 239) | def _search( method _batch_search (line 273) | def _batch_search( class DenseRetriever (line 288) | class DenseRetriever(BaseRetriever): method __init__ (line 289) | def __init__(self, config: Config) -> None: method _search (line 311) | def _search( method _batch_search (line 325) | def _batch_search( function get_retriever (line 359) | def get_retriever(config: Config) -> BaseRetriever: class QueryRequest (line 371) | class QueryRequest(BaseModel): function retrieve_endpoint (line 385) | def retrieve_endpoint(request: QueryRequest) -> Dict[str, Any]: FILE: contrib/recipes/search_r1/search_r1_agent.py class Document (line 24) | class Document(TypedDict): class RetrievalItem (line 28) | class RetrievalItem(TypedDict): function eval (line 32) | def eval(prediction: str, ground_truth: List[str]) -> float: function postprocess_response (line 38) | def postprocess_response(response: str) -> str: function extract_action (line 47) | def extract_action(response: str) -> Tuple[Optional[str], str]: function execute_response (line 60) | def execute_response(response: str, do_search: bool = True) -> str: function retrieve_doc (line 77) | def retrieve_doc(query: str) -> str: function passages2string (line 87) | def passages2string(retrieval_result: List[RetrievalItem]) -> str: function call_llm (line 97) | def call_llm( class SearchR1Agent (line 113) | class SearchR1Agent(LitAgent[Dict[str, Any]]): method __init__ (line 115) | def __init__( method rollout (line 125) | def rollout( function debug_search_r1_agent (line 196) | def debug_search_r1_agent(): FILE: contrib/recipes/search_r1/train_search_r1_agent.py function config_train_fast (line 87) | def config_train_fast() -> Dict[str, Any]: function config_train_qwen (line 117) | def config_train_qwen() -> Dict[str, Any]: function config_train_llama (line 124) | def config_train_llama() -> Dict[str, Any]: function train (line 137) | def train(config: Dict[str, Any]) -> None: function main (line 148) | def main() -> None: FILE: contrib/recipes/webshop/agl/config.py function _write_github_output (line 88) | def _write_github_output(project_name: str, experiment_name: str) -> None: function _create_config (line 101) | def _create_config( function config_fast (line 135) | def config_fast() -> Dict[str, Any]: function config_qwen (line 154) | def config_qwen() -> Dict[str, Any]: function config_qwen_1_5b (line 163) | def config_qwen_1_5b() -> Dict[str, Any]: function config_qwen_7b (line 176) | def config_qwen_7b() -> Dict[str, Any]: FILE: contrib/recipes/webshop/agl/generate_tasks.py function load_human_instructions (line 46) | def load_human_instructions(filepath: Path) -> dict[str, list[dict[str, ... function convert_to_training_task (line 62) | def convert_to_training_task( function generate_tasks (line 92) | def generate_tasks( function main (line 138) | def main() -> int: FILE: contrib/recipes/webshop/agl/run_training.py function find_human_instructions_path (line 68) | def find_human_instructions_path() -> Path | None: function auto_generate_tasks (line 80) | def auto_generate_tasks( class ExternalRunnerAgent (line 106) | class ExternalRunnerAgent(LitAgent[Dict[str, Any]]): method rollout (line 118) | def rollout(self, task: Dict[str, Any], resources: NamedResources, rol... function train (line 139) | def train( function main (line 198) | def main() -> None: FILE: contrib/recipes/webshop/agl/tasks.py function load_sample_tasks (line 32) | def load_sample_tasks(path: Optional[Path] = None) -> List[Dict[str, Any]]: function load_tasks_from_file (line 46) | def load_tasks_from_file(path: Path) -> List[Dict[str, Any]]: FILE: contrib/recipes/webshop/scripts/headless-runner.ts type RunnerOptions (line 39) | interface RunnerOptions { type WebShopTask (line 46) | interface WebShopTask { function parseAction (line 56) | function parseAction(text: string): string | null { type ValidationResult (line 75) | interface ValidationResult { function validateAction (line 84) | function validateAction(action: string): ValidationResult { function runRollout (line 113) | async function runRollout( function runLoop (line 324) | async function runLoop(options: RunnerOptions): Promise { function parseArgs (line 408) | function parseArgs(): RunnerOptions { FILE: contrib/recipes/webshop/server/webshop_server.py class Session (line 43) | class Session: class SessionManager (line 53) | class SessionManager: method __init__ (line 56) | def __init__(self, num_products: int = DEFAULT_NUM_PRODUCTS): method _ensure_gym_registered (line 62) | def _ensure_gym_registered(self): method _cleanup_expired (line 80) | def _cleanup_expired(self): method create_session (line 88) | def create_session(self, session_id: Optional[str] = None, instruction... method get_session (line 116) | def get_session(self, session_id: str) -> Optional[Session]: method reset_session (line 124) | def reset_session(self, session_id: str, instruction: Optional[str] = ... function get_session_manager (line 149) | def get_session_manager() -> SessionManager: function reset (line 159) | def reset(): function step (line 212) | def step(): function health (line 268) | def health(): function index (line 274) | def index(): function main (line 289) | def main(): FILE: contrib/recipes/webshop/src/agent/prompts.ts constant WEBSHOP_SYSTEM_PROMPT (line 13) | const WEBSHOP_SYSTEM_PROMPT = `You are a shopping assistant agent naviga... FILE: contrib/recipes/webshop/src/agent/webshop-agent.ts type WebShopAgentOptions (line 24) | interface WebShopAgentOptions { function createWebShopAgent (line 48) | function createWebShopAgent( type WebShopAgentUIMessage (line 75) | type WebShopAgentUIMessage = InferAgentUIMessage< type WebShopUIToolInvocation (line 82) | type WebShopUIToolInvocation = NonNullable< FILE: contrib/recipes/webshop/src/data/sample-tasks.ts constant SAMPLE_TASKS (line 15) | const SAMPLE_TASKS: WebShopTask[] = [ function getRandomTasks (line 99) | function getRandomTasks(count: number): WebShopTask[] { function getTaskById (line 107) | function getTaskById(taskId: string): WebShopTask | undefined { FILE: contrib/recipes/webshop/src/environment/types.ts type ProductAttributes (line 12) | interface ProductAttributes { type WebShopTask (line 24) | interface WebShopTask { type WebShopState (line 41) | interface WebShopState { type ActionResult (line 54) | interface ActionResult { type WebShopEnvironment (line 66) | interface WebShopEnvironment { type SearchResultItem (line 98) | interface SearchResultItem { type Product (line 109) | interface Product { type SelectedOptions (line 123) | interface SelectedOptions { FILE: contrib/recipes/webshop/src/environment/webshop-server.ts type JsonRecord (line 19) | type JsonRecord = Record; type WebShopServerEnvOptions (line 21) | interface WebShopServerEnvOptions { class WebShopServerEnv (line 31) | class WebShopServerEnv implements WebShopEnvironment { method constructor (line 43) | constructor(options: WebShopServerEnvOptions) { method getState (line 49) | getState(): WebShopState { method reset (line 53) | async reset(options?: { task?: WebShopTask }): Promise { method step (line 94) | async step(action: string): Promise { method search (line 130) | async search(query: string): Promise { method click (line 134) | async click(element: string): Promise { method buy (line 138) | async buy(): Promise { method postJsonWithFallback (line 147) | private async postJsonWithFallback( method pickString (line 208) | private pickString(obj: unknown, keys: string[]): string | undefined { method pickBool (line 218) | private pickBool(obj: unknown, keys: string[]): boolean | undefined { method pickNumber (line 228) | private pickNumber(obj: unknown, keys: string[]): number | undefined { FILE: contrib/recipes/webshop/src/utils/agentlightning/otel.ts type TracerConfig (line 29) | interface TracerConfig { class RolloutSpanProcessor (line 40) | class RolloutSpanProcessor implements SpanProcessor { method constructor (line 43) | constructor( method onStart (line 49) | onStart(span: SdkSpan, parentContext: Context): void { method onEnd (line 57) | onEnd(span: ReadableSpan): void { method shutdown (line 61) | shutdown(): Promise { method forceFlush (line 65) | forceFlush(): Promise { function createRolloutTracer (line 74) | function createRolloutTracer(config: TracerConfig): { function getOtlpEndpoint (line 116) | function getOtlpEndpoint(): string | null { function emitReward (line 133) | function emitReward(tracer: Tracer, reward: number): void { FILE: contrib/recipes/webshop/src/utils/agentlightning/proxy-llm.ts function getProxyLLMBaseUrl (line 26) | function getProxyLLMBaseUrl( function getMainLLM (line 63) | function getMainLLM( function isProxyLLM (line 82) | function isProxyLLM( FILE: contrib/recipes/webshop/src/utils/agentlightning/store-client.ts constant API_V1_AGL_PREFIX (line 22) | const API_V1_AGL_PREFIX = '/v1/agl'; type StoreClientOptions (line 24) | interface StoreClientOptions { class AgentLightningStoreClient (line 29) | class AgentLightningStoreClient { method constructor (line 33) | constructor(options: StoreClientOptions) { method isConfigured (line 38) | get isConfigured(): boolean { method apiBase (line 42) | private get apiBase(): string { method health (line 49) | async health(): Promise { method startRollout (line 62) | async startRollout(request: StartRolloutRequest): Promise> { method getLatestAttempt (line 169) | async getLatestAttempt(rolloutId: string): Promise { method completeAttempt (line 183) | async completeAttempt( method updateWorker (line 207) | async updateWorker( method getLatestResources (line 224) | async getLatestResources(): Promise { method getResourcesById (line 236) | async getResourcesById(resourcesId: string): Promise { method get (line 280) | private async get(path: string): Promise { function getStoreClient (line 311) | function getStoreClient(): AgentLightningStoreClient | null { FILE: contrib/recipes/webshop/src/utils/agentlightning/types.ts type RolloutMode (line 13) | type RolloutMode = 'train' | 'val' | 'test'; type RolloutStatus (line 18) | type RolloutStatus = type AttemptStatus (line 30) | type AttemptStatus = type TaskInput (line 41) | type TaskInput = Record; type RolloutConfig (line 46) | interface RolloutConfig { type Attempt (line 56) | interface Attempt { type Rollout (line 71) | interface Rollout { type AttemptedRollout (line 86) | interface AttemptedRollout extends Rollout { type StartRolloutRequest (line 93) | interface StartRolloutRequest { type EnqueueRolloutRequest (line 105) | interface EnqueueRolloutRequest { type UpdateAttemptRequest (line 116) | interface UpdateAttemptRequest { type DequeueRolloutsRequest (line 126) | interface DequeueRolloutsRequest { type WorkerStatus (line 134) | type WorkerStatus = 'idle' | 'busy' | 'unknown'; type Worker (line 139) | interface Worker { type PaginatedResult (line 154) | interface PaginatedResult { type WebShopTaskInput (line 164) | interface WebShopTaskInput { type LLMResource (line 177) | interface LLMResource { type ProxyLLMResource (line 190) | interface ProxyLLMResource { type PromptTemplateResource (line 201) | interface PromptTemplateResource { type ResourceUnion (line 210) | type ResourceUnion = LLMResource | ProxyLLMResource | PromptTemplateReso... type NamedResources (line 215) | type NamedResources = Record; type ResourcesUpdate (line 220) | interface ResourcesUpdate { FILE: contrib/recipes/webshop/tests/conftest.py function adapter (line 22) | def adapter() -> TracerTraceToTriplet: function make_span (line 28) | def make_span(): function make_vercel_ai_span (line 57) | def make_vercel_ai_span(make_span): function make_reward_span (line 100) | def make_reward_span(make_span): function make_session_span (line 125) | def make_session_span(make_span): FILE: contrib/recipes/webshop/tests/test_span_adapter.py class TestVercelAiSdkSpanMatching (line 25) | class TestVercelAiSdkSpanMatching: method test_adapter_matches_vercel_ai_sdk_span_names (line 38) | def test_adapter_matches_vercel_ai_sdk_span_names( method test_adapter_does_not_match_non_ai_spans (line 53) | def test_adapter_does_not_match_non_ai_spans(self, adapter: TracerTrac... class TestTokenIdExtraction (line 65) | class TestTokenIdExtraction: method test_extracts_token_ids_when_present (line 68) | def test_extracts_token_ids_when_present(self, adapter: TracerTraceToT... method test_empty_token_ids_when_not_present (line 85) | def test_empty_token_ids_when_not_present(self, adapter: TracerTraceTo... method test_raw_content_preserved_even_without_token_ids (line 104) | def test_raw_content_preserved_even_without_token_ids(self, adapter: T... class TestRewardExtraction (line 124) | class TestRewardExtraction: method test_extracts_reward_from_agentops_format (line 127) | def test_extracts_reward_from_agentops_format( method test_reward_span_parsed_correctly (line 158) | def test_reward_span_parsed_correctly(self, make_reward_span): class TestMultiTurnConversations (line 168) | class TestMultiTurnConversations: method test_multiple_llm_calls_create_multiple_triplets (line 171) | def test_multiple_llm_calls_create_multiple_triplets( class TestEdgeCases (line 200) | class TestEdgeCases: method test_empty_span_list_raises_error (line 203) | def test_empty_span_list_raises_error(self, adapter: TracerTraceToTrip... method test_only_non_llm_spans (line 211) | def test_only_non_llm_spans(self, adapter: TracerTraceToTriplet, make_... method test_span_with_string_token_ids (line 222) | def test_span_with_string_token_ids(self, adapter: TracerTraceToTriple... FILE: contrib/recipes/webshop/tests/test_store_integration.py function store (line 26) | def store(): function integration_adapter (line 32) | def integration_adapter(): function test_full_flow_rollout_to_triplet (line 38) | async def test_full_flow_rollout_to_triplet(store, integration_adapter): function test_span_ingestion_requires_valid_attempt (line 123) | async def test_span_ingestion_requires_valid_attempt(store): function test_query_spans_by_explicit_attempt_id (line 171) | async def test_query_spans_by_explicit_attempt_id(store): function test_empty_spans_query_returns_empty_list (line 206) | async def test_empty_spans_query_returns_empty_list(store): function test_adapter_produces_empty_triplets_without_token_ids (line 219) | async def test_adapter_produces_empty_triplets_without_token_ids(store, ... FILE: contrib/recipes/webshop/tsup.config.ts method esbuildOptions (line 11) | esbuildOptions(options) { FILE: dashboard/.storybook/constants.ts constant STORY_DATE_NOW_MS (line 5) | const STORY_DATE_NOW_MS = 1762775145209; constant STORY_DATE_NOW_SECONDS (line 6) | const STORY_DATE_NOW_SECONDS = Math.floor(STORY_DATE_NOW_MS / 1000); constant STORY_BASE_URL (line 11) | const STORY_BASE_URL = 'https://storybook.agentlightning.invalid'; constant STORY_LOCATION_HREF (line 12) | const STORY_LOCATION_HREF = `${STORY_BASE_URL}/storybook`; FILE: dashboard/.storybook/preview.tsx type ColorSchemeValue (line 14) | type ColorSchemeValue = 'light' | 'dark'; FILE: dashboard/src/App.tsx function App (line 16) | function App() { FILE: dashboard/src/Router.tsx function Router (line 44) | function Router() { FILE: dashboard/src/components/AppAlertBanner.story.tsx type Story (line 23) | type Story = StoryObj; function renderWithAlert (line 25) | function renderWithAlert(message: string, tone: AlertTone) { FILE: dashboard/src/components/AppAlertBanner.tsx constant ALERT_META (line 9) | const ALERT_META = { function AppAlertBanner (line 24) | function AppAlertBanner() { FILE: dashboard/src/components/AppDrawer.component.tsx constant ATTEMPT_STATUS_COLORS (line 28) | const ATTEMPT_STATUS_COLORS: Record = { constant ROLLOUT_STATUS_COLORS (line 37) | const ROLLOUT_STATUS_COLORS: Record = { constant SPAN_STATUS_COLORS (line 47) | const SPAN_STATUS_COLORS: Record = { constant WORKER_STATUS_COLORS (line 53) | const WORKER_STATUS_COLORS: Record = { constant TRACES_SORT_FIELD_MAP (line 59) | const TRACES_SORT_FIELD_MAP: Record = { type SortDirection (line 69) | type SortDirection = 'asc' | 'desc'; type LocalSortState (line 71) | type LocalSortState = { function resolveTracesSortField (line 76) | function resolveTracesSortField(column: string): string { function getStatusBadgeColor (line 80) | function getStatusBadgeColor(status: RolloutStatus | AttemptStatus, isAt... function formatJson (line 88) | function formatJson(value: unknown) { type AppDrawerProps (line 96) | type AppDrawerProps = { function AppDrawer (line 103) | function AppDrawer({ opened, onClose, title, body }: AppDrawerProps) { type TraceDrawerTitleProps (line 136) | type TraceDrawerTitleProps = { function TraceDrawerTitle (line 140) | function TraceDrawerTitle({ span }: TraceDrawerTitleProps) { type RolloutAttemptDrawerTitleProps (line 199) | type RolloutAttemptDrawerTitleProps = { function RolloutAttemptDrawerTitle (line 204) | function RolloutAttemptDrawerTitle({ rollout, attempt }: RolloutAttemptD... type JsonEditorProps (line 271) | type JsonEditorProps = { function JsonEditor (line 275) | function JsonEditor({ value }: JsonEditorProps) { type RolloutTracesDrawerBodyProps (line 299) | type RolloutTracesDrawerBodyProps = { function RolloutTracesDrawerBody (line 306) | function RolloutTracesDrawerBody({ rollout, attempt, onShowRollout, onSh... type WorkerDrawerTitleProps (line 417) | type WorkerDrawerTitleProps = { function WorkerDrawerTitle (line 421) | function WorkerDrawerTitle({ worker }: WorkerDrawerTitleProps) { function AppDrawerContainer (line 471) | function AppDrawerContainer() { type DrawerLocationWatcherProps (line 566) | type DrawerLocationWatcherProps = { function DrawerLocationWatcher (line 570) | function DrawerLocationWatcher({ onNavigation }: DrawerLocationWatcherPr... FILE: dashboard/src/components/AppDrawer.story.tsx type Story (line 26) | type Story = StoryObj; function renderWithDrawer (line 116) | function renderWithDrawer(content: DrawerContent, options?: { spans?: Sp... FILE: dashboard/src/components/ResourcesTable.component.tsx constant DEFAULT_RECORDS_PER_PAGE_OPTIONS (line 14) | const DEFAULT_RECORDS_PER_PAGE_OPTIONS = [50, 100, 200, 500]; constant COLUMN_VISIBILITY (line 16) | const COLUMN_VISIBILITY: Record = { type ResourcesTableRecord (line 25) | type ResourcesTableRecord = Resources & { function buildResourcesRecord (line 31) | function buildResourcesRecord(resources: Resources): ResourcesTableRecord { type ResourcesColumnsOptions (line 48) | type ResourcesColumnsOptions = Record; function createResourcesColumns (line 50) | function createResourcesColumns(_options: ResourcesColumnsOptions): Data... type RowExpansionRenderer (line 122) | type RowExpansionRenderer = (context: { type ResourcesTableProps (line 127) | type ResourcesTableProps = { function ResourcesTable (line 146) | function ResourcesTable({ FILE: dashboard/src/components/ResourcesTable.story.tsx type Story (line 21) | type Story = StoryObj; type WrapperProps (line 140) | type WrapperProps = { function ResourcesTableStoryWrapper (line 148) | function ResourcesTableStoryWrapper({ FILE: dashboard/src/components/ResourcesTree.component.tsx function convertToTreeData (line 9) | function convertToTreeData(obj: any, key: string = 'root', parentPath = ... type ResourcesTreeProps (line 72) | type ResourcesTreeProps = { function ResourcesTree (line 76) | function ResourcesTree({ resources }: ResourcesTreeProps) { FILE: dashboard/src/components/ResourcesTree.story.tsx type Story (line 18) | type Story = StoryObj; type WrapperProps (line 155) | type WrapperProps = { function ResourcesTreeStoryWrapper (line 160) | function ResourcesTreeStoryWrapper({ resources, maxWidth = 800 }: Wrappe... FILE: dashboard/src/components/RolloutTable.component.tsx constant ROLLOUT_STATUS_OPTIONS (line 48) | const ROLLOUT_STATUS_OPTIONS: RolloutStatus[] = [ constant ATTEMPT_STATUS_COLORS (line 58) | const ATTEMPT_STATUS_COLORS: Record = { constant ROLLOUT_STATUS_COLORS (line 67) | const ROLLOUT_STATUS_COLORS: Record = { constant ROLLOUT_MODE_OPTIONS (line 77) | const ROLLOUT_MODE_OPTIONS: RolloutMode[] = ['train', 'val', 'test']; constant DEFAULT_RECORDS_PER_PAGE_OPTIONS (line 79) | const DEFAULT_RECORDS_PER_PAGE_OPTIONS = [50, 100, 200, 500]; constant COLUMN_VISIBILITY (line 81) | const COLUMN_VISIBILITY: Record = { type RolloutTableRecord (line 95) | type RolloutTableRecord = Rollout & { function selectHeartbeatTimestamp (line 110) | function selectHeartbeatTimestamp(attempt?: Attempt | null): number | nu... function buildRolloutRecord (line 118) | function buildRolloutRecord(rollout: Rollout): RolloutTableRecord { function buildAttemptRecord (line 152) | function buildAttemptRecord(rollout: Rollout, attempt: Attempt): Rollout... function getStatusBadge (line 182) | function getStatusBadge(status: string, kind: 'rollout' | 'attempt') { type RolloutColumnsOptions (line 195) | type RolloutColumnsOptions = { function createRolloutColumns (line 206) | function createRolloutColumns({ type RowExpansionRenderer (line 484) | type RowExpansionRenderer = (context: { type RolloutTableProps (line 489) | type RolloutTableProps = { function RolloutTable (line 516) | function RolloutTable({ type RolloutAttemptsTableProps (line 721) | type RolloutAttemptsTableProps = { function RolloutAttemptsTable (line 730) | function RolloutAttemptsTable({ FILE: dashboard/src/components/RolloutTable.story.tsx type Story (line 23) | type Story = StoryObj; type WrapperProps (line 152) | type WrapperProps = { function RolloutTableStoryWrapper (line 160) | function RolloutTableStoryWrapper({ FILE: dashboard/src/components/TracesTable.component.tsx constant DEFAULT_RECORDS_PER_PAGE_OPTIONS (line 21) | const DEFAULT_RECORDS_PER_PAGE_OPTIONS = [50, 100, 200, 500]; constant COLUMN_VISIBILITY (line 23) | const COLUMN_VISIBILITY: Record = { constant STATUS_COLORS (line 37) | const STATUS_COLORS: Record = { type TracesTableRecord (line 43) | type TracesTableRecord = Span & { function buildTraceRecord (line 50) | function buildTraceRecord(span: Span): TracesTableRecord { type TracesColumnsOptions (line 66) | type TracesColumnsOptions = { function createTracesColumns (line 73) | function createTracesColumns({ type TracesTableProps (line 276) | type TracesTableProps = { function TracesTable (line 298) | function TracesTable({ FILE: dashboard/src/components/TracesTable.story.tsx type Story (line 23) | type Story = StoryObj; type WrapperProps (line 199) | type WrapperProps = { function TracesTableStoryWrapper (line 207) | function TracesTableStoryWrapper({ FILE: dashboard/src/components/WorkersTable.component.tsx constant DEFAULT_RECORDS_PER_PAGE_OPTIONS (line 14) | const DEFAULT_RECORDS_PER_PAGE_OPTIONS = [50, 100, 200, 500]; constant COLUMN_VISIBILITY (line 16) | const COLUMN_VISIBILITY: Record = { type WorkersTableRecord (line 28) | type WorkersTableRecord = Worker & { function buildWorkerRecord (line 40) | function buildWorkerRecord(worker: Worker): WorkersTableRecord { type WorkersColumnsOptions (line 52) | type WorkersColumnsOptions = { constant STATUS_COLORS (line 56) | const STATUS_COLORS: Record = { function createWorkersColumns (line 62) | function createWorkersColumns({ onShowDetails }: WorkersColumnsOptions):... type WorkersTableProps (line 202) | type WorkersTableProps = { function WorkersTable (line 221) | function WorkersTable({ FILE: dashboard/src/components/WorkersTable.story.tsx type Story (line 20) | type Story = StoryObj; type WorkersTableStoryWrapperProps (line 82) | type WorkersTableStoryWrapperProps = { function WorkersTableStoryWrapper (line 87) | function WorkersTableStoryWrapper({ maxWidth, initialSort }: WorkersTabl... FILE: dashboard/src/features/config/slice.ts method setBaseUrl (line 16) | setBaseUrl(state, action: PayloadAction) { method setAutoRefreshMs (line 19) | setAutoRefreshMs(state, action: PayloadAction) { method setTheme (line 22) | setTheme(state, action: PayloadAction) { FILE: dashboard/src/features/resources/selectors.ts constant RESOURCES_SORT_FIELD_MAP (line 8) | const RESOURCES_SORT_FIELD_MAP: Record = { FILE: dashboard/src/features/resources/slice.ts type SortDirection (line 5) | type SortDirection = 'asc' | 'desc'; type ResourcesSortState (line 7) | type ResourcesSortState = { type ResourcesUiState (line 12) | type ResourcesUiState = { method setResourcesSearchTerm (line 33) | setResourcesSearchTerm(state, action: PayloadAction) { method setResourcesPage (line 37) | setResourcesPage(state, action: PayloadAction) { method setResourcesRecordsPerPage (line 40) | setResourcesRecordsPerPage(state, action: PayloadAction) { method setResourcesSort (line 44) | setResourcesSort(state, action: PayloadAction) { method resetResourcesFilters (line 47) | resetResourcesFilters(state) { FILE: dashboard/src/features/rollouts/api.ts type GetRolloutsQueryArgs (line 185) | type GetRolloutsQueryArgs = { type GetResourcesQueryArgs (line 195) | type GetResourcesQueryArgs = { type GetWorkersQueryArgs (line 203) | type GetWorkersQueryArgs = { type GetRolloutAttemptsQueryArgs (line 212) | type GetRolloutAttemptsQueryArgs = { type GetSpansQueryArgs (line 220) | type GetSpansQueryArgs = { FILE: dashboard/src/features/rollouts/selectors.ts constant ROLLOUTS_SORT_FIELD_MAP (line 8) | const ROLLOUTS_SORT_FIELD_MAP: Record = { FILE: dashboard/src/features/rollouts/slice.ts type SortDirection (line 6) | type SortDirection = 'asc' | 'desc'; type RolloutsSortState (line 8) | type RolloutsSortState = { type RolloutsUiState (line 13) | type RolloutsUiState = { method setRolloutsSearchTerm (line 38) | setRolloutsSearchTerm(state, action: PayloadAction) { method setRolloutsStatusFilters (line 42) | setRolloutsStatusFilters(state, action: PayloadAction) { method setRolloutsModeFilters (line 46) | setRolloutsModeFilters(state, action: PayloadAction) { method setRolloutsPage (line 50) | setRolloutsPage(state, action: PayloadAction) { method setRolloutsRecordsPerPage (line 53) | setRolloutsRecordsPerPage(state, action: PayloadAction) { method setRolloutsSort (line 57) | setRolloutsSort(state, action: PayloadAction) { method resetRolloutsFilters (line 60) | resetRolloutsFilters(state) { FILE: dashboard/src/features/traces/selectors.ts constant TRACES_SORT_FIELD_MAP (line 24) | const TRACES_SORT_FIELD_MAP: Record = { FILE: dashboard/src/features/traces/slice.ts type SortDirection (line 5) | type SortDirection = 'asc' | 'desc'; type TracesSortState (line 7) | type TracesSortState = { type TracesViewMode (line 12) | type TracesViewMode = 'table' | 'waterfall' | 'tree'; type TracesUiState (line 14) | type TracesUiState = { method setTracesRolloutId (line 41) | setTracesRolloutId(state, action: PayloadAction) { method setTracesAttemptId (line 46) | setTracesAttemptId(state, action: PayloadAction) { method setTracesSearchTerm (line 50) | setTracesSearchTerm(state, action: PayloadAction) { method setTracesPage (line 54) | setTracesPage(state, action: PayloadAction) { method setTracesRecordsPerPage (line 57) | setTracesRecordsPerPage(state, action: PayloadAction) { method setTracesSort (line 61) | setTracesSort(state, action: PayloadAction) { method setTracesViewMode (line 64) | setTracesViewMode(state, action: PayloadAction) { method resetTracesFilters (line 67) | resetTracesFilters(state) { method hydrateTracesStateFromQuery (line 72) | hydrateTracesStateFromQuery( FILE: dashboard/src/features/ui/alert/selectors.ts constant ALERT_PRIORITY (line 7) | const ALERT_PRIORITY: Record = { FILE: dashboard/src/features/ui/alert/slice.ts type AlertTone (line 5) | type AlertTone = 'info' | 'warning' | 'error'; type AppAlert (line 7) | type AppAlert = { type AlertsState (line 15) | type AlertsState = { type ShowAlertPayload (line 23) | type ShowAlertPayload = { type HideAlertPayload (line 29) | type HideAlertPayload = { method showAlert (line 37) | showAlert(state, action: PayloadAction) { method hideAlert (line 56) | hideAlert(state, action: PayloadAction) { method dismissAlert (line 59) | dismissAlert(state, action: PayloadAction) { method clearAlerts (line 65) | clearAlerts(state) { FILE: dashboard/src/features/ui/drawer/slice.ts type DrawerType (line 6) | type DrawerType = 'rollout-json' | 'rollout-traces' | 'trace-detail' | '... type DrawerContent (line 8) | type DrawerContent = type DrawerState (line 26) | type DrawerState = { method openDrawer (line 40) | openDrawer(state, action: PayloadAction) { method closeDrawer (line 44) | closeDrawer(state) { FILE: dashboard/src/features/workers/selectors.ts constant WORKERS_SORT_FIELD_MAP (line 8) | const WORKERS_SORT_FIELD_MAP: Record = { FILE: dashboard/src/features/workers/slice.ts type SortDirection (line 5) | type SortDirection = 'asc' | 'desc'; type WorkersSortState (line 7) | type WorkersSortState = { type WorkersUiState (line 12) | type WorkersUiState = { method setWorkersSearchTerm (line 33) | setWorkersSearchTerm(state, action: PayloadAction) { method setWorkersPage (line 37) | setWorkersPage(state, action: PayloadAction) { method setWorkersRecordsPerPage (line 40) | setWorkersRecordsPerPage(state, action: PayloadAction) { method setWorkersSort (line 44) | setWorkersSort(state, action: PayloadAction) { method resetWorkersFilters (line 47) | resetWorkersFilters(state) { FILE: dashboard/src/layouts/AppLayout.story.tsx constant ROUTES (line 25) | const ROUTES = [ function createAlertState (line 56) | function createAlertState(message: string, tone: AlertTone): AlertsState { function renderAppLayout (line 70) | function renderAppLayout(args: AppLayoutProps, initialEntry = '/rollouts... type Story (line 110) | type Story = StoryObj; FILE: dashboard/src/layouts/AppLayout.tsx type ConnectionStatus (line 13) | type ConnectionStatus = 'online' | 'offline' | 'unknown'; type NavItem (line 15) | type NavItem = { constant NAV_ITEMS (line 21) | const NAV_ITEMS: NavItem[] = [ constant CONNECTION_STATUS_META (line 29) | const CONNECTION_STATUS_META: Record; function createStoryStore (line 156) | function createStoryStore(configOverrides?: Partial; function createStoryStore (line 660) | function createStoryStore( function renderWithStore (line 679) | function renderWithStore(uiOverrides?: Partial, configO... function renderWithAppLayout (line 693) | function renderWithAppLayout( function openSampleTracesDrawer (line 936) | async function openSampleTracesDrawer(canvasElement: HTMLElement) { function openRawJsonDrawer (line 954) | async function openRawJsonDrawer(canvasElement: HTMLElement, rolloutId =... FILE: dashboard/src/pages/Rollouts.page.tsx function RolloutAttemptsContent (line 34) | function RolloutAttemptsContent({ function toRolloutFromRecord (line 60) | function toRolloutFromRecord(record: RolloutTableRecord): Rollout { function RolloutsPage (line 77) | function RolloutsPage() { FILE: dashboard/src/pages/Settings.page.story.tsx type Story (line 21) | type Story = StoryObj; function renderWithConfig (line 23) | function renderWithConfig(partial?: Partial) { FILE: dashboard/src/pages/Settings.page.tsx constant AUTO_REFRESH_OPTIONS (line 9) | const AUTO_REFRESH_OPTIONS = [ constant THEME_OPTIONS (line 18) | const THEME_OPTIONS = [ function SettingsPage (line 24) | function SettingsPage() { FILE: dashboard/src/pages/Traces.page.story.tsx type Story (line 36) | type Story = StoryObj; function createSyntheticRollouts (line 258) | function createSyntheticRollouts(prefix: string, count: number) { function createHandlers (line 338) | function createHandlers(delayMs?: number) { function createRequestTimeoutHandlers (line 342) | function createRequestTimeoutHandlers() { function createStoryStore (line 364) | function createStoryStore( function renderTracesPage (line 380) | function renderTracesPage( function renderTracesPageWithAppLayout (line 397) | function renderTracesPageWithAppLayout( FILE: dashboard/src/pages/Traces.page.tsx constant VIEW_OPTIONS (line 44) | const VIEW_OPTIONS = [ type ViewOptionValue (line 50) | type ViewOptionValue = (typeof VIEW_OPTIONS)[number]['value']; function getLatestAttempt (line 52) | function getLatestAttempt(attempts: Attempt[]): Attempt | null { function mergeRolloutCache (line 59) | function mergeRolloutCache(cache: Record, items: Rollou... function TracesPage (line 75) | function TracesPage() { FILE: dashboard/src/pages/Workers.page.story.tsx type Story (line 33) | type Story = StoryObj; function createStoryStore (line 119) | function createStoryStore(configOverrides?: Partial; type AppStore (line 34) | type AppStore = ReturnType; type AppDispatch (line 35) | type AppDispatch = AppStore['dispatch']; FILE: dashboard/src/theme.ts constant CONTAINER_SIZES (line 35) | const CONTAINER_SIZES: Record = { constant FONT_FAMILY (line 45) | const FONT_FAMILY = FILE: dashboard/src/types.ts type RolloutStatus (line 5) | type RolloutStatus = 'queuing' | 'preparing' | 'running' | 'failed' | 's... type AttemptStatus (line 7) | type AttemptStatus = 'preparing' | 'running' | 'failed' | 'succeeded' | ... type RolloutMode (line 9) | type RolloutMode = 'train' | 'val' | 'test'; type TaskInput (line 11) | type TaskInput = any; type Timestamp (line 13) | type Timestamp = number; type Attempt (line 19) | type Attempt = { type WorkerStatus (line 31) | type WorkerStatus = 'idle' | 'busy' | 'unknown'; type Worker (line 37) | type Worker = { type Rollout (line 56) | type Rollout = { type Resource (line 70) | type Resource = Record; type Resources (line 76) | type Resources = { type PaginatedResponse (line 87) | type PaginatedResponse = { type Span (line 98) | type Span = { type Config (line 120) | type Config = { type ThemePreference (line 126) | type ThemePreference = 'light' | 'dark' | 'system'; type ConfigState (line 128) | type ConfigState = { FILE: dashboard/src/utils/error.ts function getErrorDescriptor (line 7) | function getErrorDescriptor(error: unknown): string | null { FILE: dashboard/src/utils/format.ts function toTimestamp (line 5) | function toTimestamp(value: unknown): number | null { function clampToNow (line 12) | function clampToNow(start: number | null, end: number | null): number | ... function formatDateTime (line 22) | function formatDateTime(timestamp: number | null): string { function formatDateTimeWithMilliseconds (line 30) | function formatDateTimeWithMilliseconds(timestamp: number | null): string { function formatDuration (line 38) | function formatDuration(seconds: number | null): string { function formatRelativeTime (line 66) | function formatRelativeTime(timestamp: number | null): string { function formatStatusLabel (line 81) | function formatStatusLabel(status: string): string { function formatInputPreview (line 88) | function formatInputPreview(input: unknown, maxLength = 35): { preview: ... function safeStringify (line 101) | function safeStringify(value: unknown): string { FILE: dashboard/src/utils/mock.ts function parseNumberParam (line 24) | function parseNumberParam(params: URLSearchParams, key: string, defaultV... function filterRolloutsForParams (line 40) | function filterRolloutsForParams(rollouts: Rollout[], params: URLSearchP... function getRolloutSortValue (line 67) | function getRolloutSortValue(rollout: Rollout, sortBy: string): string |... function sortRolloutsForParams (line 85) | function sortRolloutsForParams( function buildRolloutsResponse (line 120) | function buildRolloutsResponse(rollouts: Rollout[], request: Request): R... function sortAttemptsForParams (line 145) | function sortAttemptsForParams( function buildAttemptsResponse (line 168) | function buildAttemptsResponse(attempts: Attempt[], request: Request): R... function filterSpansForParams (line 192) | function filterSpansForParams(spans: Span[], params: URLSearchParams): S... function getSpanSortValue (line 219) | function getSpanSortValue(span: Span, sortBy: string): string | number |... function sortSpansForParams (line 247) | function sortSpansForParams(spans: Span[], sortBy: string | null, sortOr... function buildSpansResponse (line 276) | function buildSpansResponse(spansByAttempt: Record, requ... function createRolloutsHandlers (line 319) | function createRolloutsHandlers(rollouts: Rollout[], attemptsByRollout: ... function createSpansHandlers (line 341) | function createSpansHandlers(spansByAttempt: Record) { function filterResourcesForParams (line 349) | function filterResourcesForParams(resources: Resources[], params: URLSea... function getResourcesSortValue (line 363) | function getResourcesSortValue(resource: Resources, sortBy: string): str... function sortResourcesForParams (line 381) | function sortResourcesForParams( function buildResourcesResponse (line 416) | function buildResourcesResponse(resources: Resources[], request: Request... function filterWorkersForParams (line 441) | function filterWorkersForParams(workers: Worker[], params: URLSearchPara... function getWorkerSortValue (line 464) | function getWorkerSortValue(worker: Worker, sortBy: string): string | nu... function sortWorkersForParams (line 490) | function sortWorkersForParams(workers: Worker[], sortBy: string | null, ... function buildWorkersResponse (line 520) | function buildWorkersResponse(workers: Worker[], request: Request): Reco... function createWorkersHandlers (line 544) | function createWorkersHandlers(workers: Worker[]) { function createResourcesHandlers (line 559) | function createResourcesHandlers(resources: Resources[]) { function createMockHandlers (line 586) | function createMockHandlers( FILE: dashboard/src/utils/table.ts type ColumnVisibilityConfig (line 8) | type ColumnVisibilityConfig = function compareRecords (line 24) | function compareRecords(a: T, b: T, key: K): number { constant FALLBACK_EM_IN_PIXELS (line 51) | const FALLBACK_EM_IN_PIXELS = 16; function getEmInPixels (line 53) | function getEmInPixels(): number { function resolveWidth (line 67) | function resolveWidth(config: ColumnVisibilityConfig): { widthEm: number... function createResponsiveColumns (line 74) | function createResponsiveColumns( FILE: dashboard/static/mockServiceWorker.js constant PACKAGE_VERSION (line 12) | const PACKAGE_VERSION = '2.11.6'; constant INTEGRITY_CHECKSUM (line 13) | const INTEGRITY_CHECKSUM = '4db4a41e972cec1b64cc569c66952d82'; constant IS_MOCKED_RESPONSE (line 14) | const IS_MOCKED_RESPONSE = Symbol('isMockedResponse'); function handleRequest (line 123) | async function handleRequest(event, requestId, requestInterceptedAt) { function resolveMainClient (line 171) | async function resolveMainClient(event) { function getResponse (line 205) | async function getResponse(event, client, requestId, requestInterceptedA... function sendToClient (line 280) | function sendToClient(client, message, transferrables = []) { function respondWithMock (line 300) | function respondWithMock(response) { function serializeRequest (line 322) | async function serializeRequest(request) { FILE: dashboard/test-utils/python-server.py function inject_mock_data (line 40) | async def inject_mock_data(store: InMemoryLightningStore, now: float | N... function main (line 684) | async def main(): FILE: dashboard/test-utils/render.tsx function render (line 7) | function render(ui: React.ReactNode) { FILE: dashboard/vitest.global-setup.mjs function setup (line 207) | async function setup() { FILE: dashboard/vitest.setup.mjs class ResizeObserver (line 25) | class ResizeObserver { method observe (line 26) | observe() {} method unobserve (line 27) | unobserve() {} method disconnect (line 28) | disconnect() {} FILE: docs/javascripts/charts.js function matVar (line 4) | function matVar(name) { function toRGBA (line 7) | function toRGBA(color, a = 1) { function applyThemeDefaults (line 23) | function applyThemeDefaults() { function applyDatasetDefaults (line 56) | function applyDatasetDefaults(config) { function deepMerge (line 71) | function deepMerge(target, src) { function buildConfig (line 85) | function buildConfig(baseCfg) { function renderAll (line 161) | function renderAll() { function retheme (line 180) | function retheme() { function boot (line 198) | function boot() { FILE: docs/macros/source_links.py function define_env (line 10) | def define_env(env: Any): FILE: examples/apo/apo_custom_algorithm.py function apo_algorithm (line 42) | async def apo_algorithm(*, store: agl.LightningStore): function apo_rollout (line 103) | async def apo_rollout(task: str, prompt_template: agl.PromptTemplate) ->... function log_llm_span (line 120) | async def log_llm_span(spans: Sequence[agl.Span]) -> None: function llm_judge (line 127) | async def llm_judge(task: str, output: Optional[str]) -> float: function apo_runner (line 154) | async def apo_runner(*, store: agl.LightningStore): function main (line 164) | async def main(): FILE: examples/apo/apo_custom_algorithm_trainer.py function apo_algorithm_usable_in_trainer (line 30) | async def apo_algorithm_usable_in_trainer(*, store: LightningStore): FILE: examples/apo/apo_debug.py function debug_with_runner (line 19) | async def debug_with_runner(): function debug_with_hooks (line 46) | async def debug_with_hooks(): function debug_with_trainer (line 82) | def debug_with_trainer(): FILE: examples/apo/legacy_apo_client.py class SimpleAgent (line 20) | class SimpleAgent(LitAgent[Any]): method training_rollout (line 22) | def training_rollout(self, task, rollout_id, resources): # type: ignore FILE: examples/apo/legacy_apo_server.py function example_apo (line 15) | async def example_apo(): FILE: examples/apo/room_selector.py class JudgeResponse (line 30) | class JudgeResponse(BaseModel): class Room (line 35) | class Room(TypedDict): class RoomStatus (line 44) | class RoomStatus(Room): class AvailableRooms (line 48) | class AvailableRooms(TypedDict): class RoomRequirement (line 52) | class RoomRequirement(TypedDict): class RoomSelectionTask (line 61) | class RoomSelectionTask(TypedDict): function prompt_template_baseline (line 87) | def prompt_template_baseline() -> PromptTemplate: function room_selection_grader (line 94) | def room_selection_grader(client: OpenAI, final_message: Optional[str], ... function room_selector (line 123) | def room_selector(task: RoomSelectionTask, prompt_template: PromptTempla... function overlaps (line 306) | def overlaps(start: str, dur: int, other_start: str, other_dur: int) -> ... function get_rooms_and_availability (line 315) | def get_rooms_and_availability(date: str, time_str: str, duration_min: i... function load_room_tasks (line 330) | def load_room_tasks() -> Dataset[RoomSelectionTask]: function debug_room_selector (line 338) | async def debug_room_selector(limit: int = 1): FILE: examples/apo/room_selector_apo.py function load_train_val_dataset (line 17) | def load_train_val_dataset() -> Tuple[Dataset[RoomSelectionTask], Datase... function setup_apo_logger (line 25) | def setup_apo_logger(file_path: str = "apo.log") -> None: function main (line 35) | def main() -> None: FILE: examples/azure/aoai_finetune.py class AzureOpenAIFinetune (line 32) | class AzureOpenAIFinetune(Algorithm): method __init__ (line 40) | def __init__( method run (line 138) | async def run( # type: ignore method batch_rollout_and_collect_data (line 196) | async def batch_rollout_and_collect_data( method rollout_and_collect_data (line 231) | async def rollout_and_collect_data(self, task: TaskInput, mode: Rollou... method prepare_data_for_training (line 294) | async def prepare_data_for_training( method finetune (line 338) | def finetune(self, training_data: List[Dict[str, Any]], base_model: st... method deploy_finetuned_model (line 414) | def deploy_finetuned_model(self, finetuned_model_id: str, iteration_id... method cleanup_deployments (line 455) | def cleanup_deployments(self) -> None: method _filter_training_data (line 462) | def _filter_training_data(self, data: List[Dict[str, Any]]) -> List[Di... method _wait_for_file_processed (line 493) | def _wait_for_file_processed(self, file_id: str, interval: int = FILE_... method _wait_for_finetuning (line 513) | def _wait_for_finetuning(self, job_id: str, interval: int = FINETUNE_J... method _deploy_model (line 541) | def _deploy_model(self, model_name: str, deployment_name: str, version... method _wait_for_deployment_ready (line 590) | def _wait_for_deployment_ready(self, deployment_name: str, version: st... method _delete_deployment (line 655) | def _delete_deployment(self, deployment_name: str) -> None: method _get_azure_token (line 693) | def _get_azure_token(self) -> str: method _log_info (line 721) | def _log_info(self, message: str, *args: Any, **kwargs: Any) -> None: method _log_debug (line 724) | def _log_debug(self, message: str, *args: Any, **kwargs: Any) -> None: method _log_warning (line 727) | def _log_warning(self, message: str, *args: Any, **kwargs: Any) -> None: method _log_error (line 730) | def _log_error(self, message: str, *args: Any, **kwargs: Any) -> None: FILE: examples/azure/capital_agent.py function country_capital_lookup (line 49) | def country_capital_lookup(country: str) -> str: class CapitalTask (line 53) | class CapitalTask(TypedDict): function capital_agent (line 77) | def capital_agent(task: CapitalTask, llm: LLM) -> float: function main (line 158) | async def main(): FILE: examples/azure/tests/test_deployment.py function test_deployment (line 18) | def test_deployment(): function test_wait_for_deployment_ready (line 26) | def test_wait_for_deployment_ready(): function test_delete_deployment (line 30) | def test_delete_deployment(): FILE: examples/azure/train_capital_agent.py function parse_args (line 15) | def parse_args() -> argparse.Namespace: function main (line 22) | def main(): FILE: examples/calc_x/calc_agent.py class MathProblem (line 20) | class MathProblem(TypedDict): function autogen_assistant_agent (line 39) | def autogen_assistant_agent( function calc_agent (line 66) | async def calc_agent(task: MathProblem, llm: agl.LLM) -> None: function debug (line 108) | async def debug(): FILE: examples/calc_x/eval_utils.py function normalize_option (line 14) | def normalize_option(option: str) -> str: function is_option_result (line 22) | def is_option_result(result: str) -> bool: function float_eval (line 32) | def float_eval(input_str: str) -> float: function scalar_are_results_same (line 39) | def scalar_are_results_same(pred_result: str, true_result: str, rel_tol:... function evaluate (line 63) | async def evaluate(prediction: str, ground_truth: str) -> float: function evaluate_v0_1 (line 68) | async def evaluate_v0_1(prediction: str, ground_truth: str) -> float: FILE: examples/calc_x/legacy_calc_agent.py function autogen_assistant_agent (line 29) | def autogen_assistant_agent( class LegacyCalcAgent (line 55) | class LegacyCalcAgent(LitAgent[Any]): method training_rollout_async (line 58) | async def training_rollout_async(self, task: Any, rollout_id: str, res... method validation_rollout_async (line 85) | async def validation_rollout_async(self, task: Any, rollout_id: str, r... FILE: examples/calc_x/legacy_calc_agent_debug.py function dev_task_loader (line 12) | def dev_task_loader() -> DevTaskLoader: FILE: examples/calc_x/tests/test_agentops.py function process_data (line 10) | def process_data(data: str) -> float: function process_data2 (line 18) | def process_data2(data: str) -> str: FILE: examples/calc_x/tests/test_mcp_calculator.py function main (line 12) | async def main(): FILE: examples/calc_x/train_calc_agent.py function verl_default_config (line 44) | def verl_default_config() -> Dict[str, Any]: function train (line 110) | def train( function main (line 246) | def main(): FILE: examples/chartqa/chartqa_agent.py class ChartState (line 44) | class ChartState(MessagesState): class ChartQAAgent (line 56) | class ChartQAAgent(agl.LitAgent[Dict[str, Any]]): method __init__ (line 63) | def __init__( method _create_llm (line 82) | def _create_llm(self) -> BaseChatModel: method update_llm_config (line 96) | def update_llm_config(self, model_name: str, endpoint: str | None, tem... method _ensure_llm (line 111) | def _ensure_llm(self) -> BaseChatModel: method invoke_prompt (line 117) | def invoke_prompt(self, prompt: Any) -> AnyMessage: method invoke_prompt_with_image (line 134) | def invoke_prompt_with_image(self, prompt_text: str, image_path: str) ... method extract_content (line 175) | def extract_content(self, text: str, tag: str) -> str: method analyze_chart (line 180) | def analyze_chart(self, state: ChartState) -> ChartState: method extract_data (line 198) | def extract_data(self, state: ChartState) -> ChartState: method calculate_answer (line 218) | def calculate_answer(self, state: ChartState) -> ChartState: method check_answer (line 240) | def check_answer(self, state: ChartState) -> ChartState: method refine_answer (line 262) | def refine_answer(self, state: ChartState) -> ChartState: method should_continue (line 295) | def should_continue(self, state: ChartState) -> Literal[END, "refine_a... method graph (line 315) | def graph(self) -> CompiledStateGraph[ChartState]: method rollout (line 341) | def rollout(self, task: Dict[str, Any], resources: agl.NamedResources,... function evaluate_answer (line 382) | def evaluate_answer(predicted: str, ground_truth: str, raise_on_error: b... FILE: examples/chartqa/debug_chartqa_agent.py function create_llm_proxy_for_chartqa (line 41) | def create_llm_proxy_for_chartqa(vllm_endpoint: str, port: int = 8081) -... function debug_chartqa_agent (line 72) | def debug_chartqa_agent(use_llm_proxy: bool = False) -> None: FILE: examples/chartqa/multimodal_utils.py function encode_image_to_base64 (line 27) | def encode_image_to_base64(image: Union[str, Path, PILImage], max_size: ... function create_image_message (line 86) | def create_image_message(text: str, image: Union[str, Path, PILImage], u... FILE: examples/chartqa/prepare_data.py function prepare_chartqa (line 12) | def prepare_chartqa(): FILE: examples/chartqa/train_chartqa_agent.py function config_ci (line 85) | def config_ci() -> Dict[str, Any]: function config_debug (line 110) | def config_debug() -> Dict[str, Any]: function config_qwen (line 119) | def config_qwen() -> Dict[str, Any]: function train (line 129) | def train( function main (line 165) | def main(): FILE: examples/claude_code/claude_code_agent.py function _load_dataset (line 87) | def _load_dataset(path: str, epoch: int = 0, limit: Optional[int] = None... function _flatten_messages (line 100) | def _flatten_messages(messages: List[Any]) -> List[Dict[str, str]]: class ClaudeCodeAgent (line 121) | class ClaudeCodeAgent(LitAgent[SWEbenchInstance]): method __init__ (line 128) | def __init__( method rollout_async (line 161) | async def rollout_async( function sanity_check_spans (line 224) | def sanity_check_spans(spans: Sequence[Span]) -> None: function run_instance_async (line 230) | async def run_instance_async( function dry_run_claude_code (line 312) | async def dry_run_claude_code( FILE: examples/claude_code/claude_code_controller.py class RunInstanceResult (line 40) | class RunInstanceResult(TypedDict): class ClaudeController (line 46) | class ClaudeController: method __init__ (line 57) | def __init__(self, image: str, instance: SWEbenchInstance, run_id: str... method init_container (line 74) | def init_container(self, image: str, instance: SWEbenchInstance) -> Ru... method _run_cli (line 104) | def _run_cli(self, instance: SWEbenchInstance, max_turns: int, time_li... method _run_python_sdk (line 135) | def _run_python_sdk(self, instance: SWEbenchInstance, max_turns: int, ... method run_instance (line 179) | def run_instance( method __del__ (line 224) | def __del__(self) -> None: FILE: examples/claude_code/extended_adapter.py class ExtendedLlmProxyTraceToTriplet (line 20) | class ExtendedLlmProxyTraceToTriplet(LlmProxyTraceToTriplet): method _extract_tokens_from_raw (line 30) | def _extract_tokens_from_raw(self, attrs: Dict[str, Any]) -> Tuple[Lis... method adapt (line 63) | def adapt(self, source: List[Span], /) -> List[Triplet]: # type: ignore FILE: examples/claude_code/swebench_utils/docker_runtime.py class CmdOutputMetadata (line 55) | class CmdOutputMetadata: method matches_ps1_metadata (line 70) | def matches_ps1_metadata(cls, output: str) -> List[re.Match[str]]: method best_effort_match (line 84) | def best_effort_match(cls, scope: str) -> Dict[str, Any]: method from_ps1_match (line 95) | def from_ps1_match(cls, match: re.Match[str]) -> Self: class CommandResult (line 121) | class CommandResult: method to_observation (line 133) | def to_observation(self, strip: bool = True) -> str: class Runtime (line 160) | class Runtime: method __init__ (line 168) | def __init__(self, container: Container, log_function: Callable[..., N... method _stream_output (line 197) | def _stream_output(self): method _start_output_thread (line 211) | def _start_output_thread(self): method _clear_initial_prompt (line 216) | def _clear_initial_prompt(self): method _read_raw_output (line 221) | def _read_raw_output(self, timeout: float = 30) -> tuple[str, Optional... method _combine_outputs_between_matches (line 245) | def _combine_outputs_between_matches(self, pane_content: str, ps1_matc... method _recv_bytes (line 256) | def _recv_bytes(self, n: int = 4096) -> bytes: method _send_bytes (line 268) | def _send_bytes(self, data: bytes) -> None: method _log_command_result (line 281) | def _log_command_result(self, result: CommandResult) -> None: method send_command (line 293) | def send_command(self, command: str, timeout: float = 20 * 60) -> Comm... method cleanup (line 336) | def cleanup(self) -> None: method __del__ (line 349) | def __del__(self): method pull_image (line 353) | def pull_image(image_name: str) -> bool: method start_session (line 371) | def start_session( FILE: examples/claude_code/swebench_utils/evaluation.py function run_instance (line 60) | def run_instance( function evaluate (line 229) | def evaluate( FILE: examples/claude_code/swebench_utils/logging.py function log_for_evaluation (line 13) | def log_for_evaluation(run_id: str, instance_id: str, text: str) -> None: FILE: examples/minimal/llm_proxy.py function serve_llm_proxy_with_vllm (line 39) | async def serve_llm_proxy_with_vllm(model_name: str, store_port: int = 4... function serve_llm_proxy_with_openai (line 78) | async def serve_llm_proxy_with_openai(model_name: str, store_port: int =... function test_llm_proxy (line 114) | async def test_llm_proxy(model_name: str, store_port: int = 43887): function _verify_response_body (line 150) | def _verify_response_body(response_body: dict, model_name: str): function _verify_span (line 192) | def _verify_span(spans: Sequence[agl.Span]): FILE: examples/minimal/vllm_server.py function vllm_server (line 18) | def vllm_server( FILE: examples/minimal/write_metrics.py function _register_metrics (line 38) | def _register_metrics(backend: MetricsBackend) -> None: function _emit_metrics (line 47) | async def _emit_metrics(backend: MetricsBackend, duration: float, operat... function main (line 60) | def main() -> None: FILE: examples/minimal/write_traces.py function send_traces_via_otel (line 48) | async def send_traces_via_otel(use_client: bool = False): function send_traces_via_agentops (line 101) | async def send_traces_via_agentops(use_client: bool = False): function _verify_agentops_traces (line 138) | async def _verify_agentops_traces(spans: Sequence[Span], use_client: boo... function send_operation_links (line 194) | async def send_operation_links(use_client: bool = False) -> None: function _verify_operation_spans (line 241) | def _verify_operation_spans( function main (line 295) | def main(): FILE: examples/rag/metric_utils.py function normalize_answer (line 17) | def normalize_answer(s: str) -> str: function f1_score (line 34) | def f1_score(prediction: str, ground_truth: str) -> Tuple[float, float, ... function lenient_f1_score (line 57) | def lenient_f1_score(prediction: str, ground_truth: str) -> Tuple[float,... function exact_match_score (line 81) | def exact_match_score(prediction: str, ground_truth: str) -> bool: function cover_exact_match_score (line 85) | def cover_exact_match_score(prediction: str, ground_truth: str) -> bool: function extract_answer (line 89) | def extract_answer(response: str) -> str: function split_response (line 102) | def split_response(text: str) -> Tuple[str, str]: function extract_recall_chunk (line 109) | def extract_recall_chunk(prompt: str, response: str) -> Tuple[Set[str], ... function extract_retrieved_paragraphs (line 124) | def extract_retrieved_paragraphs(log_text: str) -> List[str]: function compute_score (line 134) | def compute_score( function compute_reward (line 176) | def compute_reward( function compute_em (line 188) | def compute_em( function compute_cem (line 210) | def compute_cem( function compute_response_cem (line 229) | def compute_response_cem( function compute_lenient_f1 (line 248) | def compute_lenient_f1( function compute_lenient_response_f1 (line 267) | def compute_lenient_response_f1( function fact_checking_api (line 286) | def fact_checking_api(prediction: str, ans: str) -> bool: function compute_f1 (line 290) | def compute_f1( function compute_format (line 309) | def compute_format( function split_trace (line 328) | def split_trace(text: str) -> Tuple[str, str]: function compute_action_query (line 335) | def compute_action_query( function compute_action_bm25 (line 349) | def compute_action_bm25( function compute_action_read_pre (line 363) | def compute_action_read_pre( function compute_action_read_nxt (line 377) | def compute_action_read_nxt( function compute_action_continue (line 391) | def compute_action_continue( function compute_action_match (line 405) | def compute_action_match( function compute_total_action_number (line 419) | def compute_total_action_number( function compute_scores (line 436) | def compute_scores(answer: str, ground_truth: str) -> float: FILE: examples/rag/rag_agent.py class RAGAgent (line 31) | class RAGAgent(agl.LitAgent[Dict[str, Any]]): method __init__ (line 34) | def __init__(self) -> None: method training_rollout_async (line 38) | async def training_rollout_async( method validation_rollout_async (line 82) | async def validation_rollout_async( function debug (line 103) | def debug(): FILE: examples/rag/train_rag.py function config_train_fast (line 89) | def config_train_fast() -> Dict[str, Any]: function config_train_single_gpu (line 120) | def config_train_single_gpu() -> Dict[str, Any]: function train (line 141) | def train(config: Dict[str, Any], active_agent: Optional[str]) -> None: function main (line 169) | def main() -> None: FILE: examples/rag/wiki_retriever_mcp.py function retrieve (line 29) | def retrieve(query: str) -> list: FILE: examples/spider/spider_eval/async_utils.py function run_sync_ephemeral (line 9) | def run_sync_ephemeral(coro: Coroutine[Any, Any, Any]) -> Any: FILE: examples/spider/spider_eval/evaluation.py function condition_has_or (line 63) | def condition_has_or(conds): function condition_has_like (line 67) | def condition_has_like(conds): function condition_has_sql (line 71) | def condition_has_sql(conds): function val_has_op (line 81) | def val_has_op(val_unit): function has_agg (line 85) | def has_agg(unit): function accuracy (line 89) | def accuracy(count, total): function recall (line 95) | def recall(count, total): function F1 (line 101) | def F1(acc, rec): function get_scores (line 107) | def get_scores(count, pred_total, label_total): function eval_sel (line 115) | def eval_sel(pred, label): function eval_where (line 135) | def eval_where(pred, label): function eval_group (line 155) | def eval_group(pred, label): function eval_having (line 170) | def eval_having(pred, label): function eval_order (line 185) | def eval_order(pred, label): function eval_and_or (line 203) | def eval_and_or(pred, label): function get_nestedSQL (line 214) | def get_nestedSQL(sql): function eval_nested (line 230) | def eval_nested(pred, label): function eval_IUEN (line 243) | def eval_IUEN(pred, label): function get_keywords (line 253) | def get_keywords(sql): function eval_keywords (line 294) | def eval_keywords(pred, label): function count_agg (line 307) | def count_agg(units): function count_component1 (line 311) | def count_component1(sql): function count_component2 (line 332) | def count_component2(sql): function count_others (line 337) | def count_others(sql): class Evaluator (line 366) | class Evaluator: method __init__ (line 369) | def __init__(self): method eval_hardness (line 372) | def eval_hardness(self, sql): method eval_exact_match (line 392) | def eval_exact_match(self, pred, label): method eval_partial_match (line 406) | def eval_partial_match(self, pred, label): function isValidSQL (line 454) | def isValidSQL(sql, db): function print_formated_s (line 464) | def print_formated_s(row_name, l, element_format): function print_scores (line 469) | def print_scores(scores, etype, include_turn_acc=True): function evaluate (line 533) | def evaluate(gold, predict, db_dir, etype, kmaps, plug_value, keep_disti... function rebuild_cond_unit_val (line 755) | def rebuild_cond_unit_val(cond_unit): function rebuild_condition_val (line 771) | def rebuild_condition_val(condition): function rebuild_sql_val (line 784) | def rebuild_sql_val(sql): function build_valid_col_units (line 799) | def build_valid_col_units(table_units, schema): function rebuild_col_unit_col (line 809) | def rebuild_col_unit_col(valid_col_units, col_unit, kmap): function rebuild_val_unit_col (line 821) | def rebuild_val_unit_col(valid_col_units, val_unit, kmap): function rebuild_table_unit_col (line 831) | def rebuild_table_unit_col(valid_col_units, table_unit, kmap): function rebuild_cond_unit_col (line 841) | def rebuild_cond_unit_col(valid_col_units, cond_unit, kmap): function rebuild_condition_col (line 850) | def rebuild_condition_col(valid_col_units, condition, kmap): function rebuild_select_col (line 857) | def rebuild_select_col(valid_col_units, sel, kmap): function rebuild_from_col (line 870) | def rebuild_from_col(valid_col_units, from_, kmap): function rebuild_group_by_col (line 881) | def rebuild_group_by_col(valid_col_units, group_by, kmap): function rebuild_order_by_col (line 888) | def rebuild_order_by_col(valid_col_units, order_by, kmap): function rebuild_sql_col (line 897) | def rebuild_sql_col(valid_col_units, sql, kmap): function build_foreign_key_map (line 914) | def build_foreign_key_map(entry): function build_foreign_key_map_from_json (line 954) | def build_foreign_key_map_from_json(table): FILE: examples/spider/spider_eval/exec_eval.py function permute_tuple (line 29) | def permute_tuple(element: Tuple, perm: Tuple) -> Tuple: function unorder_row (line 34) | def unorder_row(row: Tuple) -> Tuple: function quick_rej (line 42) | def quick_rej(result1: List[Tuple], result2: List[Tuple], order_matters:... function multiset_eq (line 52) | def multiset_eq(l1: List, l2: List) -> bool: function get_constraint_permutation (line 65) | def get_constraint_permutation(tab1_sets_by_columns: List[Set], result2:... function result_eq (line 83) | def result_eq(result1: List[Tuple], result2: List[Tuple], order_matters:... function replace_cur_year (line 131) | def replace_cur_year(query: str) -> str: function get_cursor_from_path (line 136) | def get_cursor_from_path(sqlite_path: str): function exec_on_db_ (line 149) | async def exec_on_db_(sqlite_path: str, query: str) -> Tuple[str, Any]: function exec_on_db (line 164) | async def exec_on_db(sqlite_path: str, query: str, process_id: str = "",... function postprocess (line 175) | def postprocess(query: str) -> str: function eval_exec_match (line 187) | def eval_exec_match( FILE: examples/spider/spider_eval/parse.py function tokenize (line 20) | def tokenize(query: str) -> List[Token]: function join_tokens (line 25) | def join_tokens(tokens: List[Token]) -> str: function round_trip_test (line 29) | def round_trip_test(query: str) -> None: function postprocess (line 35) | def postprocess(query: str) -> str: function strip_query (line 42) | def strip_query(query: str) -> Tuple[List[str], List[str]]: function reformat_query (line 92) | def reformat_query(query: str) -> str: function replace_values (line 101) | def replace_values(sql: str) -> Tuple[List[str], Set[str]]: function extract_query_values (line 111) | def extract_query_values(sql: str) -> Tuple[List[str], Set[str]]: function plugin (line 118) | def plugin(query_value_replaced: List[str], values_in_order: List[str]) ... function plugin_all_permutations (line 131) | def plugin_all_permutations(query_value_replaced: List[str], values: Set... function get_all_preds_for_execution (line 140) | def get_all_preds_for_execution(gold: str, pred: str) -> Tuple[int, Iter... function remove_distinct (line 148) | def remove_distinct(s): function extract_all_comparison_from_node (line 153) | def extract_all_comparison_from_node(node: Token) -> List[Comparison]: function extract_all_comparison (line 163) | def extract_all_comparison(query: str) -> List[Comparison]: function extract_toks_from_comparison (line 169) | def extract_toks_from_comparison(comparison_node: Comparison) -> List[To... function extract_info_from_comparison (line 174) | def extract_info_from_comparison(comparison_node: Comparison) -> Dict[st... function extract_all_comparison_from_query (line 203) | def extract_all_comparison_from_query(query: str) -> List[Dict[str, Any]]: function extract_typed_value_in_comparison_from_query (line 208) | def extract_typed_value_in_comparison_from_query(query: str) -> List[Tup... function process_str_value (line 224) | def process_str_value(v: str) -> str: FILE: examples/spider/spider_eval/process_sql.py class Schema (line 53) | class Schema: method __init__ (line 58) | def __init__(self, schema): method schema (line 63) | def schema(self): method idMap (line 67) | def idMap(self): method _map (line 70) | def _map(self, schema): function get_schema (line 85) | def get_schema(db): function get_schema_from_json (line 109) | def get_schema_from_json(fpath): function tokenize (line 122) | def tokenize(string): function scan_alias (line 156) | def scan_alias(toks): function get_tables_with_alias (line 165) | def get_tables_with_alias(schema, toks): function parse_col (line 173) | def parse_col(toks, start_idx, tables_with_alias, schema, default_tables... function parse_col_unit (line 197) | def parse_col_unit(toks, start_idx, tables_with_alias, schema, default_t... function parse_val_unit (line 235) | def parse_val_unit(toks, start_idx, tables_with_alias, schema, default_t... function parse_table_unit (line 260) | def parse_table_unit(toks, start_idx, tables_with_alias, schema): function parse_value (line 276) | def parse_value(toks, start_idx, tables_with_alias, schema, default_tabl... function parse_condition (line 316) | def parse_condition(toks, start_idx, tables_with_alias, schema, default_... function parse_select (line 353) | def parse_select(toks, start_idx, tables_with_alias, schema, default_tab... function parse_from (line 378) | def parse_from(toks, start_idx, tables_with_alias, schema): function parse_where (line 421) | def parse_where(toks, start_idx, tables_with_alias, schema, default_tabl... function parse_group_by (line 433) | def parse_group_by(toks, start_idx, tables_with_alias, schema, default_t... function parse_order_by (line 456) | def parse_order_by(toks, start_idx, tables_with_alias, schema, default_t... function parse_having (line 483) | def parse_having(toks, start_idx, tables_with_alias, schema, default_tab... function parse_limit (line 495) | def parse_limit(toks, start_idx): function parse_sql (line 510) | def parse_sql(toks, start_idx, tables_with_alias, schema): function load_data (line 560) | def load_data(fpath): function get_sql (line 566) | def get_sql(schema, query): function skip_semicolon (line 574) | def skip_semicolon(toks, start_idx): FILE: examples/spider/sql_agent.py class State (line 175) | class State(MessagesState): class SQLAgent (line 185) | class SQLAgent: method __init__ (line 187) | def __init__( method get_table_info (line 228) | def get_table_info(self) -> str: method invoke_prompt (line 243) | def invoke_prompt(self, prompt: Any) -> AnyMessage: method truncate_execution (line 260) | def truncate_execution(self, execution: str) -> str: method parse_query (line 266) | def parse_query(self, message: AnyMessage) -> str | None: method write_query (line 272) | def write_query(self, state: State) -> State: method execute_query (line 292) | def execute_query(self, state: State) -> State: method check_query (line 303) | def check_query(self, state: State) -> State: method rewrite_query (line 323) | def rewrite_query(self, state: State) -> State: method should_continue (line 346) | def should_continue(self, state: State) -> Literal[END, "rewrite_query... method graph (line 366) | def graph(self) -> CompiledStateGraph[State]: function evaluate_query (line 385) | def evaluate_query(query: str, ground_truth: str, database: str, raise_o... class LitSQLAgent (line 417) | class LitSQLAgent(agl.LitAgent[Dict[str, Any]]): method __init__ (line 419) | def __init__( method rollout (line 434) | def rollout( function debug_sql_agent (line 524) | def debug_sql_agent(): FILE: examples/spider/train_sql_agent.py function config_train_fast (line 100) | def config_train_fast() -> Dict[str, Any]: function config_train_qwen (line 133) | def config_train_qwen() -> Dict[str, Any]: function config_train_npu (line 140) | def config_train_npu() -> Dict[str, Any]: function config_train_llama (line 154) | def config_train_llama() -> Dict[str, Any]: function train (line 167) | def train(config: Dict[str, Any], active_agent: Optional[str]) -> None: function main (line 180) | def main() -> None: FILE: examples/tinker/agl_tinker/algo.py class Tinker (line 26) | class Tinker(Algorithm): method __init__ (line 40) | def __init__(self, config: Config) -> None: method run (line 44) | async def run( FILE: examples/tinker/agl_tinker/env.py class AGLDummyEnv (line 37) | class AGLDummyEnv(Env, Generic[T_task]): method __init__ (line 49) | def __init__(self, task: T_task) -> None: method initial_observation (line 57) | async def initial_observation(self) -> tuple[Observation, StopCondition]: method step (line 60) | async def step(self, action: Action) -> StepResult: class AGLDummyEnvGroupBuilder (line 64) | class AGLDummyEnvGroupBuilder(EnvGroupBuilder, Generic[T_task]): method __init__ (line 76) | def __init__(self, task: T_task, num_envs: int) -> None: method make_envs (line 86) | async def make_envs(self) -> Sequence[AGLDummyEnv[T_task]]: class AGLDataset (line 95) | class AGLDataset(RLDataset, Generic[T_task]): method __init__ (line 115) | def __init__( method get_batch (line 153) | def get_batch(self, index: int) -> Sequence[AGLDummyEnvGroupBuilder[T_... method __len__ (line 169) | def __len__(self) -> int: class AGLDatasetBuilder (line 174) | class AGLDatasetBuilder(RLDatasetBuilder, Generic[T_task]): method _read_file (line 207) | def _read_file(self, file: str) -> Dataset[T_task]: method __call__ (line 221) | async def __call__(self) -> tuple[AGLDataset[T_task], AGLDataset[T_tas... FILE: examples/tinker/agl_tinker/llm.py function generate_id (line 42) | def generate_id(prefix: str) -> str: class TinkerLLM (line 54) | class TinkerLLM(CustomLLM): method __init__ (line 76) | def __init__( method update_sampling_client (line 100) | def update_sampling_client(self, sampling_client: tinker.SamplingClien... method _canonicalize_messages (line 108) | def _canonicalize_messages(self, messages: Any) -> List[TinkerMessage]: method _validate_role (line 112) | def _validate_role(self, role: str) -> TypeGuard[Literal["assistant", ... method _parse_tool_call (line 117) | def _parse_tool_call(self, tool_call: TinkerToolCall) -> ChatCompletio... method _get_optional_params (line 127) | def _get_optional_params( method _prepare_model_input (line 148) | def _prepare_model_input(self, **kwargs: Any) -> ModelInput: method _parse_response (line 154) | def _parse_response(self, model_input: ModelInput, response: SampleRes... method acompletion (line 221) | async def acompletion(self, **kwargs: Any) -> ModelResponse: # type: ... method as_model_list (line 245) | def as_model_list(self) -> List[ModelConfig]: method rewrite_litellm_custom_providers (line 260) | def rewrite_litellm_custom_providers(self) -> TinkerLLM: function create_llm_proxy (line 275) | def create_llm_proxy( FILE: examples/tinker/agl_tinker/rollout.py function reconstruct_transitions (line 43) | def reconstruct_transitions(spans: Sequence[Span], adapter: TraceToTripl... function agl_single_rollout (line 110) | async def agl_single_rollout( function do_group_of_group_rollouts (line 178) | async def do_group_of_group_rollouts( function dataset_to_env_group_builders (line 287) | def dataset_to_env_group_builders(dataset: AGLDataset[T_task]) -> list[A... class AGLTestSetEvaluator (line 303) | class AGLTestSetEvaluator(Generic[T_task]): method __init__ (line 312) | def __init__(self, dataset: AGLDataset[T_task], name: str | None = None): method __call__ (line 316) | async def __call__( FILE: examples/tinker/agl_tinker/train.py class Config (line 50) | class Config: function do_sync_training (line 111) | async def do_sync_training( function main_training_loop (line 228) | async def main_training_loop( function main (line 324) | async def main(config: Config) -> None: FILE: examples/tinker/hello.py function _find_available_port (line 54) | def _find_available_port() -> int: function hello (line 66) | def hello(task: str, llm: agl.LLM, rollout: agl.Rollout) -> None: function run_algo (line 99) | def run_algo(): function run_rollout (line 124) | def run_rollout(*, worker_id: int) -> None: function spawn_runners (line 137) | def spawn_runners(*, n_runners: int) -> None: function oneclick (line 154) | def oneclick(ci: bool = False): function main (line 207) | def main(): FILE: examples/tinker/q20_agent.py class AnswererResponse (line 28) | class AnswererResponse(BaseModel): class SearchToolInput (line 130) | class SearchToolInput(BaseModel): class SearchTool (line 139) | class SearchTool(BaseTool): method _run (line 151) | def _run(self, search_query: str) -> str: class Turn (line 182) | class Turn(BaseModel): class TwentyQuestionsGameState (line 194) | class TwentyQuestionsGameState(BaseModel): method render_history (line 215) | def render_history(self) -> str: class TwentyQuestionsFlow (line 229) | class TwentyQuestionsFlow(Flow[TwentyQuestionsGameState]): method __init__ (line 235) | def __init__(self, *args: Any, **kwargs: Any): method ask_question (line 248) | def ask_question(self): method answer_question (line 276) | def answer_question(self): method game_should_continue (line 298) | def game_should_continue(self): method finish (line 318) | def finish(self): FILE: examples/tinker/q20_evaluate.py function evaluate_q20 (line 53) | async def evaluate_q20( function main (line 194) | def main(argv: Optional[List[str]] = None) -> None: FILE: examples/tinker/q20_train.py function _find_available_port (line 54) | def _find_available_port() -> int: class Q20Task (line 65) | class Q20Task(TypedDict): function q20_agent (line 85) | async def q20_agent(task: Q20Task, llm: agl.LLM, rollout: agl.Rollout) -... function dry_run (line 131) | def dry_run(model: Literal["qwen4b", "qwen30b"]): function algo (line 159) | async def algo(search: bool, model: Literal["qwen4b", "qwen30b"], port: ... function algo_verl (line 225) | def algo_verl(search: bool, model: Literal["qwen25", "qwen3"], port: int): function runner (line 318) | def runner(port: int = 4747, n_runners: int = 2): function _run_dryrun (line 335) | def _run_dryrun(args: argparse.Namespace) -> None: function _run_algo (line 339) | def _run_algo(args: argparse.Namespace) -> None: function _run_runner (line 343) | def _run_runner(args: argparse.Namespace) -> None: function _run_algo_verl (line 347) | def _run_algo_verl(args: argparse.Namespace) -> None: function main (line 351) | def main() -> None: FILE: examples/tinker/tests/test_tinker_llm.py function _run_tool_call_roundtrip (line 50) | def _run_tool_call_roundtrip(client: openai.OpenAI, *, model_name: str) ... function _run_text_completion (line 107) | def _run_text_completion(client: openai.OpenAI, *, model_name: str) -> N... function _run_tracer_test (line 120) | async def _run_tracer_test(*, use_tool_call: bool) -> None: function test_tracer_text_only (line 188) | async def test_tracer_text_only(): function test_tracer_tool_call (line 192) | async def test_tracer_tool_call(): function test_tracer (line 196) | async def test_tracer(): function test_llm_proxy (line 200) | async def test_llm_proxy(): FILE: examples/unsloth/math_agent.py class GsmProblem (line 39) | class GsmProblem(TypedDict): function _download_dataset (line 53) | def _download_dataset() -> None: # pyright: ignore[reportUnusedFunction] function load_math_dataset (line 69) | def load_math_dataset(limit: Optional[int] = None) -> Dataset[GsmProblem]: function math_agent (line 86) | async def math_agent(task: GsmProblem, llm: LLM) -> float: function compute_reward (line 128) | def compute_reward(result: Any, target: float) -> float: function math_agent_dry_run (line 155) | def math_agent_dry_run() -> None: FILE: examples/unsloth/sft_algorithm.py class HuggingFaceDatasetRecord (line 44) | class HuggingFaceDatasetRecord(TypedDict): function vllm_server (line 61) | def vllm_server( function sft_one_iter (line 135) | async def sft_one_iter( function sft_algorithm (line 332) | async def sft_algorithm(*, store: LightningStore) -> None: FILE: examples/unsloth/sft_allinone.py class UnslothSupervisedFinetuning (line 29) | class UnslothSupervisedFinetuning(Algorithm): method __init__ (line 45) | def __init__(self, *, max_iterations: int, vllm_port: int, train_tripl... method run (line 52) | async def run( FILE: examples/unsloth/sft_rollout_runners.py function run_rollout (line 28) | def run_rollout(*, store: LightningStore, worker_id: int) -> None: function spawn_runners (line 47) | def spawn_runners(*, store: LightningStore, n_runners: int) -> None: FILE: examples/unsloth/unsloth_helper.py function unsloth_training (line 17) | def unsloth_training(model_path: str, sft_dataset: HuggingFaceDataset, n... FILE: scripts/badge_aggregation.js function listAllJobsForAttempt (line 37) | async function listAllJobsForAttempt(run_id, attempt_number) { FILE: scripts/check_headers.py function iter_source_files (line 33) | def iter_source_files() -> list[Path]: function main (line 57) | def main() -> int: FILE: scripts/cleanup_aoai.py function _client (line 18) | def _client() -> OpenAI: function list_data_files (line 25) | def list_data_files(): function list_finetune_jobs (line 30) | def list_finetune_jobs(): function delete_data_file (line 35) | def delete_data_file(file_id: str): function cancel_finetune_job (line 40) | def cancel_finetune_job(job_id: str): function delete_finetune_job (line 45) | def delete_finetune_job(job_id: str): FILE: scripts/export_openapi.py function main (line 15) | async def main(): FILE: scripts/litellm_sanity_check.py function main (line 10) | def main() -> None: FILE: scripts/validate_example_wandb.py function parse_args (line 9) | def parse_args(): FILE: scripts/wandb_download_result.py function parse_args (line 22) | def parse_args() -> argparse.Namespace: function fetch_runs (line 74) | def fetch_runs(api: wandb.Api, entity: str, project: str, run_names: Lis... function aggregate_history (line 95) | def aggregate_history(df: pd.DataFrame, metrics: List[str], step: int) -... function build_chartjs (line 121) | def build_chartjs( function main (line 171) | def main(): FILE: tests/adapter/test_llm_proxy.py function _mk_span (line 10) | def _mk_span( function _raw_attrs_with_tokens (line 34) | def _raw_attrs_with_tokens( function _agentops_reward_attrs (line 51) | def _agentops_reward_attrs(value: float): function test_sequence_matching_assigns_reward_to_latest_prior_llm (line 60) | def test_sequence_matching_assigns_reward_to_latest_prior_llm(): function test_deduplicates_same_response_id_from_raw_spans (line 121) | def test_deduplicates_same_response_id_from_raw_spans(): function test_ignores_litellm_request_without_token_ids (line 164) | def test_ignores_litellm_request_without_token_ids(): function test_reward_none (line 198) | def test_reward_none(): function test_rewards_before_or_equal_sequence_are_skipped (line 222) | def test_rewards_before_or_equal_sequence_are_skipped(): function test_multiple_rewards_attach_to_latest_unmatched_llm_calls (line 275) | def test_multiple_rewards_attach_to_latest_unmatched_llm_calls(): FILE: tests/adapter/test_messages_adapter.py function make_span (line 14) | def make_span( function test_trace_messages_adapter_builds_expected_conversations (line 49) | def test_trace_messages_adapter_builds_expected_conversations(): function test_trace_messages_adapter_handles_multiple_tool_calls (line 212) | def test_trace_messages_adapter_handles_multiple_tool_calls(): FILE: tests/adapter/test_triplet_trace_tree.py function qwen_multimodal_attrs (line 17) | def qwen_multimodal_attrs(response_id: str) -> Dict[str, Any]: function gpt_multimodal_attrs (line 48) | def gpt_multimodal_attrs(response_id: str) -> Dict[str, Any]: function make_span (line 94) | def make_span( function make_llm_span (line 117) | def make_llm_span( function reward_attributes (line 146) | def reward_attributes(value: float) -> Dict[str, Any]: function make_trace_tree_root (line 152) | def make_trace_tree_root() -> TraceTree: function test_trace_tree_from_spans_orders_children_and_agent_names (line 164) | def test_trace_tree_from_spans_orders_children_and_agent_names(): function test_trace_tree_virtual_root_for_multiple_roots (line 193) | def test_trace_tree_virtual_root_for_multiple_roots(): function test_trace_tree_handles_missing_parent_and_empty_input (line 206) | def test_trace_tree_handles_missing_parent_and_empty_input(): function test_trace_tree_repair_hierarchy_moves_llm_span_under_agent (line 237) | def test_trace_tree_repair_hierarchy_moves_llm_span_under_agent(): function test_trace_tree_to_trajectory_skips_empty_and_dedupes_llm_calls (line 268) | def test_trace_tree_to_trajectory_skips_empty_and_dedupes_llm_calls(): function test_tracer_trace_to_triplet_repair_required_for_agent_filter (line 339) | def test_tracer_trace_to_triplet_repair_required_for_agent_filter(): function test_tracer_trace_to_triplet_dedup_and_skip_empty_token_spans (line 378) | def test_tracer_trace_to_triplet_dedup_and_skip_empty_token_spans(): function test_trace_tree_find_llm_calls_dedupes_across_agents (line 435) | def test_trace_tree_find_llm_calls_dedupes_across_agents(): function test_tracer_trace_to_triplet_handles_multimodal_payloads (line 485) | def test_tracer_trace_to_triplet_handles_multimodal_payloads(): function test_extract_prompt_image_urls_from_list_payload (line 573) | def test_extract_prompt_image_urls_from_list_payload(): function test_tracer_trace_to_triplet_reward_match_first_sibling (line 601) | def test_tracer_trace_to_triplet_reward_match_first_sibling(): function test_extract_prompt_image_urls_handles_numeric_dict_keys (line 665) | def test_extract_prompt_image_urls_handles_numeric_dict_keys(): function test_extract_prompt_image_urls_gracefully_handles_invalid_payloads (line 689) | def test_extract_prompt_image_urls_gracefully_handles_invalid_payloads(): FILE: tests/algorithm/test_apo.py class DummyTraceMessagesAdapter (line 30) | class DummyTraceMessagesAdapter(TraceToMessages): method __init__ (line 31) | def __init__(self) -> None: method adapt (line 35) | def adapt(self, source: Sequence[Span], /) -> List[Dict[str, Any]]: #... class WrongAdapter (line 40) | class WrongAdapter(TraceAdapter[List[int]]): method adapt (line 41) | def adapt(self, source: Sequence[Span], /) -> List[int]: class DummyStore (line 45) | class DummyStore: method __init__ (line 46) | def __init__(self) -> None: method update_resources (line 54) | async def update_resources(self, resources_id: str, resources: NamedRe... method enqueue_rollout (line 60) | async def enqueue_rollout( method wait_for_rollouts (line 76) | async def wait_for_rollouts(self, rollout_ids: Sequence[str], timeout:... method query_spans (line 82) | async def query_spans( function make_completion (line 91) | def make_completion(content: str | None) -> Mock: function make_openai_client (line 102) | def make_openai_client(create_mock: AsyncMock) -> Mock: function make_reward_span (line 113) | def make_reward_span(rollout_id: str, attempt_id: str, reward: float, se... function test_batch_iter_over_dataset_returns_full_dataset (line 136) | def test_batch_iter_over_dataset_returns_full_dataset(monkeypatch: pytes... function test_batch_iter_over_dataset_cycles_batches (line 150) | def test_batch_iter_over_dataset_cycles_batches(monkeypatch: pytest.Monk... function test_apo_init_sets_configuration (line 169) | def test_apo_init_sets_configuration() -> None: function test_get_seed_prompt_template_returns_prompt (line 201) | def test_get_seed_prompt_template_returns_prompt() -> None: function test_get_seed_prompt_template_requires_resources (line 217) | def test_get_seed_prompt_template_requires_resources() -> None: function test_get_seed_prompt_template_requires_prompt_resource (line 225) | def test_get_seed_prompt_template_requires_prompt_resource() -> None: function test_get_adapter_returns_trace_messages_adapter (line 234) | def test_get_adapter_returns_trace_messages_adapter() -> None: function test_get_adapter_requires_trace_messages_adapter (line 243) | def test_get_adapter_requires_trace_messages_adapter() -> None: function test_get_best_prompt_requires_history (line 252) | def test_get_best_prompt_requires_history() -> None: function test_get_best_prompt_returns_prompt (line 259) | def test_get_best_prompt_returns_prompt() -> None: function test_compute_textual_gradient_samples_batch (line 268) | async def test_compute_textual_gradient_samples_batch(monkeypatch: pytes... function test_compute_textual_gradient_uses_all_rollouts_when_insufficient (line 296) | async def test_compute_textual_gradient_uses_all_rollouts_when_insuffici... function test_textual_gradient_and_apply_edit_returns_new_prompt (line 315) | async def test_textual_gradient_and_apply_edit_returns_new_prompt(monkey... function test_textual_gradient_and_apply_edit_returns_original_if_no_critique (line 369) | async def test_textual_gradient_and_apply_edit_returns_original_if_no_cr... function test_get_rollout_results_adapts_spans (line 392) | async def test_get_rollout_results_adapts_spans() -> None: function test_evaluate_prompt_on_batch_runs_rollouts (line 433) | async def test_evaluate_prompt_on_batch_runs_rollouts() -> None: function test_initialize_beam_sets_history (line 504) | def test_initialize_beam_sets_history(monkeypatch: pytest.MonkeyPatch) -... function test_initialize_beam_requires_train_dataset (line 524) | def test_initialize_beam_requires_train_dataset() -> None: function test_initialize_beam_requires_val_dataset (line 532) | def test_initialize_beam_requires_val_dataset() -> None: function test_sample_parent_prompts_replicates_when_beam_too_small (line 540) | def test_sample_parent_prompts_replicates_when_beam_too_small(monkeypatc... function test_sample_parent_prompts_uses_random_sample (line 552) | def test_sample_parent_prompts_uses_random_sample(monkeypatch: pytest.Mo... function test_generate_candidate_prompts_creates_branch_factor_children (line 566) | async def test_generate_candidate_prompts_creates_branch_factor_children... function test_generate_candidate_prompts_skips_failed_generations (line 624) | async def test_generate_candidate_prompts_skips_failed_generations() -> ... function test_evaluate_and_select_beam_sorts_by_score (line 674) | async def test_evaluate_and_select_beam_sorts_by_score() -> None: function test_evaluate_and_select_beam_raises_on_empty_candidates (line 702) | async def test_evaluate_and_select_beam_raises_on_empty_candidates() -> ... function test_update_best_prompt_updates_history (line 716) | async def test_update_best_prompt_updates_history() -> None: function test_update_best_prompt_keeps_history_when_not_improved (line 733) | async def test_update_best_prompt_keeps_history_when_not_improved() -> N... function test_apo_init_defaults_run_initial_validation_to_true (line 749) | def test_apo_init_defaults_run_initial_validation_to_true() -> None: function test_run_performs_initial_validation_when_enabled (line 758) | async def test_run_performs_initial_validation_when_enabled(monkeypatch:... function test_run_skips_initial_validation_when_disabled (line 807) | async def test_run_skips_initial_validation_when_disabled(monkeypatch: p... function test_run_updates_best_prompt_with_real_openai_client (line 866) | async def test_run_updates_best_prompt_with_real_openai_client(monkeypat... FILE: tests/algorithm/test_baseline.py class _AdapterStub (line 26) | class _AdapterStub(TraceAdapter[Dict[str, Any]]): method adapt (line 27) | def adapt(self, source: Sequence[Span], /) -> Dict[str, Any]: class _RolloutArtifacts (line 35) | class _RolloutArtifacts: function _make_resources (line 42) | def _make_resources() -> NamedResources: function _build_span (line 48) | def _build_span(rollout_id: str, attempt_id: str, *, sequence_id: int, i... function _mock_runner (line 72) | async def _mock_runner( function test_mock_algorithm_collects_rollout_logs (line 112) | async def test_mock_algorithm_collects_rollout_logs(caplog: pytest.LogCa... function test_baseline_does_not_skip_samples_when_queue_full (line 164) | async def test_baseline_does_not_skip_samples_when_queue_full() -> None: FILE: tests/algorithm/test_decorator.py function sample_algorithm_func (line 17) | def sample_algorithm_func(*, train_dataset: Optional[Dataset[Any]], val_... function test_algorithm_preserves_executability (line 24) | def test_algorithm_preserves_executability(): function test_algorithm_preserves_metadata (line 40) | def test_algorithm_preserves_metadata(): function test_algorithm_returns_functional_algorithm_instance (line 49) | def test_algorithm_returns_functional_algorithm_instance(): function test_algorithm_preserves_signature (line 59) | def test_algorithm_preserves_signature(): function test_algorithm_run_method (line 68) | def test_algorithm_run_method(): function test_algorithm_callable_shortcut (line 92) | def test_algorithm_callable_shortcut(): function test_async_function_with_algorithm (line 109) | async def test_async_function_with_algorithm(): function test_async_algorithm_run_method (line 132) | async def test_async_algorithm_run_method(): function test_algorithm_with_none_datasets (line 160) | def test_algorithm_with_none_datasets(): function test_multiple_algorithm_instances (line 177) | def test_multiple_algorithm_instances(): function test_algorithm_base_algorithm_methods (line 201) | def test_algorithm_base_algorithm_methods(): function test_algorithm_without_datasets (line 225) | def test_algorithm_without_datasets(): function test_algorithm_raises_error_on_unsupported_train_dataset (line 247) | def test_algorithm_raises_error_on_unsupported_train_dataset(): function test_algorithm_raises_error_on_unsupported_val_dataset (line 260) | def test_algorithm_raises_error_on_unsupported_val_dataset(): function test_algorithm_with_all_injected_parameters (line 273) | def test_algorithm_with_all_injected_parameters(): function test_algorithm_with_only_store (line 320) | def test_algorithm_with_only_store(): function test_async_algorithm_with_injected_parameters (line 342) | async def test_async_algorithm_with_injected_parameters(): FILE: tests/algorithm/test_utils.py class _BaseAlgorithm (line 16) | class _BaseAlgorithm(Algorithm): method run (line 17) | def run(self, *args: Any, **kwargs: Any) -> None: class _StubLLMProxy (line 22) | class _StubLLMProxy: method __init__ (line 25) | def __init__(self) -> None: method is_running (line 30) | def is_running(self) -> bool: method start (line 33) | async def start(self) -> None: method stop (line 37) | async def stop(self) -> None: function test_with_store_injects_store_argument (line 43) | async def test_with_store_injects_store_argument(): function test_with_llm_proxy_allows_optional_injection (line 61) | async def test_with_llm_proxy_allows_optional_injection(): function test_with_llm_proxy_required_raises_when_missing (line 78) | async def test_with_llm_proxy_required_raises_when_missing(): function test_with_llm_proxy_auto_start_and_stop (line 92) | async def test_with_llm_proxy_auto_start_and_stop(): FILE: tests/benchmark/analysis.py class PrometheusQueryError (line 16) | class PrometheusQueryError(RuntimeError): class PrometheusClient (line 20) | class PrometheusClient: method __init__ (line 23) | def __init__( method query_vector (line 33) | def query_vector(self, expr: str, eval_time: Optional[dt.datetime] = N... method query_scalar (line 84) | def query_scalar(self, expr: str, eval_time: Optional[dt.datetime] = N... method _get (line 90) | def _get(self, path: str, data: Optional[Mapping[str, str]] = None) ->... function parse_args (line 105) | def parse_args(argv: Optional[Sequence[str]] = None) -> argparse.Namespace: function parse_timestamp (line 125) | def parse_timestamp(value: Optional[str], default: Optional[dt.datetime]... function parse_duration (line 136) | def parse_duration(text: str) -> dt.timedelta: function format_window (line 150) | def format_window(seconds: float) -> str: function clamp_window_seconds (line 155) | def clamp_window_seconds(duration_seconds: float) -> int: function compute_peak_window (line 159) | def compute_peak_window(duration_seconds: float) -> str: function compute_subquery_step (line 164) | def compute_subquery_step(duration_seconds: float) -> str: function _sample_value (line 170) | def _sample_value(sample: Mapping[str, object]) -> Optional[float]: function vector_to_map (line 188) | def vector_to_map( function _normalize_label_value (line 211) | def _normalize_label_value(value: Any) -> str: function vector_to_labeled_map (line 218) | def vector_to_labeled_map( function sum_by_clause (line 241) | def sum_by_clause(labels: Sequence[str]) -> str: function histogram_sum_by_clause (line 248) | def histogram_sum_by_clause(labels: Sequence[str]) -> str: function histogram_sum_metric_name (line 254) | def histogram_sum_metric_name(bucket_metric: str) -> str: function histogram_count_metric_name (line 260) | def histogram_count_metric_name(bucket_metric: str) -> str: function divide_or_none (line 266) | def divide_or_none(numerator: Optional[float], denominator: Optional[flo... function compute_average_time_map (line 274) | def compute_average_time_map( function safe_vector (line 287) | def safe_vector(client: PrometheusClient, expr: str) -> Optional[List[Ma... function safe_scalar (line 295) | def safe_scalar(client: PrometheusClient, expr: str) -> Optional[float]: function fetch_store_statistics (line 303) | def fetch_store_statistics(store_url: str, timeout: float) -> Optional[D... class CollectionThroughput (line 325) | class CollectionThroughput: class MetricRow (line 332) | class MetricRow: class MetricGroupSpec (line 351) | class MetricGroupSpec: function metric_row_sort_key (line 361) | def metric_row_sort_key(row: MetricRow) -> Tuple[str, ...]: function _coerce_int (line 375) | def _coerce_int(value: Any) -> Optional[int]: function extract_store_totals (line 395) | def extract_store_totals(stats: Optional[Mapping[str, Any]]) -> Dict[str... function gather_collection_throughput (line 407) | def gather_collection_throughput( function gather_metric_group (line 427) | def gather_metric_group( function gather_diagnostics (line 599) | def gather_diagnostics(client: PrometheusClient, window: str) -> Dict[st... function render_table (line 688) | def render_table(headers: Sequence[str], rows: Sequence[Sequence[str]]) ... function fmt_rate (line 708) | def fmt_rate(value: Optional[float]) -> str: function fmt_latency (line 714) | def fmt_latency(value: Optional[float]) -> str: function fmt_bytes (line 722) | def fmt_bytes(value: Optional[float]) -> str: function fmt_percentage (line 734) | def fmt_percentage(value: Optional[float]) -> str: function section (line 740) | def section(title: str, body: Iterable[str]) -> List[str]: function render_metric_group_table (line 747) | def render_metric_group_table( function make_time_share_column (line 801) | def make_time_share_column( function main (line 826) | def main(argv: Optional[Sequence[str]] = None) -> None: FILE: tests/benchmark/benchmark_store.py class RolloutProgressTracker (line 28) | class RolloutProgressTracker: method __init__ (line 31) | def __init__(self, max_stale_seconds: float = MAX_STALE_SECONDS) -> None: method record_progress (line 35) | def record_progress(self) -> None: method handle_progress (line 38) | async def handle_progress( method _check_for_stale (line 50) | async def _check_for_stale(self, *, pending_rollout_ids: Sequence[str]... function _abort_due_to_timeout (line 65) | def _abort_due_to_timeout() -> None: function _start_timeout_guard (line 71) | def _start_timeout_guard(timeout_seconds: float) -> threading.Timer: function generate_attributes (line 78) | def generate_attributes() -> Dict[str, Any]: function make_agent (line 89) | def make_agent(max_rounds: int, sleep_seconds: float) -> agl.LitAgent[str]: function check_spans (line 123) | def check_spans(spans: Sequence[agl.Span], task: str) -> None: class AlgorithmBatch (line 136) | class AlgorithmBatch(agl.Algorithm): method __init__ (line 137) | def __init__( method run (line 151) | async def run( method algorithm_batch (line 169) | async def algorithm_batch(self, total_tasks: int, batch_size: int): method algorithm_batch_with_completion_threshold (line 228) | async def algorithm_batch_with_completion_threshold(self, total_tasks:... method algorithm_batch_single (line 285) | async def algorithm_batch_single(self, total_tasks: int, concurrency: ... function parse_args (line 343) | def parse_args(argv: Optional[Sequence[str]] = None) -> argparse.Namespace: function main (line 386) | def main(argv: Optional[Sequence[str]] = None) -> None: FILE: tests/benchmark/collection_benchmark.py class WorkerResult (line 41) | class WorkerResult: class BenchmarkResult (line 47) | class BenchmarkResult: method to_dict (line 65) | def to_dict(self) -> Dict[str, Any]: function parse_args (line 69) | def parse_args(argv: Sequence[str] | None = None) -> argparse.Namespace: function _percentile (line 84) | def _percentile(values: Sequence[float], percentile: float) -> float: function _aggregate_results (line 97) | def _aggregate_results( function _render_results (line 132) | def _render_results(results: Sequence[BenchmarkResult]) -> None: function _write_summary (line 161) | def _write_summary(results: Sequence[BenchmarkResult], file_path: Path) ... function _make_rollout (line 168) | def _make_rollout(worker_index: int, sequence: int, task_prefix: str) ->... function _preload_queue (line 184) | async def _preload_queue(collections: LightningCollections, total_tasks:... function _reset_mongo_database (line 197) | async def _reset_mongo_database(uri: str, database: str) -> None: class BaseBenchmark (line 205) | class BaseBenchmark: method __init__ (line 208) | def __init__( method run (line 218) | def run(self) -> BenchmarkResult: method spawn_workers (line 233) | def spawn_workers( method worker_entrypoint (line 239) | def worker_entrypoint(self, worker_index: int, task_queue: Any, start_... method worker_context (line 262) | def worker_context(self, *args: Any, **kwargs: Any) -> AsyncContextMan... method setup (line 266) | async def setup(self) -> None: class MemoryBenchmark (line 273) | class MemoryBenchmark(BaseBenchmark): method __init__ (line 275) | def __init__( method spawn_workers (line 293) | def spawn_workers( method worker_context (line 317) | async def worker_context(self, *args: Any, **kwargs: Any): class MongoBenchmark (line 321) | class MongoBenchmark(BaseBenchmark): method __init__ (line 322) | def __init__( method setup (line 344) | async def setup(self) -> None: method worker_context (line 349) | async def worker_context(self): method spawn_workers (line 363) | def spawn_workers( function _process_worker_target (line 401) | def _process_worker_target( function insert_worker_async (line 417) | async def insert_worker_async( function dequeue_worker_async (line 444) | async def dequeue_worker_async( function run_benchmark (line 473) | def run_benchmark(args: argparse.Namespace, benchmark_kind: str) -> Benc... function main (line 490) | def main(argv: Sequence[str] | None = None) -> None: FILE: tests/benchmark/micro_benchmark.py function _enqueue_rollouts_for_benchmark (line 27) | async def _enqueue_rollouts_for_benchmark(store_url: str, *, total_rollo... function _close_store_client (line 39) | def _close_store_client(store: agl.LightningStoreClient) -> None: function _make_span (line 46) | def _make_span(rollout_id: str, attempt_id: str, sequence_id: int, name:... class BenchmarkSummary (line 77) | class BenchmarkSummary: method success_rate (line 84) | def success_rate(self) -> float: method throughput (line 90) | def throughput(self) -> float: function parse_args (line 96) | def parse_args(argv: Optional[Sequence[str]] = None) -> argparse.Namespace: function _update_worker_task (line 109) | def _update_worker_task(args: tuple[str, str, str]) -> bool: function simulate_many_update_workers (line 123) | def simulate_many_update_workers(store_url: str) -> BenchmarkSummary: function _dequeue_empty_and_update_workers_task (line 143) | def _dequeue_empty_and_update_workers_task(args: tuple[str, str, str]) -... function simulate_dequeue_empty_and_update_workers (line 162) | def simulate_dequeue_empty_and_update_workers(store_url: str) -> Benchma... function _rollout_flow_task (line 182) | def _rollout_flow_task(args: tuple[str, int, int]) -> bool: function simulate_rollout_with_spans (line 214) | def simulate_rollout_with_spans(store_url: str, spans_per_attempt: int =... function _dequeue_only_task (line 233) | def _dequeue_only_task(args: tuple[str, str, str]) -> bool: function dequeue_rollouts (line 254) | def dequeue_rollouts(store_url: str) -> BenchmarkSummary: function _dequeue_and_update_attempt_task (line 294) | def _dequeue_and_update_attempt_task(args: tuple[str, str, str, int]) ->... function dequeue_and_update_attempts (line 349) | def dequeue_and_update_attempts(store_url: str, spans_per_attempt: int =... function benchmark_multi_metrics_backend (line 381) | def benchmark_multi_metrics_backend(iterations: int = 10_000_000) -> Ben... function record_summary (line 421) | def record_summary(summary: BenchmarkSummary, summary_file: Optional[str... function main (line 435) | def main(argv: Optional[Sequence[str]] = None) -> None: FILE: tests/benchmark/utils.py function random_string (line 10) | def random_string(length: int, *, alphabet: Optional[str] = None) -> str: function _resolve_param (line 25) | def _resolve_param(value: Union[int, Tuple[int, int]], name: str) -> int: function default_value_factory (line 52) | def default_value_factory(length: int) -> str: function random_dict (line 57) | def random_dict( function flatten_dict (line 110) | def flatten_dict(d: Dict[str, Any], prefix: str = "") -> Dict[str, Any]: FILE: tests/common/network.py function get_free_port (line 7) | def get_free_port() -> int: FILE: tests/common/prometheus_stub.py class _CounterChild (line 9) | class _CounterChild: method __init__ (line 10) | def __init__(self) -> None: method inc (line 13) | def inc(self, amount: float = 1.0) -> None: class _HistogramChild (line 17) | class _HistogramChild: method __init__ (line 18) | def __init__(self) -> None: method observe (line 21) | def observe(self, value: float) -> None: class PrometheusStub (line 25) | class PrometheusStub(types.ModuleType): method __init__ (line 28) | def __init__(self, real_client: Any) -> None: method _make_asgi_app (line 52) | def _make_asgi_app(self, *args: Any, **kwargs: Any) -> Any: class _PromCounterFactory (line 56) | class _PromCounterFactory: method __init__ (line 57) | def __init__(self, owner: PrometheusStub) -> None: method __call__ (line 60) | def __call__(self, name: str, doc: str, labelnames: Sequence[str]) -> ... class _PromHistogramFactory (line 66) | class _PromHistogramFactory: method __init__ (line 67) | def __init__(self, owner: PrometheusStub) -> None: method __call__ (line 70) | def __call__( class _PromCounter (line 82) | class _PromCounter: method __init__ (line 83) | def __init__(self, name: str, doc: str, labelnames: Sequence[str]) -> ... method _register (line 90) | def _register(self, sink: List["_PromCounter"]) -> None: method labels (line 93) | def labels(self, **kwargs: str) -> _CounterChild: method inc (line 97) | def inc(self, amount: float = 1.0) -> None: class _PromHistogram (line 101) | class _PromHistogram: method __init__ (line 102) | def __init__(self, name: str, doc: str, labelnames: Sequence[str], buc... method _register (line 110) | def _register(self, sink: List["_PromHistogram"]) -> None: method labels (line 113) | def labels(self, **kwargs: str) -> _HistogramChild: method observe (line 117) | def observe(self, value: float) -> None: function make_prometheus_stub (line 121) | def make_prometheus_stub() -> PrometheusStub: FILE: tests/common/tracer.py function clear_tracer_provider (line 16) | def clear_tracer_provider() -> None: function clear_agentops_init (line 39) | def clear_agentops_init() -> None: class RecordingDummyTracer (line 45) | class RecordingDummyTracer(DummyTracer): method __init__ (line 48) | def __init__(self) -> None: method create_span (line 52) | def create_span( FILE: tests/common/vllm.py class RemoteOpenAIServer (line 33) | class RemoteOpenAIServer: method _start_server (line 61) | def _start_server(self, model: str, vllm_serve_args: list[str], env_di... method __init__ (line 85) | def __init__( method __enter__ (line 126) | def __enter__(self): method __exit__ (line 129) | def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any): method _poll (line 136) | def _poll(self) -> Optional[int]: method _wait_for_server (line 140) | def _wait_for_server(self, *, url: str, timeout: float): method url_root (line 157) | def url_root(self) -> str: method url_for (line 160) | def url_for(self, *parts: str) -> str: method get_client (line 163) | def get_client(self, **kwargs: Any): method get_async_client (line 173) | def get_async_client(self, **kwargs: Any): FILE: tests/emitter/test_annotation.py function _install_tracer (line 16) | def _install_tracer(monkeypatch: pytest.MonkeyPatch) -> RecordingDummyTr... function test_emit_annotation_flattens_and_sanitizes_attributes (line 22) | def test_emit_annotation_flattens_and_sanitizes_attributes(monkeypatch: ... function test_emit_annotation_propagate_false_bypasses_active_tracer (line 32) | def test_emit_annotation_propagate_false_bypasses_active_tracer(monkeypa... function test_emit_annotation_rejects_non_primitive_values (line 47) | def test_emit_annotation_rejects_non_primitive_values() -> None: FILE: tests/emitter/test_exception.py function _install_tracer (line 15) | def _install_tracer(monkeypatch: pytest.MonkeyPatch) -> RecordingDummyTr... function test_emit_exception_records_exception (line 21) | def test_emit_exception_records_exception(monkeypatch: pytest.MonkeyPatc... function test_emit_exception_requires_exception_instance (line 34) | def test_emit_exception_requires_exception_instance() -> None: function test_emit_exception_flattens_attributes (line 39) | def test_emit_exception_flattens_attributes(monkeypatch: pytest.MonkeyPa... function test_emit_exception_propagate_false (line 49) | def test_emit_exception_propagate_false(monkeypatch: pytest.MonkeyPatch)... FILE: tests/emitter/test_message.py class FakeSpan (line 20) | class FakeSpan: function _stub_tracer (line 24) | def _stub_tracer(monkeypatch: pytest.MonkeyPatch) -> RecordingDummyTracer: function test_get_message_value_returns_string (line 30) | def test_get_message_value_returns_string() -> None: function test_get_message_value_returns_none_when_missing (line 36) | def test_get_message_value_returns_none_when_missing() -> None: function test_get_message_value_rejects_non_string (line 42) | def test_get_message_value_rejects_non_string() -> None: function test_emit_message_valid (line 49) | def test_emit_message_valid(monkeypatch: pytest.MonkeyPatch) -> None: function test_emit_message_requires_string (line 59) | def test_emit_message_requires_string() -> None: function test_emit_message_flattens_attributes (line 64) | def test_emit_message_flattens_attributes(monkeypatch: pytest.MonkeyPatc... function test_emit_message_propagate_false (line 74) | def test_emit_message_propagate_false(monkeypatch: pytest.MonkeyPatch) -... FILE: tests/emitter/test_object.py class FakeSpan (line 20) | class FakeSpan: class DummySpan (line 24) | class DummySpan: method __enter__ (line 25) | def __enter__(self) -> "DummySpan": method __exit__ (line 28) | def __exit__(self, exc_type: Any, exc_value: Any, traceback: Any) -> b... class DummyTracer (line 32) | class DummyTracer: method __init__ (line 33) | def __init__(self, span: DummySpan) -> None: method create_span (line 38) | def create_span(self, name: str, attributes: Optional[Dict[str, Any]] ... function _stub_tracer (line 44) | def _stub_tracer(monkeypatch: pytest.MonkeyPatch, span: DummySpan) -> Du... function test_encode_object_for_primitives (line 54) | def test_encode_object_for_primitives() -> None: function test_encode_object_for_bytes (line 63) | def test_encode_object_for_bytes() -> None: function test_encode_object_for_dict_serializes_json (line 74) | def test_encode_object_for_dict_serializes_json() -> None: function test_encode_object_raises_for_unserializable (line 82) | def test_encode_object_raises_for_unserializable() -> None: function test_get_object_value_from_json_attribute (line 87) | def test_get_object_value_from_json_attribute() -> None: function test_get_object_value_from_literal_types (line 99) | def test_get_object_value_from_literal_types() -> None: function test_get_object_value_returns_none_when_missing (line 134) | def test_get_object_value_returns_none_when_missing() -> None: function test_get_object_value_raises_for_invalid_json (line 140) | def test_get_object_value_raises_for_invalid_json() -> None: function test_emit_object_serializes_payload (line 151) | def test_emit_object_serializes_payload(monkeypatch: pytest.MonkeyPatch)... function test_emit_object_requires_json_serializable (line 163) | def test_emit_object_requires_json_serializable() -> None: function test_get_object_value_raises_for_unknown_literal_type (line 168) | def test_get_object_value_raises_for_unknown_literal_type() -> None: function test_emit_object_flattens_attributes (line 180) | def test_emit_object_flattens_attributes(monkeypatch: pytest.MonkeyPatch... function test_emit_object_propagate_false (line 191) | def test_emit_object_propagate_false(monkeypatch: pytest.MonkeyPatch) ->... FILE: tests/emitter/test_operation.py class RecordingTracer (line 33) | class RecordingTracer: method __init__ (line 34) | def __init__(self) -> None: method operation_context (line 38) | def operation_context( method create_span (line 55) | def create_span( class OtelSpanRecordingContext (line 65) | class OtelSpanRecordingContext: method __init__ (line 66) | def __init__(self, span: trace_api.Span) -> None: method record_exception (line 69) | def record_exception(self, exception: BaseException) -> None: method record_attributes (line 73) | def record_attributes(self, attributes: Dict[str, Any]) -> None: method record_status (line 77) | def record_status(self, status_code: str, description: Optional[str] =... method get_recorded_span (line 80) | def get_recorded_span(self) -> None: class OtelTracerAdapter (line 84) | class OtelTracerAdapter: method __init__ (line 85) | def __init__(self, tracer: trace_api.Tracer) -> None: method operation_context (line 88) | def operation_context( method create_span (line 113) | def create_span( function _install_recording_tracer (line 134) | def _install_recording_tracer(monkeypatch: pytest.MonkeyPatch) -> Record... function _resolve_attr (line 144) | def _resolve_attr(recording: DummySpanRecordingContext, key: str) -> Any: class ComplexResult (line 158) | class ComplexResult: function test_operation_context_serializes_inputs (line 163) | def test_operation_context_serializes_inputs(monkeypatch: pytest.MonkeyP... function test_operation_context_set_input_supports_multiple_values (line 182) | def test_operation_context_set_input_supports_multiple_values(monkeypatc... function test_operation_context_set_input_expands_positional_attributes (line 197) | def test_operation_context_set_input_expands_positional_attributes(monke... function test_operation_context_serializes_non_serializable_output (line 211) | def test_operation_context_serializes_non_serializable_output(monkeypatc... function test_operation_context_records_exceptions (line 229) | def test_operation_context_records_exceptions(monkeypatch: pytest.Monkey... function test_operation_factory_context_records_inputs_and_outputs (line 244) | def test_operation_factory_context_records_inputs_and_outputs(monkeypatc... function test_operation_factory_aliases_name_attribute (line 260) | def test_operation_factory_aliases_name_attribute(monkeypatch: pytest.Mo... function test_operation_factory_uses_standard_span_name (line 270) | def test_operation_factory_uses_standard_span_name(monkeypatch: pytest.M... function test_operation_rejects_custom_span_names (line 281) | def test_operation_rejects_custom_span_names() -> None: function test_operation_decorator_sync_records_span_attributes (line 286) | def test_operation_decorator_sync_records_span_attributes(monkeypatch: p... function test_operation_decorator_aliases_operation_name_attribute (line 307) | def test_operation_decorator_aliases_operation_name_attribute(monkeypatc... function test_operation_decorator_handles_complex_signature (line 319) | def test_operation_decorator_handles_complex_signature(monkeypatch: pyte... function test_operation_name_alias_does_not_override_explicit_attribute (line 355) | def test_operation_name_alias_does_not_override_explicit_attribute(monke... function test_operation_decorator_records_exceptions (line 367) | def test_operation_decorator_records_exceptions(monkeypatch: pytest.Monk... function test_operation_async_wrapper_records_attributes (line 383) | async def test_operation_async_wrapper_records_attributes(monkeypatch: p... function test_operation_span_can_be_resolved_via_annotation_links (line 399) | def test_operation_span_can_be_resolved_via_annotation_links(monkeypatch... function test_operation_honors_propagate_flag (line 431) | def test_operation_honors_propagate_flag(monkeypatch: pytest.MonkeyPatch... FILE: tests/emitter/test_reward.py class FakeSpan (line 19) | class FakeSpan: class AttributeSpan (line 25) | class AttributeSpan: function make_span (line 29) | def make_span(name: str, attributes: Optional[Dict[str, Any]] = None) ->... function _capture_emit_annotation (line 33) | def _capture_emit_annotation(monkeypatch: pytest.MonkeyPatch) -> tuple[D... function test_emit_reward_example_scalar (line 46) | def test_emit_reward_example_scalar(monkeypatch: pytest.MonkeyPatch) -> ... function test_emit_reward_example_multi_dimensional (line 57) | def test_emit_reward_example_multi_dimensional(monkeypatch: pytest.Monke... function test_emit_reward_example_with_links (line 69) | def test_emit_reward_example_with_links(monkeypatch: pytest.MonkeyPatch)... function test_emit_reward_example_with_tags (line 82) | def test_emit_reward_example_with_tags(monkeypatch: pytest.MonkeyPatch) ... function test_get_reward_value_from_agentops_dict (line 95) | def test_get_reward_value_from_agentops_dict() -> None: function test_get_reward_value_from_agentops_json_string (line 106) | def test_get_reward_value_from_agentops_json_string() -> None: function test_get_reward_value_from_reward_span_attributes (line 113) | def test_get_reward_value_from_reward_span_attributes() -> None: function test_get_reward_value_returns_none_when_not_reward (line 122) | def test_get_reward_value_returns_none_when_not_reward() -> None: function test_is_reward_span_matches_reward_value (line 128) | def test_is_reward_span_matches_reward_value() -> None: function test_is_reward_span_false_when_no_reward (line 137) | def test_is_reward_span_false_when_no_reward() -> None: function test_find_reward_spans_filters_correctly (line 143) | def test_find_reward_spans_filters_correctly() -> None: function test_find_final_reward_returns_last_reward_value (line 155) | def test_find_final_reward_returns_last_reward_value() -> None: function test_find_final_reward_returns_none_when_no_reward (line 165) | def test_find_final_reward_returns_none_when_no_reward() -> None: function test_emit_reward_scalar_converts_to_primary_dimension (line 174) | def test_emit_reward_scalar_converts_to_primary_dimension(monkeypatch: p... function test_emit_reward_dict_requires_primary_key (line 194) | def test_emit_reward_dict_requires_primary_key(monkeypatch: pytest.Monke... function test_emit_reward_rejects_non_numeric (line 218) | def test_emit_reward_rejects_non_numeric() -> None: function test_get_rewards_from_span_roundtrip (line 223) | def test_get_rewards_from_span_roundtrip() -> None: function test_get_rewards_from_span_returns_empty_when_missing (line 240) | def test_get_rewards_from_span_returns_empty_when_missing() -> None: FILE: tests/execution/test_client_server.py function _free_port (line 33) | def _free_port() -> int: class DummyEvt (line 43) | class DummyEvt(ExecutionEvent): method __init__ (line 46) | def __init__(self) -> None: method set (line 49) | def set(self) -> None: method is_set (line 52) | def is_set(self) -> bool: method clear (line 55) | def clear(self) -> None: method wait (line 58) | def wait(self, timeout: Optional[float] = None) -> bool: function store (line 63) | def store() -> DummyLightningStore: function _clear_env (line 72) | def _clear_env(monkeypatch: pytest.MonkeyPatch) -> None: function test_env_configuration (line 79) | def test_env_configuration(monkeypatch: pytest.MonkeyPatch) -> None: function test_env_defaults_when_unset (line 94) | def test_env_defaults_when_unset(monkeypatch: pytest.MonkeyPatch) -> None: function test_env_invalid_port (line 106) | def test_env_invalid_port(monkeypatch: pytest.MonkeyPatch) -> None: function test_env_missing_role (line 115) | def test_env_missing_role(monkeypatch: pytest.MonkeyPatch) -> None: function test_env_managed_store (line 123) | def test_env_managed_store(monkeypatch: pytest.MonkeyPatch) -> None: function test_explicit_managed_store_overrides_env (line 133) | def test_explicit_managed_store_overrides_env(monkeypatch: pytest.Monkey... function test_env_managed_store_invalid (line 142) | def test_env_managed_store_invalid(monkeypatch: pytest.MonkeyPatch) -> N... function test_execute_algorithm_managed_store_starts_server (line 156) | def test_execute_algorithm_managed_store_starts_server( function test_execute_algorithm_unmanaged_uses_provided_store (line 202) | def test_execute_algorithm_unmanaged_uses_provided_store( function test_execute_runner_managed_creates_and_closes_client (line 224) | def test_execute_runner_managed_creates_and_closes_client(monkeypatch: p... function test_execute_runner_unmanaged_requires_store (line 257) | def test_execute_runner_unmanaged_requires_store() -> None: function test_execute_runner_unmanaged_uses_provided_store (line 268) | def test_execute_runner_unmanaged_uses_provided_store() -> None: function _noop_algorithm (line 296) | async def _noop_algorithm(store: LightningStore, event: ExecutionEvent) ... function _algo_calls_store_enqueue (line 302) | async def _algo_calls_store_enqueue(store: LightningStore, event: Execut... function _algo_sets_stop_delayed (line 309) | async def _algo_sets_stop_delayed(store: LightningStore, event: Executio... function _raise_in_algorithm (line 315) | async def _raise_in_algorithm(store: LightningStore, event: ExecutionEve... function _kbint_in_algorithm (line 321) | async def _kbint_in_algorithm(store: LightningStore, event: ExecutionEve... function _subprocess_algorithm_write_util (line 327) | def _subprocess_algorithm_write_util(store: LightningStore) -> None: function _subprocess_algorithm (line 337) | async def _subprocess_algorithm(store: LightningStore, event: ExecutionE... function _noop_runner (line 361) | async def _noop_runner(store: LightningStore, worker_id: int, event: Exe... function _runner_wait_for_stop (line 367) | async def _runner_wait_for_stop( function _runner_ignores_stop_forever (line 376) | async def _runner_ignores_stop_forever(store: LightningStore, worker_id:... function _raise_in_runner (line 385) | async def _raise_in_runner(store: LightningStore, worker_id: int, event:... function _kbint_in_runner (line 391) | async def _kbint_in_runner(store: LightningStore, worker_id: int, event:... function _cancel_in_runner (line 397) | async def _cancel_in_runner(store: LightningStore, worker_id: int, event... function _timeout_error_in_runner (line 402) | async def _timeout_error_in_runner(store: LightningStore, worker_id: int... function _waiting_for_rollout_runner (line 411) | async def _waiting_for_rollout_runner(store: LightningStore, worker_id: ... function test_join_until_deadline_includes_alive_process (line 428) | def test_join_until_deadline_includes_alive_process() -> None: function test_join_until_deadline_excludes_finished_process (line 449) | def test_join_until_deadline_excludes_finished_process() -> None: function test_join_until_deadline_zero_timeout_path (line 459) | def test_join_until_deadline_zero_timeout_path() -> None: function test_signal_processes_invokes_action_and_suppresses_exceptions (line 472) | def test_signal_processes_invokes_action_and_suppresses_exceptions() -> ... function test_shutdown_processes_empty_list_noop (line 494) | def test_shutdown_processes_empty_list_noop() -> None: function test_shutdown_processes_phase1_cooperative (line 499) | def test_shutdown_processes_phase1_cooperative() -> None: function test_shutdown_processes_phase2_sigint (line 521) | def test_shutdown_processes_phase2_sigint() -> None: function test_shutdown_processes_phase2_try_catch (line 552) | def test_shutdown_processes_phase2_try_catch() -> None: function test_shutdown_processes_phase3_terminate_when_sigint_ignored (line 583) | def test_shutdown_processes_phase3_terminate_when_sigint_ignored() -> None: function test_shutdown_processes_phase4_kill_when_term_ignored (line 613) | def test_shutdown_processes_phase4_kill_when_term_ignored() -> None: function test_shutdown_processes_when_stop_already_set (line 643) | def test_shutdown_processes_when_stop_already_set() -> None: function test_execute_algorithm_success_invokes_store (line 670) | def test_execute_algorithm_success_invokes_store(store: DummyLightningSt... function test_execute_algorithm_sets_stop_on_exception_and_propagates (line 689) | def test_execute_algorithm_sets_stop_on_exception_and_propagates(store: ... function test_execute_algorithm_keyboardinterrupt_sets_stop_and_propagates (line 705) | def test_execute_algorithm_keyboardinterrupt_sets_stop_and_propagates(st... function test_execute_runner_success_closes_client (line 721) | def test_execute_runner_success_closes_client() -> None: function test_execute_runner_exception_sets_stop_and_closes_client (line 750) | def test_execute_runner_exception_sets_stop_and_closes_client() -> None: function test_execute_runner_keyboardinterrupt_sets_stop_and_propagates (line 782) | def test_execute_runner_keyboardinterrupt_sets_stop_and_propagates() -> ... function test_execute_runner_distinguishes_timeout_error (line 802) | def test_execute_runner_distinguishes_timeout_error() -> None: function test_spawn_runners_creates_processes_and_they_exit_on_event (line 822) | def test_spawn_runners_creates_processes_and_they_exit_on_event() -> None: function test_spawn_algorithm_process_creates_and_runs (line 861) | def test_spawn_algorithm_process_creates_and_runs(store: LightningStore)... function test_execute_role_algorithm_success (line 891) | def test_execute_role_algorithm_success(store: LightningStore) -> None: function test_execute_role_runner_single_success (line 904) | def test_execute_role_runner_single_success(store: LightningStore) -> None: function test_execute_role_runner_multi_success (line 917) | def test_execute_role_runner_multi_success(store: LightningStore) -> None: function test_execute_role_runner_multi_raises_on_child_failure (line 930) | def test_execute_role_runner_multi_raises_on_child_failure(store: Lightn... function test_execute_both_main_algorithm_cooperative_shutdown (line 944) | def test_execute_both_main_algorithm_cooperative_shutdown(store: Lightni... function test_execute_both_main_runner_debug_cooperative_shutdown (line 966) | def test_execute_both_main_runner_debug_cooperative_shutdown(store: Ligh... function test_execute_algorithm_exception_bubbles_and_shuts_down (line 998) | def test_execute_algorithm_exception_bubbles_and_shuts_down(store: Light... function test_execute_algorithm_keyboard_interrupt_propagates (line 1013) | def test_execute_algorithm_keyboard_interrupt_propagates(store: Lightnin... function test_execute_runner_single_keyboard_interrupt_is_caught (line 1030) | def test_execute_runner_single_keyboard_interrupt_is_caught(store: Light... function test_execute_runner_single_timeout_error_bubbles (line 1047) | def test_execute_runner_single_timeout_error_bubbles(store: LightningSto... function test_execute_unknown_role_raises (line 1064) | def test_execute_unknown_role_raises() -> None: function test_constructor_validation (line 1072) | def test_constructor_validation() -> None: function test_execute_main_runner_rejects_multiple_runners (line 1079) | def test_execute_main_runner_rejects_multiple_runners(store: LightningSt... function test_execute_main_runner_waits_for_algorithm_completion (line 1095) | def test_execute_main_runner_waits_for_algorithm_completion(store: Light... function test_execute_both_main_algo_runner_ignores_stop (line 1139) | def test_execute_both_main_algo_runner_ignores_stop(store: LightningStor... function test_subprocess_spawned_in_algorithm_visible_to_all (line 1165) | def test_subprocess_spawned_in_algorithm_visible_to_all(main_process: st... function test_execute_main_runner_store_state_isolated_in_subprocess (line 1203) | def test_execute_main_runner_store_state_isolated_in_subprocess(store: D... function test_spawn_runners_handles_keyboard_interrupt_gracefully (line 1246) | def test_spawn_runners_handles_keyboard_interrupt_gracefully(store: Ligh... function test_spawn_runners_treats_cancelled_error_as_crash (line 1277) | def test_spawn_runners_treats_cancelled_error_as_crash(store: LightningS... FILE: tests/execution/test_shared_memory.py function store (line 19) | def store() -> DummyLightningStore: function test_env_managed_store (line 23) | def test_env_managed_store(monkeypatch: pytest.MonkeyPatch) -> None: function test_explicit_managed_store_overrides_env (line 31) | def test_explicit_managed_store_overrides_env(monkeypatch: pytest.Monkey... function test_execute_uses_unmanaged_store_directly (line 39) | def test_execute_uses_unmanaged_store_directly(store: DummyLightningStor... function tiny_sleep (line 58) | def tiny_sleep(seconds: float) -> float: function make_cooperative_algorithm (line 68) | def make_cooperative_algorithm( function make_cooperative_runner (line 83) | def make_cooperative_runner( function make_sleepy_coro (line 97) | def make_sleepy_coro(delay: float, result: Any): function make_never_polls_coro (line 105) | def make_never_polls_coro(total_time: float): function make_slow_cleanup_on_cancel_coro (line 117) | def make_slow_cleanup_on_cancel_coro(cleanup_time: float): function test_run_until_completes_naturally (line 134) | def test_run_until_completes_naturally(caplog: LogCaptureFixture): function test_run_until_stops_gracefully_with_event (line 146) | def test_run_until_stops_gracefully_with_event(caplog: LogCaptureFixture): function test_run_until_cancels_after_grace_if_not_quick_to_stop (line 168) | def test_run_until_cancels_after_grace_if_not_quick_to_stop(caplog: LogC... function test_run_until_second_chance_timeout_logs_and_returns (line 198) | def test_run_until_second_chance_timeout_logs_and_returns(caplog: LogCap... function test_run_algorithm_sets_stop_on_exception (line 227) | def test_run_algorithm_sets_stop_on_exception(store: DummyLightningStore): function test_run_runner_sets_stop_on_exception (line 242) | def test_run_runner_sets_stop_on_exception(store: DummyLightningStore): function test_execute_main_algorithm_normal_stop_sets_event (line 260) | def test_execute_main_algorithm_normal_stop_sets_event(store: DummyLight... function test_execute_main_runner_waits_for_algorithm_natural_finish (line 285) | def test_execute_main_runner_waits_for_algorithm_natural_finish(store: D... function test_execute_runner_crash_propagates_and_stops_algorithm (line 316) | def test_execute_runner_crash_propagates_and_stops_algorithm(store: Dumm... function test_execute_ctrl_c_on_algorithm_stops_runners (line 344) | def test_execute_ctrl_c_on_algorithm_stops_runners(store: DummyLightning... function test_execute_ctrl_c_on_runner_stops_algorithm (line 370) | def test_execute_ctrl_c_on_runner_stops_algorithm(store: DummyLightningS... FILE: tests/instrumentation/test_agentops.py function test_switchable_authenticated_exporter (line 20) | def test_switchable_authenticated_exporter(): function test_switchable_otlp_metric_exporter (line 38) | def test_switchable_otlp_metric_exporter(): function test_switchable_otlp_span_exporter (line 56) | def test_switchable_otlp_span_exporter(): FILE: tests/litagent/test_decorator.py function sample_llm_rollout_func (line 23) | def sample_llm_rollout_func(task: Any, llm: LLM) -> float: function sample_rollout_func (line 30) | def sample_rollout_func(task: Any, llm: LLM) -> float: function test_llm_rollout_preserves_executability (line 35) | def test_llm_rollout_preserves_executability(): function test_llm_rollout_preserves_metadata (line 49) | def test_llm_rollout_preserves_metadata(): function test_llm_rollout_returns_litagent_instance (line 58) | def test_llm_rollout_returns_litagent_instance(): function test_llm_rollout_preserves_signature (line 68) | def test_llm_rollout_preserves_signature(): function test_rollout_preserves_executability (line 77) | def test_rollout_preserves_executability(): function test_rollout_preserves_metadata (line 91) | def test_rollout_preserves_metadata(): function test_rollout_returns_litagent_instance (line 100) | def test_rollout_returns_litagent_instance(): function test_rollout_preserves_signature (line 110) | def test_rollout_preserves_signature(): function test_async_function_with_llm_rollout (line 120) | async def test_async_function_with_llm_rollout(): function test_async_function_with_rollout (line 140) | async def test_async_function_with_rollout(): function test_llm_rollout_strip_proxy_true_strips_proxy_llm (line 159) | def test_llm_rollout_strip_proxy_true_strips_proxy_llm(): function test_llm_rollout_strip_proxy_false_preserves_proxy_llm (line 195) | def test_llm_rollout_strip_proxy_false_preserves_proxy_llm(): function test_llm_rollout_strip_proxy_default_strips_proxy_llm (line 231) | def test_llm_rollout_strip_proxy_default_strips_proxy_llm(): function sample_prompt_rollout_func (line 270) | def sample_prompt_rollout_func(task: Any, prompt_template: PromptTemplat... function test_prompt_rollout_preserves_executability (line 275) | def test_prompt_rollout_preserves_executability(): function test_prompt_rollout_preserves_metadata (line 289) | def test_prompt_rollout_preserves_metadata(): function test_prompt_rollout_returns_litagent_instance (line 298) | def test_prompt_rollout_returns_litagent_instance(): function test_prompt_rollout_preserves_signature (line 308) | def test_prompt_rollout_preserves_signature(): function test_prompt_rollout_with_rollout_method (line 317) | def test_prompt_rollout_with_rollout_method(): function test_async_function_with_prompt_rollout (line 349) | async def test_async_function_with_prompt_rollout(): function test_rollout_detects_prompt_template_pattern (line 369) | def test_rollout_detects_prompt_template_pattern(): function test_function_with_rollout_parameter (line 387) | def test_function_with_rollout_parameter(): function test_prompt_rollout_with_rollout_parameter (line 420) | def test_prompt_rollout_with_rollout_parameter(): function test_validate_llm_rollout_func_valid (line 456) | def test_validate_llm_rollout_func_valid(): function test_validate_llm_rollout_func_with_rollout (line 466) | def test_validate_llm_rollout_func_with_rollout(): function test_validate_llm_rollout_func_missing_task (line 476) | def test_validate_llm_rollout_func_missing_task(): function test_validate_llm_rollout_func_missing_llm (line 487) | def test_validate_llm_rollout_func_missing_llm(): function test_validate_llm_rollout_func_too_few_params (line 498) | def test_validate_llm_rollout_func_too_few_params(): function test_validate_prompt_rollout_func_valid (line 509) | def test_validate_prompt_rollout_func_valid(): function test_validate_prompt_rollout_func_with_rollout (line 519) | def test_validate_prompt_rollout_func_with_rollout(): function test_validate_prompt_rollout_func_missing_task (line 529) | def test_validate_prompt_rollout_func_missing_task(): function test_validate_prompt_rollout_func_missing_prompt_template (line 540) | def test_validate_prompt_rollout_func_missing_prompt_template(): function test_rollout_decorator_invalid_signature (line 551) | def test_rollout_decorator_invalid_signature(): FILE: tests/litagent/test_resources.py function test_proxy_llm_endpoint_direct_access_emits_warning (line 10) | def test_proxy_llm_endpoint_direct_access_emits_warning(caplog: pytest.L... function test_proxy_llm_base_url_no_warning (line 23) | def test_proxy_llm_base_url_no_warning(caplog: pytest.LogCaptureFixture): function test_proxy_llm_base_url_returns_endpoint_when_none (line 37) | def test_proxy_llm_base_url_returns_endpoint_when_none(): function test_proxy_llm_base_url_validates_inputs (line 58) | def test_proxy_llm_base_url_validates_inputs(rollout_id: object, attempt... FILE: tests/llm_proxy/test_llm_proxy_cpu.py class _FakeSpanContext (line 33) | class _FakeSpanContext: method __init__ (line 34) | def __init__(self, span_id: int): class _FakeParent (line 38) | class _FakeParent: method __init__ (line 39) | def __init__(self, span_id: int): class _FakeReadableSpan (line 43) | class _FakeReadableSpan: method __init__ (line 44) | def __init__(self, span_id: int, parent_id: int | None, attrs: dict[st... method get_span_context (line 50) | def get_span_context(self): class _FakeStore (line 54) | class _FakeStore(InMemoryLightningStore): method __init__ (line 55) | def __init__(self): method add_otel_span (line 59) | async def add_otel_span( function test_exporter_tree_and_flush_headers_parsing (line 69) | async def test_exporter_tree_and_flush_headers_parsing(): function test_exporter_helpers (line 96) | def test_exporter_helpers(): function test_update_model_list (line 134) | async def test_update_model_list(): function test_restart_resets_litellm_logging_worker (line 182) | async def test_restart_resets_litellm_logging_worker() -> None: class TestLLM (line 222) | class TestLLM(CustomLLM): method __init__ (line 223) | def __init__(self, content: str) -> None: method completion (line 227) | def completion(self, *args: Any, **kwargs: Any) -> ModelResponse: method acompletion (line 234) | async def acompletion(self, *args: Any, **kwargs: Any) -> ModelResponse: function test_custom_llm_restarted_multiple_times (line 243) | async def test_custom_llm_restarted_multiple_times(caplog: pytest.LogCap... function llm_proxy_span_exporter_loop (line 301) | async def llm_proxy_span_exporter_loop(otlp_enabled: bool = False): function llm_proxy_span_exporter_loop_sync (line 372) | def llm_proxy_span_exporter_loop_sync(otlp_enabled: bool = False): function test_llm_proxy_span_exporter_loop (line 377) | def test_llm_proxy_span_exporter_loop(otlp_enabled: bool): FILE: tests/llm_proxy/test_llm_proxy_gpu.py function qwen25_model (line 39) | def qwen25_model(): function test_qwen25_model_sanity (line 55) | def test_qwen25_model_sanity(qwen25_model: RemoteOpenAIServer): function test_basic_integration (line 67) | async def test_basic_integration(qwen25_model: RemoteOpenAIServer, otlp_... function _make_proxy_and_store (line 185) | async def _make_proxy_and_store( function _new_resource (line 224) | async def _new_resource(proxy: LLMProxy, store: LightningStore): function _get_client_for_resource (line 229) | def _get_client_for_resource(resource: LLM): function _get_async_client_for_resource (line 233) | def _get_async_client_for_resource(resource: LLM): function _find_span (line 237) | def _find_span(spans: Sequence[Span], name: str): function _attr (line 241) | def _attr(s: Span, key: str, default: Any = None): # type: ignore function test_multiple_requests_one_attempt (line 247) | async def test_multiple_requests_one_attempt(qwen25_model: RemoteOpenAIS... function test_ten_concurrent_requests (line 276) | async def test_ten_concurrent_requests(qwen25_model: RemoteOpenAIServer,... function test_anthropic_client_compat (line 306) | async def test_anthropic_client_compat(qwen25_model: RemoteOpenAIServer,... function test_tool_call_roundtrip (line 332) | async def test_tool_call_roundtrip(qwen25_model: RemoteOpenAIServer, otl... function test_streaming_chunks (line 403) | async def test_streaming_chunks(qwen25_model: RemoteOpenAIServer, otlp_e... function test_anthropic_token_ids (line 441) | async def test_anthropic_token_ids(qwen25_model: RemoteOpenAIServer, otl... class LogprobsCallback (line 503) | class LogprobsCallback(CustomLogger): method async_pre_call_hook (line 505) | async def async_pre_call_hook(self, data: Dict[str, Any], **kwargs: An... function test_anthropic_logprobs (line 511) | async def test_anthropic_logprobs(qwen25_model: RemoteOpenAIServer, otlp... FILE: tests/llm_proxy/test_stream.py function merge_openai_streaming (line 13) | def merge_openai_streaming(chunks: Iterator[Dict[str, Any]]) -> Dict[str... function merge_anthropic_streaming (line 71) | def merge_anthropic_streaming(chunks: Iterator[Dict[str, Any]]) -> Dict[... function test_openai_text_only_short (line 181) | def test_openai_text_only_short(): function test_openai_text_and_function_call_arguments_split (line 199) | def test_openai_text_and_function_call_arguments_split(): function test_openai_tool_calls_via_tool_calls_field (line 225) | def test_openai_tool_calls_via_tool_calls_field(): function test_openai_invalid_json_arguments_falls_back_to_string (line 266) | def test_openai_invalid_json_arguments_falls_back_to_string(): function test_anthropic_text_only_multiple_blocks (line 286) | def test_anthropic_text_only_multiple_blocks(): function test_anthropic_tool_use_split_inputs_merge (line 303) | def test_anthropic_tool_use_split_inputs_merge(): function test_anthropic_fine_grained_input_json_delta (line 320) | def test_anthropic_fine_grained_input_json_delta(): function test_anthropic_text_and_tool_interleaved_with_text_deltas (line 352) | def test_anthropic_text_and_tool_interleaved_with_text_deltas(): function test_anthropic_partial_json_left_as_string_when_invalid (line 366) | def test_anthropic_partial_json_left_as_string_when_invalid(): function test_openai_long_text_stream_rounds_up (line 400) | def test_openai_long_text_stream_rounds_up(text_len: int): function collect_sse (line 421) | async def collect_sse(gen: AsyncGenerator[str, Any]) -> List[str]: function parse_openai_sse_to_json_events (line 430) | def parse_openai_sse_to_json_events(sse_chunks: List[str]) -> List[Dict[... function parse_anthropic_sse_to_json_payloads (line 448) | def parse_anthropic_sse_to_json_payloads(sse_chunks: List[str]) -> List[... function mw (line 467) | def mw() -> StreamConversionMiddleware: function test_openai_content_only_stream_roundtrip (line 484) | async def test_openai_content_only_stream_roundtrip(mw: StreamConversion... function test_openai_long_text_chunking_and_reassembly (line 520) | async def test_openai_long_text_chunking_and_reassembly(mw: StreamConver... function test_openai_tool_call_only_stream_roundtrip (line 544) | async def test_openai_tool_call_only_stream_roundtrip(mw: StreamConversi... function test_openai_content_and_tool_call_stream_roundtrip (line 590) | async def test_openai_content_and_tool_call_stream_roundtrip(mw: StreamC... function test_anthropic_text_only_stream_roundtrip (line 627) | async def test_anthropic_text_only_stream_roundtrip(mw: StreamConversion... function test_anthropic_tool_use_only_stream_roundtrip (line 653) | async def test_anthropic_tool_use_only_stream_roundtrip(mw: StreamConver... function test_anthropic_mixed_text_and_tool_use_roundtrip (line 680) | async def test_anthropic_mixed_text_and_tool_use_roundtrip(mw: StreamCon... FILE: tests/runner/test_agent_integration.py class InitRunnerFunction (line 25) | class InitRunnerFunction: method __call__ (line 27) | def __call__( function init_runner (line 40) | def init_runner(request: pytest.FixtureRequest) -> InitRunnerFunction: function teardown_runner (line 59) | def teardown_runner(runner: LitAgentRunner[Any]) -> None: function setup_module (line 65) | def setup_module(): function test_runner_integration_basic_rollout (line 74) | async def test_runner_integration_basic_rollout(init_runner: InitRunnerF... function test_runner_integration_with_openai (line 95) | async def test_runner_integration_with_openai(init_runner: InitRunnerFun... function test_runner_integration_with_litellm_proxy (line 132) | async def test_runner_integration_with_litellm_proxy(init_runner: InitRu... function server (line 159) | def server(): class LLMProxyWithClearedTracerProvider (line 178) | class LLMProxyWithClearedTracerProvider(LLMProxy): method _serve_context (line 186) | async def _serve_context(self) -> AsyncGenerator[None, None]: function test_runner_integration_with_spawned_litellm_proxy (line 195) | async def test_runner_integration_with_spawned_litellm_proxy( FILE: tests/runner/test_agent_runner.py function setup_module (line 30) | def setup_module(): function create_readable_span (line 35) | def create_readable_span(name: str, attributes: Optional[Dict[str, Any]]... function create_agent_span (line 58) | def create_agent_span( class DummyTracer (line 74) | class DummyTracer(Tracer): method __init__ (line 75) | def __init__(self) -> None: method init (line 81) | def init(self, *args: Any, **kwargs: Any) -> None: method teardown (line 84) | def teardown(self, *args: Any, **kwargs: Any) -> None: method get_last_trace (line 87) | def get_last_trace(self) -> List[Span]: method trace_context (line 91) | async def trace_context( method record_span (line 115) | def record_span(self, name: str, attributes: Optional[Dict[str, Any]] ... class RecordingStore (line 129) | class RecordingStore(InMemoryLightningStore): method __init__ (line 132) | def __init__(self) -> None: method update_worker (line 136) | async def update_worker( class HeartbeatAgent (line 146) | class HeartbeatAgent(LitAgent[Dict[str, Any]]): method validation_rollout (line 149) | def validation_rollout(self, task: Dict[str, Any], resources: Dict[str... function setup_heartbeat_runner (line 153) | async def setup_heartbeat_runner( function setup_runner (line 174) | async def setup_runner( function teardown_runner (line 192) | def teardown_runner(runner: LitAgentRunner[Any]) -> None: function assert_single_attempt_succeeded (line 197) | async def assert_single_attempt_succeeded(store: InMemoryLightningStore)... class RecordingHook (line 206) | class RecordingHook(Hook): method __init__ (line 207) | def __init__(self) -> None: method on_rollout_start (line 212) | async def on_rollout_start(self, *, agent: LitAgent[Any], runner: Runn... method on_trace_start (line 215) | async def on_trace_start( method on_trace_end (line 220) | async def on_trace_end( method on_rollout_end (line 225) | async def on_rollout_end( function test_step_records_spans_for_none_result (line 238) | async def test_step_records_spans_for_none_result() -> None: function test_step_emits_reward_for_float_result (line 262) | async def test_step_emits_reward_for_float_result() -> None: function test_step_emits_reward_for_bool_result (line 281) | async def test_step_emits_reward_for_bool_result(caplog: pytest.LogCaptu... function test_step_raises_for_invalid_result_type (line 302) | async def test_step_raises_for_invalid_result_type() -> None: function test_readable_spans_return_skip_store_when_tracer_is_otel (line 324) | async def test_readable_spans_return_skip_store_when_tracer_is_otel( function test_post_process_readable_spans_adds_each_span (line 369) | async def test_post_process_readable_spans_adds_each_span() -> None: function test_post_process_span_core_fields_create_spans (line 389) | async def test_post_process_span_core_fields_create_spans() -> None: function test_step_handles_non_llm_resource (line 409) | async def test_step_handles_non_llm_resource() -> None: function test_step_accepts_readable_span_list (line 436) | async def test_step_accepts_readable_span_list() -> None: function test_step_accepts_agent_span_list (line 456) | async def test_step_accepts_agent_span_list() -> None: function test_iter_respects_max_rollouts (line 477) | async def test_iter_respects_max_rollouts() -> None: function test_iter_stops_when_event_is_set (line 505) | async def test_iter_stops_when_event_is_set() -> None: function test_iter_waits_when_queue_empty_calls_sleep (line 540) | async def test_iter_waits_when_queue_empty_calls_sleep(monkeypatch: pyte... function test_async_validation_rollout_used (line 569) | async def test_async_validation_rollout_used() -> None: function test_training_rollout_sync_used (line 600) | async def test_training_rollout_sync_used() -> None: function test_step_handles_agent_exception_marks_attempt_failed (line 623) | async def test_step_handles_agent_exception_marks_attempt_failed() -> None: function test_agent_emits_multiple_rewards (line 641) | async def test_agent_emits_multiple_rewards() -> None: function test_hooks_triggered_in_order (line 664) | async def test_hooks_triggered_in_order() -> None: function test_step_returns_completed_rollout (line 688) | async def test_step_returns_completed_rollout() -> None: function test_step_returns_rollout_with_spans (line 714) | async def test_step_returns_rollout_with_spans() -> None: function test_step_raises_when_rollout_fetch_fails (line 739) | async def test_step_raises_when_rollout_fetch_fails(monkeypatch: pytest.... function test_step_impl_returns_rollout_id (line 766) | async def test_step_impl_returns_rollout_id() -> None: function test_step_impl_returns_rollout_id_on_resource_failure (line 793) | async def test_step_impl_returns_rollout_id_on_resource_failure() -> None: function test_step_with_custom_resources_returns_rollout (line 820) | async def test_step_with_custom_resources_returns_rollout() -> None: function test_step_registers_worker_id_on_start_rollout (line 851) | async def test_step_registers_worker_id_on_start_rollout(monkeypatch: py... function test_iter_passes_worker_id_to_dequeue (line 880) | async def test_iter_passes_worker_id_to_dequeue(monkeypatch: pytest.Monk... function test_emit_heartbeat_updates_worker_snapshot (line 917) | async def test_emit_heartbeat_updates_worker_snapshot(monkeypatch: pytes... function test_emit_heartbeat_passes_include_gpu (line 936) | async def test_emit_heartbeat_passes_include_gpu(monkeypatch: pytest.Mon... function test_emit_heartbeat_skips_when_snapshot_times_out (line 963) | async def test_emit_heartbeat_skips_when_snapshot_times_out(monkeypatch:... function test_emit_heartbeat_skips_when_store_update_times_out (line 984) | async def test_emit_heartbeat_skips_when_store_update_times_out(monkeypa... function test_heartbeat_loop_runs_until_stopped (line 1012) | async def test_heartbeat_loop_runs_until_stopped(monkeypatch: pytest.Mon... function test_asyncio_heartbeat_loop_runs_until_stopped (line 1037) | async def test_asyncio_heartbeat_loop_runs_until_stopped(monkeypatch: py... function test_thread_heartbeat_loop_runs_until_stopped (line 1062) | async def test_thread_heartbeat_loop_runs_until_stopped(monkeypatch: pyt... function test_thread_heartbeat_handles_producer_exception (line 1092) | async def test_thread_heartbeat_handles_producer_exception( function test_thread_heartbeat_handles_consumer_exception (line 1129) | async def test_thread_heartbeat_handles_consumer_exception( function test_thread_heartbeat_waits_for_first_snapshot (line 1171) | async def test_thread_heartbeat_waits_for_first_snapshot( function test_thread_heartbeat_logs_stale_snapshot_only_once (line 1205) | async def test_thread_heartbeat_logs_stale_snapshot_only_once( function test_heartbeat_disabled_when_interval_zero (line 1249) | async def test_heartbeat_disabled_when_interval_zero() -> None: function test_heartbeat_disabled_when_no_worker_id (line 1260) | async def test_heartbeat_disabled_when_no_worker_id(caplog: pytest.LogCa... function test_emit_heartbeat_propagates_cancelled_error (line 1280) | async def test_emit_heartbeat_propagates_cancelled_error() -> None: function test_asyncio_heartbeat_continues_after_exception (line 1298) | async def test_asyncio_heartbeat_continues_after_exception( FILE: tests/runner/test_runner_context.py function setup_module (line 21) | def setup_module(): class DummyTracer (line 29) | class DummyTracer(Tracer): method __init__ (line 32) | def __init__(self) -> None: method init (line 40) | def init(self, *args: Any, **kwargs: Any) -> None: method init_worker (line 44) | def init_worker(self, worker_id: int, *args: Any, **kwargs: Any) -> None: method teardown (line 47) | def teardown(self, *args: Any, **kwargs: Any) -> None: method teardown_worker (line 51) | def teardown_worker(self, worker_id: int, *args: Any, **kwargs: Any) -... method get_last_trace (line 54) | def get_last_trace(self) -> List[Span]: method trace_context (line 58) | async def trace_context( class DummyAgent (line 73) | class DummyAgent(LitAgent[Dict[str, Any]]): method validation_rollout (line 76) | def validation_rollout(self, task: Dict[str, Any], resources: Dict[str... class RecordingHook (line 80) | class RecordingHook(Hook): method __init__ (line 83) | def __init__(self) -> None: method on_rollout_start (line 87) | async def on_rollout_start(self, *, agent: LitAgent[Any], runner: Any,... method on_trace_start (line 90) | async def on_trace_start(self, *, agent: LitAgent[Any], runner: Any, t... method on_trace_end (line 93) | async def on_trace_end(self, *, agent: LitAgent[Any], runner: Any, tra... method on_rollout_end (line 96) | async def on_rollout_end(self, *, agent: LitAgent[Any], runner: Any, r... function test_run_context_basic_lifecycle (line 101) | async def test_run_context_basic_lifecycle() -> None: function test_run_context_yields_runner (line 123) | async def test_run_context_yields_runner() -> None: function test_run_context_with_hooks (line 135) | async def test_run_context_with_hooks() -> None: function test_run_context_teardown_on_exception_in_context (line 149) | async def test_run_context_teardown_on_exception_in_context() -> None: function test_run_context_no_teardown_worker_if_init_worker_fails (line 166) | async def test_run_context_no_teardown_worker_if_init_worker_fails() -> ... function test_run_context_no_teardown_if_init_fails (line 197) | async def test_run_context_no_teardown_if_init_fails() -> None: function test_run_context_handles_teardown_worker_exception (line 228) | async def test_run_context_handles_teardown_worker_exception(caplog: pyt... function test_run_context_handles_teardown_exception (line 260) | async def test_run_context_handles_teardown_exception(caplog: pytest.Log... function test_run_context_can_be_used_for_step (line 292) | async def test_run_context_can_be_used_for_step() -> None: FILE: tests/store/conftest.py function inmemory_store (line 53) | def inmemory_store() -> InMemoryLightningStore: function inmemory_debounced_store (line 59) | def inmemory_debounced_store(fake_time: _FakeTime) -> InMemoryLightningS... function mongo_store (line 65) | async def mongo_store(temporary_mongo_database: AsyncDatabase[Any]): function mongo_debounced_store (line 82) | async def mongo_debounced_store(fake_time: _FakeTime, temporary_mongo_da... function store_fixture (line 104) | def store_fixture(request: FixtureRequest) -> AsyncGenerator[LightningSt... function debounced_store (line 115) | def debounced_store(request: FixtureRequest) -> LightningStore: function mock_readable_span (line 121) | def mock_readable_span() -> ReadableSpan: class SampleItem (line 156) | class SampleItem(BaseModel): class QueueItem (line 169) | class QueueItem(BaseModel): class _FakeTime (line 173) | class _FakeTime: method __init__ (line 176) | def __init__(self, start: float = 0.0) -> None: method time (line 179) | def time(self) -> float: method set (line 182) | def set(self, value: float) -> None: method advance (line 185) | def advance(self, delta: float) -> None: function fake_time (line 190) | def fake_time(monkeypatch: pytest.MonkeyPatch) -> _FakeTime: function mongo_client (line 198) | async def mongo_client(): function temporary_mongo_database (line 215) | async def temporary_mongo_database(mongo_client: AsyncMongoClient[Any]): function sample_items (line 229) | def sample_items() -> List[SampleItem]: function sample_collection_memory (line 334) | def sample_collection_memory(sample_items: Sequence[SampleItem]) -> List... function sample_collection_mongo (line 341) | async def sample_collection_mongo(temporary_mongo_database: AsyncDatabas... function sample_collection (line 366) | def sample_collection(request: pytest.FixtureRequest): function deque_queue_memory (line 375) | def deque_queue_memory() -> DequeBasedQueue[QueueItem]: function deque_queue_mongo (line 380) | async def deque_queue_mongo(temporary_mongo_database: AsyncDatabase[Any]): function deque_queue (line 403) | def deque_queue(request: pytest.FixtureRequest) -> AsyncGenerator[Queue[... function dict_key_value_data (line 412) | def dict_key_value_data() -> Dict[str, int]: function dict_key_value_memory (line 417) | def dict_key_value_memory(dict_key_value_data: Dict[str, int]) -> DictBa... function dict_key_value_mongo (line 422) | async def dict_key_value_mongo(temporary_mongo_database: AsyncDatabase[A... function dict_key_value (line 447) | def dict_key_value(request: pytest.FixtureRequest) -> AsyncGenerator[Key... FILE: tests/store/dummy_store.py class DummyLightningStore (line 25) | class DummyLightningStore(LightningStore): method __init__ (line 26) | def __init__(self, return_values: Dict[str, Any]) -> None: method capabilities (line 32) | def capabilities(self) -> LightningStoreCapabilities: method start_rollout (line 39) | async def start_rollout( method enqueue_rollout (line 51) | async def enqueue_rollout( method enqueue_many_rollouts (line 62) | async def enqueue_many_rollouts(self, rollouts: Sequence[EnqueueRollou... method dequeue_rollout (line 66) | async def dequeue_rollout(self, worker_id: Optional[str] = None) -> Op... method dequeue_many_rollouts (line 70) | async def dequeue_many_rollouts( method start_attempt (line 79) | async def start_attempt(self, rollout_id: str, worker_id: Optional[str... method query_rollouts (line 83) | async def query_rollouts(self, *args: Any, **kwargs: Any) -> List[Roll... method query_attempts (line 87) | async def query_attempts(self, *args: Any, **kwargs: Any) -> List[Atte... method get_rollout_by_id (line 91) | async def get_rollout_by_id(self, rollout_id: str) -> Optional[Rollout]: method get_latest_attempt (line 95) | async def get_latest_attempt(self, rollout_id: str) -> Optional[Attempt]: method add_resources (line 99) | async def add_resources(self, resources: NamedResources) -> ResourcesU... method update_resources (line 103) | async def update_resources(self, resources_id: str, resources: NamedRe... method get_resources_by_id (line 107) | async def get_resources_by_id(self, resources_id: str) -> Optional[Res... method get_latest_resources (line 111) | async def get_latest_resources(self) -> Optional[ResourcesUpdate]: method query_resources (line 115) | async def query_resources(self, *args: Any, **kwargs: Any) -> List[Res... method add_span (line 119) | async def add_span(self, span: Span) -> Optional[Span]: method add_many_spans (line 123) | async def add_many_spans(self, spans: Sequence[Span]) -> List[Span]: method add_otel_span (line 127) | async def add_otel_span( method wait_for_rollouts (line 137) | async def wait_for_rollouts(self, *, rollout_ids: List[str], timeout: ... method get_next_span_sequence_id (line 141) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method get_many_span_sequence_ids (line 145) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... method query_spans (line 149) | async def query_spans(self, *args: Any, **kwargs: Any) -> List[Span]: method update_rollout (line 153) | async def update_rollout( method update_attempt (line 172) | async def update_attempt( method query_workers (line 190) | async def query_workers(self, *args: Any, **kwargs: Any) -> List[Worker]: method get_worker_by_id (line 194) | async def get_worker_by_id(self, worker_id: str) -> Optional[Worker]: method update_worker (line 198) | async def update_worker( function minimal_dummy_store (line 216) | def minimal_dummy_store() -> DummyLightningStore: FILE: tests/store/test_client_server.py function _make_span (line 44) | def _make_span(rollout_id: str, attempt_id: str, sequence_id: int, name:... class MockResponse (line 65) | class MockResponse: method __init__ (line 68) | def __init__(self, context_manager: Any): method __aenter__ (line 71) | async def __aenter__(self) -> aiohttp.ClientResponse: method __aexit__ (line 74) | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) ->... function server_client (line 79) | async def server_client( function _exercise_server_metrics_backend (line 93) | async def _exercise_server_metrics_backend(tracker: MetricsBackend) -> N... function _run_server_side_operations (line 107) | async def _run_server_side_operations(server: LightningStoreServer) -> N... function _run_client_side_operations (line 123) | async def _run_client_side_operations(client: LightningStoreClient) -> N... function test_mp_server_does_not_work_with_inmemory_store (line 154) | async def test_mp_server_does_not_work_with_inmemory_store() -> None: function test_server_start_rejects_port_conflict (line 162) | async def test_server_start_rejects_port_conflict(caplog: pytest.LogCapt... function test_run_forever_rejects_port_conflict (line 181) | async def test_run_forever_rejects_port_conflict(caplog: pytest.LogCaptu... function test_server_accepts_custom_launcher_args (line 199) | async def test_server_accepts_custom_launcher_args(store_fixture: Lightn... function test_server_client_statistics_match (line 224) | async def test_server_client_statistics_match(server_client: Tuple[Light... function test_client_start_rollout_propagates_worker_id (line 242) | async def test_client_start_rollout_propagates_worker_id( function test_client_start_attempt_propagates_worker_id (line 257) | async def test_client_start_attempt_propagates_worker_id( function test_console_metrics_backend_tracks_http_and_store_metrics (line 274) | async def test_console_metrics_backend_tracks_http_and_store_metrics() -... function test_prometheus_metrics_backend_tracks_http_metrics (line 287) | async def test_prometheus_metrics_backend_tracks_http_metrics(monkeypatc... function test_multi_metrics_backend_updates_all_children (line 301) | async def test_multi_metrics_backend_updates_all_children(monkeypatch: p... function test_client_enqueue_many_rollouts_uses_batch_payload (line 319) | async def test_client_enqueue_many_rollouts_uses_batch_payload(monkeypat... function test_client_dequeue_methods_share_batch_logic (line 346) | async def test_client_dequeue_methods_share_batch_logic(monkeypatch: Mon... function test_client_dequeue_many_rollouts_skips_network_for_non_positive_limit (line 414) | async def test_client_dequeue_many_rollouts_skips_network_for_non_positi... function test_client_concurrent_enqueue_many_rollouts (line 428) | async def test_client_concurrent_enqueue_many_rollouts( function test_client_concurrent_dequeue_many_rollouts (line 448) | async def test_client_concurrent_dequeue_many_rollouts( function test_add_resources_via_server (line 469) | async def test_add_resources_via_server(server_client: Tuple[LightningSt... function test_add_resources_via_client (line 505) | async def test_add_resources_via_client(server_client: Tuple[LightningSt... function test_query_resources_history (line 539) | async def test_query_resources_history(server_client: Tuple[LightningSto... function test_client_query_resources_filters_and_pagination (line 581) | async def test_client_query_resources_filters_and_pagination( function test_client_server_end_to_end (line 601) | async def test_client_server_end_to_end( function test_client_query_rollouts_filters_and_pagination (line 766) | async def test_client_query_rollouts_filters_and_pagination( function test_update_rollout_none_vs_unset (line 787) | async def test_update_rollout_none_vs_unset(server_client: Tuple[Lightni... function test_update_rollout_rejects_none_values (line 824) | async def test_update_rollout_rejects_none_values( function test_update_attempt_none_vs_unset (line 839) | async def test_update_attempt_none_vs_unset(server_client: Tuple[Lightni... function test_update_worker_records_heartbeat (line 868) | async def test_update_worker_records_heartbeat( function test_update_worker_rejects_none_stats (line 885) | async def test_update_worker_rejects_none_stats( function test_worker_status_transitions_via_attempts (line 895) | async def test_worker_status_transitions_via_attempts( function test_client_query_workers_filters (line 922) | async def test_client_query_workers_filters(server_client: Tuple[Lightni... function test_get_worker_by_id (line 953) | async def test_get_worker_by_id(server_client: Tuple[LightningStoreServe... function test_update_attempt_rejects_none_values (line 977) | async def test_update_attempt_rejects_none_values( function test_client_query_spans_filters_and_pagination (line 991) | async def test_client_query_spans_filters_and_pagination( function test_server_get_many_span_sequence_ids_and_add_many_spans_mixed_batches (line 1031) | async def test_server_get_many_span_sequence_ids_and_add_many_spans_mixe... function test_client_handles_optional_span_results_and_batch_insert (line 1073) | async def test_client_handles_optional_span_results_and_batch_insert( function test_concurrent_add_otel_span_sequence_ids_unique (line 1112) | async def test_concurrent_add_otel_span_sequence_ids_unique( function test_subprocess_operations_sync_via_http_automatically (line 1138) | async def test_subprocess_operations_sync_via_http_automatically() -> None: function test_subprocess_client_operations_work_but_direct_store_access_fails (line 1190) | async def test_subprocess_client_operations_work_but_direct_store_access... function test_retry_on_400_application_error (line 1275) | async def test_retry_on_400_application_error( function test_no_retry_on_non408_4xx (line 1303) | async def test_no_retry_on_non408_4xx( function test_retry_on_transient_network_errors_then_success (line 1341) | async def test_retry_on_transient_network_errors_then_success( function test_retry_on_transient_http_status_then_success (line 1366) | async def test_retry_on_transient_http_status_then_success( function test_unhealthy_health_probe_stops_retries (line 1391) | async def test_unhealthy_health_probe_stops_retries( function test_wait_for_rollouts_timeout_guard_raises (line 1422) | async def test_wait_for_rollouts_timeout_guard_raises( function test_retry_mechanism_with_custom_delays_and_health_recovery (line 1431) | async def test_retry_mechanism_with_custom_delays_and_health_recovery( function test_client_response_error_with_different_status_codes (line 1505) | async def test_client_response_error_with_different_status_codes( function test_get_next_span_sequence_id_returns_proper_int (line 1555) | async def test_get_next_span_sequence_id_returns_proper_int( function test_empty_retry_delays_disable_retries (line 1578) | async def test_empty_retry_delays_disable_retries(monkeypatch: MonkeyPat... function test_empty_health_retry_delays_skip_health_checks (line 1638) | async def test_empty_health_retry_delays_skip_health_checks(monkeypatch:... FILE: tests/store/test_collection.py function _build_collection (line 46) | def _build_collection(items: Iterable[SampleItem] = ()) -> ListBasedColl... function _key_pairs (line 62) | def _key_pairs(items: Sequence[SampleItem]) -> List[Tuple[str, int]]: function _sorted_pairs (line 66) | def _sorted_pairs(items: Sequence[SampleItem]) -> List[Tuple[str, int]]: function test_list_collection_requires_primary_keys (line 70) | def test_list_collection_requires_primary_keys(sample_items: Sequence[Sa... function test_list_collection_primary_keys (line 76) | async def test_list_collection_primary_keys(sample_collection: Collectio... function test_list_collection_item_type (line 81) | async def test_list_collection_item_type(sample_collection: Collection[S... function test_list_collection_initial_size (line 86) | async def test_list_collection_initial_size( function test_list_collection_repr_contains_model_info (line 93) | async def test_list_collection_repr_contains_model_info(sample_collectio... function test_list_collection_insert_adds_item (line 102) | async def test_list_collection_insert_adds_item(sample_collection: Colle... function test_list_collection_insert_duplicate_raises (line 111) | async def test_list_collection_insert_duplicate_raises(sample_collection... function test_list_collection_insert_rejects_duplicate_payload (line 118) | async def test_list_collection_insert_rejects_duplicate_payload(sample_c... function test_list_collection_insert_wrong_type (line 134) | async def test_list_collection_insert_wrong_type(sample_collection: Coll... function test_list_collection_update_existing (line 145) | async def test_list_collection_update_existing(sample_collection: Collec... function test_list_collection_update_missing_raises (line 153) | async def test_list_collection_update_missing_raises(sample_collection: ... function test_list_collection_delete_existing (line 160) | async def test_list_collection_delete_existing(sample_collection: Collec... function test_list_collection_delete_missing_raises (line 169) | async def test_list_collection_delete_missing_raises(sample_collection: ... function test_list_collection_upsert_inserts_when_missing (line 176) | async def test_list_collection_upsert_inserts_when_missing(sample_collec... function test_list_collection_upsert_updates_when_existing (line 185) | async def test_list_collection_upsert_updates_when_existing(sample_colle... function test_list_collection_upsert_get_or_insert_semantics (line 194) | async def test_list_collection_upsert_get_or_insert_semantics(sample_col... function test_list_collection_upsert_updates_selected_fields (line 221) | async def test_list_collection_upsert_updates_selected_fields(sample_col... function test_list_collection_update_returns_mutated_items (line 251) | async def test_list_collection_update_returns_mutated_items(sample_colle... function test_list_collection_upsert_returns_mutated_items (line 284) | async def test_list_collection_upsert_returns_mutated_items(sample_colle... function test_list_collection_delete_multiple_items (line 314) | async def test_list_collection_delete_multiple_items(sample_collection: ... function test_list_collection_insert_accepts_tuple_sequence (line 325) | async def test_list_collection_insert_accepts_tuple_sequence( function test_list_collection_query_without_filters_returns_all (line 339) | async def test_list_collection_query_without_filters_returns_all( function test_list_collection_query_filters (line 387) | async def test_list_collection_query_filters( function test_list_collection_filter_logic (line 430) | async def test_list_collection_filter_logic( function test_list_collection_must_filters_respected_with_or (line 443) | async def test_list_collection_must_filters_respected_with_or( function test_list_collection_must_filters_accept_sequence (line 457) | async def test_list_collection_must_filters_accept_sequence( function test_list_collection_must_filters_limit_tree_scan_even_with_or (line 474) | async def test_list_collection_must_filters_limit_tree_scan_even_with_or( function test_list_collection_primary_key_prefix_limits_filter_checks (line 506) | async def test_list_collection_primary_key_prefix_limits_filter_checks( function test_list_collection_full_primary_key_avoids_tree_scan (line 532) | async def test_list_collection_full_primary_key_avoids_tree_scan( function test_list_collection_sorting (line 592) | async def test_list_collection_sorting( function test_list_collection_sort_by_missing_field_raises (line 607) | async def test_list_collection_sort_by_missing_field_raises(sample_colle... function test_list_collection_pagination_without_sort (line 624) | async def test_list_collection_pagination_without_sort( function test_list_collection_pagination_with_sort (line 637) | async def test_list_collection_pagination_with_sort(sample_collection: C... function test_list_collection_limit_unbounded_with_sort (line 644) | async def test_list_collection_limit_unbounded_with_sort(sample_collecti... function test_list_collection_limit_zero_reports_total (line 651) | async def test_list_collection_limit_zero_reports_total(sample_collectio... function test_list_collection_offset_beyond_total_returns_empty (line 658) | async def test_list_collection_offset_beyond_total_returns_empty( function test_list_collection_query_reports_total_with_limit (line 667) | async def test_list_collection_query_reports_total_with_limit( function test_list_collection_get_returns_first_match (line 676) | async def test_list_collection_get_returns_first_match(sample_collection... function test_list_collection_get_returns_none (line 683) | async def test_list_collection_get_returns_none(sample_collection: Colle... function test_list_collection_get_respects_filter_logic (line 689) | async def test_list_collection_get_respects_filter_logic(sample_collecti... function test_list_collection_get_honors_sort_by (line 697) | async def test_list_collection_get_honors_sort_by(sample_collection: Col... function test_list_collection_get_honors_sort_order (line 705) | async def test_list_collection_get_honors_sort_order(sample_collection: ... function test_list_collection_query_handles_large_dataset (line 713) | async def test_list_collection_query_handles_large_dataset() -> None: function test_list_collection_bulk_delete_and_size (line 735) | async def test_list_collection_bulk_delete_and_size() -> None: function test_list_collection_query_rejects_unknown_operator (line 745) | async def test_list_collection_query_rejects_unknown_operator( function test_list_collection_query_result_type (line 753) | async def test_list_collection_query_result_type() -> None: function test_deque_queue_initial_size (line 761) | async def test_deque_queue_initial_size(deque_queue: DequeBasedQueue[Que... function test_deque_queue_item_type (line 765) | def test_deque_queue_item_type(deque_queue: DequeBasedQueue[QueueItem]) ... function test_deque_queue_has_detects_members (line 770) | async def test_deque_queue_has_detects_members(deque_queue: DequeBasedQu... function test_deque_queue_enqueue_appends_items (line 776) | async def test_deque_queue_enqueue_appends_items(deque_queue: DequeBased... function test_deque_queue_enqueue_rejects_wrong_type (line 784) | async def test_deque_queue_enqueue_rejects_wrong_type(deque_queue: Deque... function test_deque_queue_dequeue_respects_limit (line 794) | async def test_deque_queue_dequeue_respects_limit(deque_queue: DequeBase... function test_deque_queue_dequeue_zero_returns_empty (line 801) | async def test_deque_queue_dequeue_zero_returns_empty(deque_queue: Deque... function test_deque_queue_dequeue_more_than_available (line 806) | async def test_deque_queue_dequeue_more_than_available(deque_queue: Dequ... function test_deque_queue_peek_preserves_items (line 813) | async def test_deque_queue_peek_preserves_items(deque_queue: DequeBasedQ... function test_deque_queue_peek_zero_returns_empty (line 820) | async def test_deque_queue_peek_zero_returns_empty(deque_queue: DequeBas... function test_deque_queue_peek_after_partial_dequeue (line 825) | async def test_deque_queue_peek_after_partial_dequeue(deque_queue: Deque... function test_deque_queue_handles_large_volume (line 832) | async def test_deque_queue_handles_large_volume() -> None: function test_dict_key_value_initial_state (line 843) | async def test_dict_key_value_initial_state(dict_key_value: DictBasedKey... function test_dict_key_value_has_handles_presence (line 850) | async def test_dict_key_value_has_handles_presence(dict_key_value: DictB... function test_dict_key_value_set_updates_and_expands (line 856) | async def test_dict_key_value_set_updates_and_expands(dict_key_value: Di... function test_dict_key_value_pop_returns_default (line 865) | async def test_dict_key_value_pop_returns_default(dict_key_value: DictBa... function test_key_value_inc_updates_existing (line 875) | async def test_key_value_inc_updates_existing(dict_key_value: KeyValue[s... function test_key_value_inc_initializes_missing (line 882) | async def test_key_value_inc_initializes_missing(dict_key_value: KeyValu... function test_key_value_inc_rejects_non_numeric_amount (line 889) | async def test_key_value_inc_rejects_non_numeric_amount(dict_key_value: ... function test_key_value_chmax_updates_existing (line 895) | async def test_key_value_chmax_updates_existing(dict_key_value: KeyValue... function test_key_value_chmax_ignores_smaller (line 902) | async def test_key_value_chmax_ignores_smaller(dict_key_value: KeyValue[... function test_key_value_chmax_initializes_missing (line 910) | async def test_key_value_chmax_initializes_missing(dict_key_value: KeyVa... function test_key_value_chmax_rejects_non_numeric_value (line 917) | async def test_key_value_chmax_rejects_non_numeric_value(dict_key_value:... function test_dict_key_value_inc_rejects_non_numeric_value (line 923) | async def test_dict_key_value_inc_rejects_non_numeric_value(dict_key_val... function test_dict_key_value_chmax_rejects_non_numeric_value (line 930) | async def test_dict_key_value_chmax_rejects_non_numeric_value( function test_mongo_key_value_inc_rejects_non_numeric_value (line 940) | async def test_mongo_key_value_inc_rejects_non_numeric_value(temporary_m... function test_mongo_key_value_chmax_behaves_like_max (line 969) | async def test_mongo_key_value_chmax_behaves_like_max(temporary_mongo_da... function test_mongo_key_value_chmax_rejects_non_numeric_value (line 991) | async def test_mongo_key_value_chmax_rejects_non_numeric_value(temporary... function test_thread_safe_async_lock_blocks_threads (line 1018) | def test_thread_safe_async_lock_blocks_threads() -> None: function test_thread_safe_async_lock_serializes_async_tasks (line 1056) | async def test_thread_safe_async_lock_serializes_async_tasks() -> None: function test_loop_aware_async_lock_serializes_tasks (line 1086) | async def test_loop_aware_async_lock_serializes_tasks() -> None: function test_loop_aware_async_lock_reuses_loop_specific_lock (line 1116) | async def test_loop_aware_async_lock_reuses_loop_specific_lock() -> None: function test_loop_aware_async_lock_distinguishes_event_loops (line 1131) | async def test_loop_aware_async_lock_distinguishes_event_loops() -> None: function test_dict_key_value_does_not_mutate_input_mapping (line 1158) | async def test_dict_key_value_does_not_mutate_input_mapping(dict_key_val... function test_inmemory_atomic_read_only_skips_lock (line 1166) | async def test_inmemory_atomic_read_only_skips_lock() -> None: function test_inmemory_atomic_snapshot_or_write_acquires_lock (line 1184) | async def test_inmemory_atomic_snapshot_or_write_acquires_lock() -> None: function test_mongo_based_sanity_check (line 1216) | async def test_mongo_based_sanity_check(temporary_mongo_database: AsyncD... function test_mongo_ensure_collection_creates_partition_scoped_index (line 1267) | async def test_mongo_ensure_collection_creates_partition_scoped_index( function test_mongo_ensure_collection_survives_concurrent_calls (line 1299) | async def test_mongo_ensure_collection_survives_concurrent_calls(tempora... function test_mongo_ensure_collection_repeats_without_altering_indexes (line 1332) | async def test_mongo_ensure_collection_repeats_without_altering_indexes( function _with_mongo_collections (line 1355) | async def _with_mongo_collections( function _initialize_counter (line 1372) | async def _initialize_counter(collections: MongoLightningCollections, ke... function _read_counter (line 1379) | async def _read_counter(collections: MongoLightningCollections, key: str... function _contention_run (line 1388) | async def _contention_run( function test_mongo_execute_without_commit_allows_lost_updates (line 1428) | async def test_mongo_execute_without_commit_allows_lost_updates( function test_mongo_execute_with_commit_retries_until_success (line 1447) | async def test_mongo_execute_with_commit_retries_until_success( FILE: tests/store/test_core.py class FakeTimeController (line 52) | class FakeTimeController(Protocol): method set (line 53) | def set(self, value: float) -> None: ... method advance (line 55) | def advance(self, delta: float) -> None: ... function test_paginated_result_behaves_like_sequence (line 58) | def test_paginated_result_behaves_like_sequence() -> None: function test_statistics_updates_counts (line 74) | async def test_statistics_updates_counts(store_fixture: LightningStore, ... function test_enqueue_rollout_creates_rollout (line 105) | async def test_enqueue_rollout_creates_rollout(store_fixture: LightningS... function test_enqueue_rollout_accepts_config (line 122) | async def test_enqueue_rollout_accepts_config(store_fixture: LightningSt... function test_add_rollout_initializes_attempt (line 140) | async def test_add_rollout_initializes_attempt(store_fixture: LightningS... function test_start_rollout_accepts_config (line 167) | async def test_start_rollout_accepts_config(store_fixture: LightningStor... function test_query_rollouts_by_status (line 185) | async def test_query_rollouts_by_status(store_fixture: LightningStore) -... function test_query_rollouts_returns_latest_attempt (line 219) | async def test_query_rollouts_returns_latest_attempt(store_fixture: Ligh... function test_query_rollouts_supports_new_filters (line 234) | async def test_query_rollouts_supports_new_filters(store_fixture: Lightn... function test_query_rollouts_status_in_takes_precedence (line 264) | async def test_query_rollouts_status_in_takes_precedence(store_fixture: ... function test_query_rollouts_rollout_id_in_takes_precedence (line 279) | async def test_query_rollouts_rollout_id_in_takes_precedence(store_fixtu... function test_query_rollouts_filter_logic_controls_contains_behavior (line 289) | async def test_query_rollouts_filter_logic_controls_contains_behavior(st... function test_query_rollouts_combined_filters_with_sort_and_pagination (line 313) | async def test_query_rollouts_combined_filters_with_sort_and_pagination(... function test_query_rollouts_reports_pagination_metadata (line 335) | async def test_query_rollouts_reports_pagination_metadata(store_fixture:... function test_query_attempts_supports_sort_and_limit (line 347) | async def test_query_attempts_supports_sort_and_limit(store_fixture: Lig... function test_query_attempts_offset_past_end_returns_empty (line 367) | async def test_query_attempts_offset_past_end_returns_empty(store_fixtur... function test_query_attempts_zero_limit_returns_no_items (line 384) | async def test_query_attempts_zero_limit_returns_no_items(store_fixture:... function test_query_attempts_reports_pagination_metadata (line 394) | async def test_query_attempts_reports_pagination_metadata(store_fixture:... function test_get_rollout_by_id_returns_latest_attempt (line 414) | async def test_get_rollout_by_id_returns_latest_attempt(store_fixture: L... function test_get_rollout_by_id_without_attempt_returns_rollout (line 427) | async def test_get_rollout_by_id_without_attempt_returns_rollout( function test_get_rollout_by_id (line 440) | async def test_get_rollout_by_id(store_fixture: LightningStore) -> None: function test_store_lock_rebinds_to_new_event_loop (line 465) | async def test_store_lock_rebinds_to_new_event_loop( function test_query_rollouts_by_rollout_ids (line 486) | async def test_query_rollouts_by_rollout_ids(store_fixture: LightningSto... function test_update_rollout_fields (line 521) | async def test_update_rollout_fields(store_fixture: LightningStore) -> N... function test_rollout_config_functionality (line 553) | async def test_rollout_config_functionality(store_fixture: LightningStor... function test_dequeue_rollout_skips_non_queuing_status (line 595) | async def test_dequeue_rollout_skips_non_queuing_status(store_fixture: L... function test_fifo_ordering (line 630) | async def test_fifo_ordering(store_fixture: LightningStore) -> None: function test_pop_empty_queue (line 647) | async def test_pop_empty_queue(store_fixture: LightningStore) -> None: function test_requeue_mechanism (line 658) | async def test_requeue_mechanism(store_fixture: LightningStore) -> None: function test_enqueue_many_rollouts_preserves_order (line 687) | async def test_enqueue_many_rollouts_preserves_order(store_fixture: Ligh... function test_dequeue_many_rollouts_with_limit (line 711) | async def test_dequeue_many_rollouts_with_limit(store_fixture: Lightning... function test_update_and_query_workers (line 730) | async def test_update_and_query_workers(store_fixture: LightningStore) -... function test_worker_sync_preserves_existing_fields (line 773) | async def test_worker_sync_preserves_existing_fields(store_fixture: Ligh... function test_start_rollout_assigns_worker (line 794) | async def test_start_rollout_assigns_worker(store_fixture: LightningStor... function test_dequeue_rollout_assigns_worker (line 807) | async def test_dequeue_rollout_assigns_worker(store_fixture: LightningSt... function test_start_attempt_assigns_worker (line 822) | async def test_start_attempt_assigns_worker(store_fixture: LightningStor... function test_query_workers_supports_filters (line 837) | async def test_query_workers_supports_filters(store_fixture: LightningSt... function test_query_workers_filter_logic_or_combines_conditions (line 872) | async def test_query_workers_filter_logic_or_combines_conditions(store_f... function test_query_workers_filter_logic_and_with_sort (line 897) | async def test_query_workers_filter_logic_and_with_sort(store_fixture: L... function test_query_workers_reports_pagination_metadata (line 929) | async def test_query_workers_reports_pagination_metadata(store_fixture: ... function test_add_resources_generates_id_and_stores (line 945) | async def test_add_resources_generates_id_and_stores(store_fixture: Ligh... function test_add_resources_multiple_times_generates_unique_ids (line 984) | async def test_add_resources_multiple_times_generates_unique_ids(store_f... function test_query_resources_returns_history (line 1012) | async def test_query_resources_returns_history(store_fixture: LightningS... function test_query_resources_supports_filters (line 1035) | async def test_query_resources_supports_filters(store_fixture: Lightning... function test_query_resources_combines_exact_and_contains_filters (line 1055) | async def test_query_resources_combines_exact_and_contains_filters(store... function test_query_resources_offset_beyond_range_returns_empty (line 1068) | async def test_query_resources_offset_beyond_range_returns_empty(store_f... function test_query_resources_contains_with_sort_and_pagination (line 1084) | async def test_query_resources_contains_with_sort_and_pagination(store_f... function test_query_resources_reports_pagination_metadata (line 1105) | async def test_query_resources_reports_pagination_metadata(store_fixture... function test_resource_lifecycle (line 1124) | async def test_resource_lifecycle(store_fixture: LightningStore) -> None: function test_latest_resources_rehydrates_cache (line 1171) | async def test_latest_resources_rehydrates_cache(store_fixture: Lightnin... function test_task_inherits_latest_resources (line 1191) | async def test_task_inherits_latest_resources(store_fixture: LightningSt... function test_span_sequence_generation (line 1232) | async def test_span_sequence_generation(store_fixture: LightningStore, m... function test_get_many_span_sequence_ids_handles_mixed_batches (line 1260) | async def test_get_many_span_sequence_ids_handles_mixed_batches(store_fi... function test_add_many_spans_handles_mixed_rollouts_and_attempts (line 1283) | async def test_add_many_spans_handles_mixed_rollouts_and_attempts(store_... function test_add_span_returns_none_on_duplicate (line 1328) | async def test_add_span_returns_none_on_duplicate(store_fixture: Lightni... function test_span_updates_attempt_status (line 1357) | async def test_span_updates_attempt_status(store_fixture: LightningStore... function test_spans_promote_preparing_attempt_with_heartbeat (line 1376) | async def test_spans_promote_preparing_attempt_with_heartbeat( function test_unresponsive_attempt_recovers_after_span (line 1405) | async def test_unresponsive_attempt_recovers_after_span( function test_running_attempt_updates_heartbeat (line 1431) | async def test_running_attempt_updates_heartbeat( function test_span_post_add_preserves_concurrent_updates (line 1453) | async def test_span_post_add_preserves_concurrent_updates( function test_healthcheck_marks_unresponsive_and_updates_worker (line 1477) | async def test_healthcheck_marks_unresponsive_and_updates_worker( function test_duplicate_span_id_error (line 1524) | async def test_duplicate_span_id_error( function test_span_with_explicit_sequence_id (line 1546) | async def test_span_with_explicit_sequence_id(store_fixture: LightningSt... function test_query_spans_by_attempt (line 1563) | async def test_query_spans_by_attempt(store_fixture: LightningStore, moc... function test_query_spans_supports_filters (line 1605) | async def test_query_spans_supports_filters(store_fixture: LightningStor... function test_query_spans_filter_logic_respects_rollout_scope (line 1669) | async def test_query_spans_filter_logic_respects_rollout_scope(store_fix... function test_query_spans_supports_name_contains_filter (line 1712) | async def test_query_spans_supports_name_contains_filter(store_fixture: ... function test_query_spans_multiple_filters_require_all (line 1754) | async def test_query_spans_multiple_filters_require_all(store_fixture: L... function test_query_spans_reports_pagination_metadata (line 1801) | async def test_query_spans_reports_pagination_metadata(store_fixture: Li... function test_query_spans_or_filters_with_sort_and_offset (line 1846) | async def test_query_spans_or_filters_with_sort_and_offset(store_fixture... function test_span_eviction_removes_oldest_rollouts (line 1895) | async def test_span_eviction_removes_oldest_rollouts(mock_readable_span:... function test_memory_threshold_accepts_byte_values (line 1918) | def test_memory_threshold_accepts_byte_values() -> None: function test_memory_threshold_accepts_ratios_with_zero_safe (line 1928) | def test_memory_threshold_accepts_ratios_with_zero_safe(monkeypatch: pyt... function test_invalid_safe_threshold_raises_value_error (line 1939) | def test_invalid_safe_threshold_raises_value_error() -> None: function test_estimate_model_size_counts_nested_models (line 1947) | def test_estimate_model_size_counts_nested_models() -> None: function test_estimate_model_size_handles_span_objects (line 1974) | def test_estimate_model_size_handles_span_objects() -> None: function test_span_triggers_status_transition (line 2061) | async def test_span_triggers_status_transition(store_fixture: LightningS... function test_span_does_not_reset_timeout_attempt (line 2091) | async def test_span_does_not_reset_timeout_attempt(store_fixture: Lightn... function test_completion_sets_end_time (line 2128) | async def test_completion_sets_end_time(store_fixture: LightningStore) -... function test_wait_for_rollouts (line 2146) | async def test_wait_for_rollouts(store_fixture: LightningStore) -> None: function test_wait_timeout (line 2174) | async def test_wait_timeout(store_fixture: LightningStore) -> None: function test_wait_with_timeout_none_polling (line 2187) | async def test_wait_with_timeout_none_polling(store_fixture: LightningSt... function test_wait_with_timeout_none_can_be_cancelled (line 2212) | async def test_wait_with_timeout_none_can_be_cancelled(store_fixture: Li... function test_wait_with_timeout_zero (line 2237) | async def test_wait_with_timeout_zero(store_fixture: LightningStore) -> ... function test_wait_with_already_completed_rollout (line 2251) | async def test_wait_with_already_completed_rollout(store_fixture: Lightn... function test_wait_multiple_rollouts_different_completion_times (line 2270) | async def test_wait_multiple_rollouts_different_completion_times(store_f... function test_wait_partial_completion_on_timeout (line 2301) | async def test_wait_partial_completion_on_timeout(store_fixture: Lightni... function test_wait_concurrent_waiters_on_same_rollout (line 2327) | async def test_wait_concurrent_waiters_on_same_rollout(store_fixture: Li... function test_wait_nonexistent_rollout_with_finite_timeout (line 2353) | async def test_wait_nonexistent_rollout_with_finite_timeout(store_fixtur... function test_wait_mixed_existing_and_nonexistent_rollouts (line 2369) | async def test_wait_mixed_existing_and_nonexistent_rollouts(store_fixtur... function test_wait_event_set_before_wait_starts (line 2391) | async def test_wait_event_set_before_wait_starts(store_fixture: Lightnin... function test_wait_polling_interval_with_timeout_none (line 2409) | async def test_wait_polling_interval_with_timeout_none(store_fixture: Li... function test_concurrent_task_addition (line 2444) | async def test_concurrent_task_addition(store_fixture: LightningStore) -... function test_concurrent_pop_operations (line 2465) | async def test_concurrent_pop_operations(store_fixture: LightningStore) ... function test_concurrent_span_additions (line 2491) | async def test_concurrent_span_additions(store_fixture: LightningStore, ... function test_concurrent_resource_updates (line 2511) | async def test_concurrent_resource_updates(store_fixture: LightningStore... function test_update_nonexistent_rollout (line 2547) | async def test_update_nonexistent_rollout(store_fixture: LightningStore)... function test_add_span_without_rollout (line 2554) | async def test_add_span_without_rollout(store_fixture: LightningStore, m... function test_add_span_with_missing_attempt (line 2561) | async def test_add_span_with_missing_attempt(store_fixture: LightningSto... function test_query_empty_spans (line 2579) | async def test_query_empty_spans(store_fixture: LightningStore) -> None: function test_query_latest_with_no_spans (line 2594) | async def test_query_latest_with_no_spans(store_fixture: LightningStore)... function test_wait_for_nonexistent_rollout (line 2603) | async def test_wait_for_nonexistent_rollout(store_fixture: LightningStor... function test_query_attempts (line 2613) | async def test_query_attempts(store_fixture: LightningStore) -> None: function test_get_latest_attempt (line 2638) | async def test_get_latest_attempt(store_fixture: LightningStore) -> None: function test_update_attempt_fields (line 2661) | async def test_update_attempt_fields(store_fixture: LightningStore) -> N... function test_update_latest_attempt (line 2687) | async def test_update_latest_attempt(store_fixture: LightningStore) -> N... function test_update_attempt_sets_end_time_for_terminal_status (line 2700) | async def test_update_attempt_sets_end_time_for_terminal_status(store_fi... function test_rollout_retry_lifecycle_updates_statuses (line 2733) | async def test_rollout_retry_lifecycle_updates_statuses( function test_update_nonexistent_attempt (line 2796) | async def test_update_nonexistent_attempt(store_fixture: LightningStore)... function test_add_attempt_creates_new_attempt (line 2808) | async def test_add_attempt_creates_new_attempt(store_fixture: LightningS... function test_add_attempt_increments_sequence_id (line 2829) | async def test_add_attempt_increments_sequence_id(store_fixture: Lightni... function test_add_attempt_nonexistent_rollout (line 2850) | async def test_add_attempt_nonexistent_rollout(store_fixture: LightningS... function test_add_attempt_ignores_max_attempts (line 2857) | async def test_add_attempt_ignores_max_attempts(store_fixture: Lightning... function test_status_propagation_only_for_latest_attempt (line 2882) | async def test_status_propagation_only_for_latest_attempt(store_fixture:... function test_status_propagation_with_retry_for_latest_attempt (line 2913) | async def test_status_propagation_with_retry_for_latest_attempt(store_fi... function test_status_propagation_latest_changes_when_new_attempt_added (line 2943) | async def test_status_propagation_latest_changes_when_new_attempt_added(... function test_status_propagation_update_latest_by_reference (line 2982) | async def test_status_propagation_update_latest_by_reference(store_fixtu... function test_healthcheck_timeout_behavior (line 3007) | async def test_healthcheck_timeout_behavior(store_fixture: LightningStor... function test_healthcheck_unresponsive_behavior (line 3042) | async def test_healthcheck_unresponsive_behavior(store_fixture: Lightnin... function test_full_lifecycle_success (line 3081) | async def test_full_lifecycle_success(store_fixture: LightningStore, moc... function _retry_config (line 3127) | def _retry_config() -> RolloutConfig: function test_requeued_attempt_recovers_before_retry (line 3134) | async def test_requeued_attempt_recovers_before_retry(store_fixture: Lig... function test_requeued_attempt_succeeds_without_new_attempt (line 3164) | async def test_requeued_attempt_succeeds_without_new_attempt( function test_requeued_attempt_fails_without_new_attempt (line 3195) | async def test_requeued_attempt_fails_without_new_attempt( function test_requeued_attempt_recovers_after_retry_started (line 3226) | async def test_requeued_attempt_recovers_after_retry_started( function test_resources_update_tracks_create_and_update_times (line 3261) | async def test_resources_update_tracks_create_and_update_times(store_fix... function test_resources_update_version_increments (line 3300) | async def test_resources_update_version_increments(store_fixture: Lightn... function test_resources_different_ids_have_independent_versions (line 3328) | async def test_resources_different_ids_have_independent_versions(store_f... function test_query_resources_returns_all_fields (line 3370) | async def test_query_resources_returns_all_fields(store_fixture: Lightni... function test_scan_debounce_allows_initial_scan (line 3397) | async def test_scan_debounce_allows_initial_scan( function test_scan_debounce_blocks_until_interval (line 3407) | async def test_scan_debounce_blocks_until_interval( function test_scan_debounce_allows_single_concurrent_scan (line 3424) | async def test_scan_debounce_allows_single_concurrent_scan( function test_scan_debounce_disabled_when_zero (line 3441) | async def test_scan_debounce_disabled_when_zero(store_fixture: Collectio... FILE: tests/store/test_restful.py function _make_span (line 39) | def _make_span(rollout_id: str, attempt_id: str, sequence_id: int, name:... function _run_server_with_cors (line 61) | async def _run_server_with_cors(cors_origins: List[str] | str | None = N... function _request_rollouts_page (line 74) | async def _request_rollouts_page( function _request_attempts_page (line 88) | async def _request_attempts_page( function _request_spans_page (line 107) | async def _request_spans_page( function _request_workers_page (line 127) | async def _request_workers_page( function server_client (line 146) | async def server_client( function test_cors_allows_specific_origin (line 168) | async def test_cors_allows_specific_origin() -> None: function test_cors_disallows_unconfigured_origin (line 191) | async def test_cors_disallows_unconfigured_origin() -> None: function test_cors_allows_wildcard_origin (line 200) | async def test_cors_allows_wildcard_origin() -> None: function test_enqueue_endpoint_batches_payloads (line 214) | async def test_enqueue_endpoint_batches_payloads( function test_dequeue_endpoint_returns_batches (line 242) | async def test_dequeue_endpoint_returns_batches( function test_enqueue_endpoint_requires_rollouts_field (line 270) | async def test_enqueue_endpoint_requires_rollouts_field( function test_dequeue_endpoint_zero_limit_returns_empty (line 280) | async def test_dequeue_endpoint_zero_limit_returns_empty( function test_statistics_endpoint_returns_counts (line 297) | async def test_statistics_endpoint_returns_counts( function test_rest_start_rollout_propagates_worker_id (line 314) | async def test_rest_start_rollout_propagates_worker_id( function test_rest_start_attempt_propagates_worker_id (line 333) | async def test_rest_start_attempt_propagates_worker_id( function test_rollouts_pagination_basic (line 363) | async def test_rollouts_pagination_basic( function test_rollouts_pagination_disabled (line 393) | async def test_rollouts_pagination_disabled( function test_rollouts_search_supports_get_and_post (line 414) | async def test_rollouts_search_supports_get_and_post( function test_rollouts_sorting_by_start_time (line 431) | async def test_rollouts_sorting_by_start_time( function test_rollouts_filter_by_status (line 469) | async def test_rollouts_filter_by_status( function test_rollouts_filter_by_rollout_id_in (line 503) | async def test_rollouts_filter_by_rollout_id_in( function test_rollouts_filter_by_rollout_id_contains (line 526) | async def test_rollouts_filter_by_rollout_id_contains( function test_rollouts_filter_logic_and (line 551) | async def test_rollouts_filter_logic_and( function test_rollouts_filter_logic_or (line 584) | async def test_rollouts_filter_logic_or( function test_rollouts_sorting_with_none_values (line 612) | async def test_rollouts_sorting_with_none_values( function test_rollouts_sorting_by_unsupported_field (line 651) | async def test_rollouts_sorting_by_unsupported_field( function test_attempts_pagination_basic (line 674) | async def test_attempts_pagination_basic( function test_attempts_search_supports_get_and_post (line 706) | async def test_attempts_search_supports_get_and_post( function test_attempts_sorting (line 721) | async def test_attempts_sorting( function test_attempts_sorting_with_none_values (line 759) | async def test_attempts_sorting_with_none_values( function test_resources_pagination_basic (line 794) | async def test_resources_pagination_basic( function test_resources_sorting_by_resources_id (line 827) | async def test_resources_sorting_by_resources_id( function test_resources_filter_by_resources_id_contains (line 865) | async def test_resources_filter_by_resources_id_contains( function test_resources_combined_filter_sort_and_pagination (line 895) | async def test_resources_combined_filter_sort_and_pagination( function test_spans_pagination_basic (line 953) | async def test_spans_pagination_basic( function test_spans_search_supports_get_and_post (line 987) | async def test_spans_search_supports_get_and_post( function test_spans_sorting_by_start_time (line 1010) | async def test_spans_sorting_by_start_time( function test_spans_filter_by_trace_id (line 1035) | async def test_spans_filter_by_trace_id( function test_spans_filter_by_name_contains (line 1068) | async def test_spans_filter_by_name_contains( function test_spans_filter_logic_and (line 1098) | async def test_spans_filter_logic_and( function test_spans_filter_logic_or (line 1139) | async def test_spans_filter_logic_or( function test_spans_sorting_with_none_values (line 1182) | async def test_spans_sorting_with_none_values( function test_spans_sorting_by_unsupported_field (line 1234) | async def test_spans_sorting_by_unsupported_field( function test_request_json_rollouts_returns_pagination_metadata (line 1260) | async def test_request_json_rollouts_returns_pagination_metadata( function test_request_json_attempts_returns_pagination_metadata (line 1282) | async def test_request_json_attempts_returns_pagination_metadata( function test_request_json_resources_returns_pagination_metadata (line 1307) | async def test_request_json_resources_returns_pagination_metadata( function test_request_json_workers_returns_pagination_metadata (line 1332) | async def test_request_json_workers_returns_pagination_metadata( function test_request_json_spans_returns_pagination_metadata (line 1354) | async def test_request_json_spans_returns_pagination_metadata( function test_update_rollout_distinguishes_unset_fields (line 1383) | async def test_update_rollout_distinguishes_unset_fields( function test_update_attempt_distinguishes_unset_fields (line 1403) | async def test_update_attempt_distinguishes_unset_fields( function test_client_query_rollouts_extracts_items (line 1427) | async def test_client_query_rollouts_extracts_items( function test_client_query_with_filters (line 1447) | async def test_client_query_with_filters( function test_workers_search_supports_get_and_post (line 1471) | async def test_workers_search_supports_get_and_post( function test_workers_endpoint_supports_updates (line 1491) | async def test_workers_endpoint_supports_updates( function test_workers_endpoint_rejects_none_stats (line 1530) | async def test_workers_endpoint_rejects_none_stats( function test_get_worker_by_id_restful (line 1543) | async def test_get_worker_by_id_restful( function test_workers_endpoint_filter_and_sort (line 1562) | async def test_workers_endpoint_filter_and_sort( FILE: tests/store/test_threading.py class SlowAttemptStore (line 37) | class SlowAttemptStore(LightningStore): method __init__ (line 38) | def __init__(self) -> None: method update_attempt (line 44) | async def update_attempt( class IncrementingResourceStore (line 76) | class IncrementingResourceStore(LightningStore): method __init__ (line 77) | def __init__(self) -> None: method update_resources (line 81) | async def update_resources(self, resources_id: str, resources: NamedRe... function make_span (line 94) | def make_span(rollout_id: str, attempt_id: str, sequence_id: int = 1) ->... function test_threaded_store_delegates_all_methods (line 116) | async def test_threaded_store_delegates_all_methods() -> None: function test_threaded_store_enqueue_many_rollouts_delegates (line 280) | async def test_threaded_store_enqueue_many_rollouts_delegates() -> None: function test_threaded_store_dequeue_many_rollouts_delegates (line 299) | async def test_threaded_store_dequeue_many_rollouts_delegates() -> None: function test_threaded_store_serializes_update_attempt_calls (line 315) | def test_threaded_store_serializes_update_attempt_calls() -> None: function test_threaded_store_prevents_race_conditions_on_resource_updates (line 341) | def test_threaded_store_prevents_race_conditions_on_resource_updates() -... function test_threaded_store_add_resources_delegates (line 358) | async def test_threaded_store_add_resources_delegates() -> None: function test_threaded_store_serializes_add_resources_calls (line 385) | def test_threaded_store_serializes_add_resources_calls() -> None: function test_threaded_store_statistics_match_underlying (line 410) | async def test_threaded_store_statistics_match_underlying(inmemory_store... FILE: tests/store/test_utils.py function test_rollout_status_from_attempt_direct_statuses (line 31) | async def test_rollout_status_from_attempt_direct_statuses( function test_rollout_status_from_attempt_retry_logic (line 57) | async def test_rollout_status_from_attempt_retry_logic( function test_rollout_status_from_attempt_invalid_status (line 78) | async def test_rollout_status_from_attempt_invalid_status() -> None: function test_scan_unhealthy_rollouts_empty_list (line 97) | async def test_scan_unhealthy_rollouts_empty_list() -> None: function test_scan_unhealthy_rollouts_multiple_rollouts_different_timeouts (line 105) | async def test_scan_unhealthy_rollouts_multiple_rollouts_different_timeo... function test_scan_unhealthy_rollouts_timeout_configurations (line 163) | async def test_scan_unhealthy_rollouts_timeout_configurations( function test_scan_unhealthy_rollouts_unresponsive_with_heartbeat_timing (line 205) | async def test_scan_unhealthy_rollouts_unresponsive_with_heartbeat_timin... function test_scan_unhealthy_rollouts_skips_rollouts_without_attempts (line 254) | async def test_scan_unhealthy_rollouts_skips_rollouts_without_attempts()... FILE: tests/test_client.py function sample_resources (line 28) | def sample_resources() -> NamedResources: function sample_task_input (line 41) | def sample_task_input() -> Dict[str, Any]: function server_setup (line 47) | async def server_setup() -> AsyncGenerator[Dict[str, Any], None]: function test_uri_and_semantic_correctness (line 70) | async def test_uri_and_semantic_correctness(server_setup: Dict[str, Any]... function test_full_lifecycle_async (line 102) | async def test_full_lifecycle_async( function test_full_lifecycle_sync (line 154) | async def test_full_lifecycle_sync( function test_task_timeout_and_requeue (line 200) | async def test_task_timeout_and_requeue(server_setup: Dict[str, Any]): function test_error_handling_no_resources (line 238) | async def test_error_handling_no_resources(server_setup: Dict[str, Any]): function test_client_with_bad_endpoint (line 257) | async def test_client_with_bad_endpoint(): function test_local_client_core_functionality (line 274) | def test_local_client_core_functionality(sample_resources: NamedResources): function test_local_client_error_handling (line 338) | def test_local_client_error_handling(sample_resources: NamedResources): function test_local_client_async_methods (line 369) | async def test_local_client_async_methods(sample_resources: NamedResourc... FILE: tests/test_config.py class SimpleConfig (line 41) | class SimpleConfig: method __init__ (line 42) | def __init__(self, name: str, value: int = 10): class ComplexConfig (line 47) | class ComplexConfig: method __init__ (line 48) | def __init__( class NoInitParamsConfig (line 71) | class NoInitParamsConfig: method __init__ (line 72) | def __init__(self): class OnlySelfConfig (line 76) | class OnlySelfConfig: # For completeness, though __init__ without param... method __init__ (line 77) | def __init__(self): class RequiredOnlyConfig (line 81) | class RequiredOnlyConfig: method __init__ (line 82) | def __init__(self, req_str: str, req_int: int): class OptionalNoDefaultConfig (line 87) | class OptionalNoDefaultConfig: method __init__ (line 88) | def __init__(self, opt_val: Optional[str]): # No __init__ default function test_nullable_str (line 112) | def test_nullable_str(input_val: str, expected_output: Optional[str]) ->... function test_str_to_bool_valid (line 147) | def test_str_to_bool_valid(input_val: Union[str, bool], expected_output:... function test_str_to_bool_invalid (line 153) | def test_str_to_bool_invalid(invalid_input: str) -> None: function test_get_param_type_details (line 185) | def test_get_param_type_details( function test_determine_argparse_type_and_nargs (line 226) | def test_determine_argparse_type_and_nargs( function test_build_help_string (line 255) | def test_build_help_string( function mock_parser (line 264) | def mock_parser(): function get_param_obj (line 271) | def get_param_obj(cls, param_name): function test_add_argument_for_parameter (line 324) | def test_add_argument_for_parameter( function test_add_arguments_for_class (line 360) | def test_add_arguments_for_class(mock_parser: Any) -> None: function test_add_arguments_for_class_no_init_params (line 388) | def test_add_arguments_for_class_no_init_params(mock_parser: Any) -> None: function test_create_argument_parser (line 397) | def test_create_argument_parser() -> None: function test_instantiate_classes (line 406) | def test_instantiate_classes() -> None: function test_instantiate_classes_error_handling (line 455) | def test_instantiate_classes_error_handling(caplog): function run_lightning_cli (line 474) | def run_lightning_cli(classes_to_configure, cli_args_list): function test_lightning_cli_no_classes (line 484) | def test_lightning_cli_no_classes(): function test_lightning_cli_simple_config (line 489) | def test_lightning_cli_simple_config(): function test_lightning_cli_complex_config_types (line 502) | def test_lightning_cli_complex_config_types(): function test_lightning_cli_complex_config_defaults (line 543) | def test_lightning_cli_complex_config_defaults(): function test_lightning_cli_multiple_classes (line 560) | def test_lightning_cli_multiple_classes(): function test_lightning_cli_missing_required_arg_exits (line 587) | def test_lightning_cli_missing_required_arg_exits(capsys): function test_lightning_cli_optional_no_default_behavior (line 596) | def test_lightning_cli_optional_no_default_behavior(): FILE: tests/test_env_var.py function test_resolve_bool_env_var_override_takes_precedence (line 15) | def test_resolve_bool_env_var_override_takes_precedence(monkeypatch: pyt... function test_resolve_bool_env_var_parses_truthy_and_falsy_values (line 33) | def test_resolve_bool_env_var_parses_truthy_and_falsy_values( function test_resolve_bool_env_var_returns_fallback_when_unset (line 42) | def test_resolve_bool_env_var_returns_fallback_when_unset(monkeypatch: p... function test_resolve_bool_env_var_rejects_invalid_value (line 49) | def test_resolve_bool_env_var_rejects_invalid_value(monkeypatch: pytest.... function test_resolve_int_env_var_reads_from_environment (line 57) | def test_resolve_int_env_var_reads_from_environment(monkeypatch: pytest.... function test_resolve_int_env_var_invalid_input (line 64) | def test_resolve_int_env_var_invalid_input(monkeypatch: pytest.MonkeyPat... function test_resolve_str_env_var_override_and_fallback (line 72) | def test_resolve_str_env_var_override_and_fallback(monkeypatch: pytest.M... FILE: tests/test_logging.py function _logging_worker (line 23) | def _logging_worker(case: str, queue: Queue[Dict[str, Any]]) -> None: function _logging_worker_files_string (line 167) | def _logging_worker_files_string(queue: Queue[Dict[str, Any]], base_dir:... function _logging_worker_files_mapping (line 207) | def _logging_worker_files_mapping(queue: Queue[Dict[str, Any]], base_dir... function _run_case (line 274) | def _run_case(case: str) -> Dict[str, Any]: function test_to_level_value_int_and_str (line 286) | def test_to_level_value_int_and_str() -> None: function test_setup_module_plain_console_spawn (line 296) | def test_setup_module_plain_console_spawn() -> None: function test_setup_module_color_rich_spawn (line 310) | def test_setup_module_color_rich_spawn() -> None: function test_setup_with_submodules_apply_to_and_capture_warnings_spawn (line 323) | def test_setup_with_submodules_apply_to_and_capture_warnings_spawn() -> ... function test_setup_with_console_and_extra_handler_spawn (line 343) | def test_setup_with_console_and_extra_handler_spawn() -> None: function test_setup_files_string_spawn (line 355) | def test_setup_files_string_spawn(tmp_path: Path) -> None: function test_setup_files_mapping_spawn (line 383) | def test_setup_files_mapping_spawn(tmp_path: Path) -> None: FILE: tests/tracer/test_agentops.py function agentops_tracer (line 32) | async def agentops_tracer(): class MockOTLPService (line 39) | class MockOTLPService: method __init__ (line 42) | def __init__(self) -> None: method start_service (line 45) | def start_service(self) -> int: method stop_service (line 76) | def stop_service(self) -> None: method get_traces (line 80) | def get_traces(self) -> List[ExportTraceServiceRequest]: class MockLightningStore (line 84) | class MockLightningStore(LightningStore): method __init__ (line 87) | def __init__(self, server_port: int = 80) -> None: method enable_otlp_traces (line 92) | def enable_otlp_traces(self) -> None: method add_otel_span (line 95) | async def add_otel_span( method capabilities (line 111) | def capabilities(self) -> LightningStoreCapabilities: method otlp_traces_endpoint (line 120) | def otlp_traces_endpoint(self) -> str: function _func_with_exception (line 124) | def _func_with_exception(): function _func_without_exception (line 129) | def _func_without_exception(): function test_agentops_tracer_create_span (line 134) | def test_agentops_tracer_create_span(agentops_tracer: AgentOpsTracer) ->... function test_agentops_tracer_operation_context_records_exception (line 152) | def test_agentops_tracer_operation_context_records_exception(agentops_tr... function test_trace_error_status_from_instance (line 166) | async def test_trace_error_status_from_instance(with_exception: bool): function test_agentops_trace_without_store (line 198) | async def test_agentops_trace_without_store(): function test_agentops_trace_with_store_disable (line 210) | async def test_agentops_trace_with_store_disable(): function test_agentops_trace_with_store_enable (line 225) | async def test_agentops_trace_with_store_enable(): FILE: tests/tracer/test_dummy.py function _fake_time_generator (line 14) | def _fake_time_generator(start: float) -> itertools.count[float]: function test_dummy_tracer_create_span_uses_defaults (line 18) | def test_dummy_tracer_create_span_uses_defaults(monkeypatch: pytest.Monk... function test_dummy_tracer_operation_context_records_span (line 32) | def test_dummy_tracer_operation_context_records_span(monkeypatch: pytest... function test_dummy_tracer_operation_context_records_exceptions (line 49) | def test_dummy_tracer_operation_context_records_exceptions(monkeypatch: ... function reset_active_tracer (line 65) | def reset_active_tracer(): function test_set_active_tracer_returns_same_instance (line 71) | def test_set_active_tracer_returns_same_instance() -> None: function test_set_active_tracer_raises_when_existing (line 77) | def test_set_active_tracer_raises_when_existing() -> None: function test_clear_active_tracer_removes_current (line 83) | def test_clear_active_tracer_removes_current() -> None: FILE: tests/tracer/test_integration.py class OpenAISettings (line 87) | class OpenAISettings: class MockOpenAICompatibleServer (line 93) | class MockOpenAICompatibleServer: method __init__ (line 100) | def __init__(self) -> None: method _prompt_cache_path (line 110) | def _prompt_cache_path(self) -> str: method _load_prompt_caches (line 113) | def _load_prompt_caches(self): method _find_best_cache_match (line 125) | def _find_best_cache_match(self, request_dict: Dict[str, Any]) -> Tupl... method _setup_routes (line 156) | def _setup_routes(self): method __aenter__ (line 188) | async def __aenter__(self): method __aexit__ (line 197) | async def __aexit__(self, exc_type: Any, exc_val: Any, exc_tb: Any) ->... function agent_pure_openai (line 201) | async def agent_pure_openai(settings: OpenAISettings, tracer: Tracer) ->... function agent_litellm (line 210) | async def agent_litellm(settings: OpenAISettings, tracer: Tracer) -> None: function agent_langchain (line 221) | async def agent_langchain(settings: OpenAISettings, tracer: Tracer) -> N... function agent_langchain_tooluse (line 230) | async def agent_langchain_tooluse(settings: OpenAISettings, tracer: Trac... function agent_langgraph (line 260) | async def agent_langgraph(settings: OpenAISettings, tracer: Tracer) -> N... function agent_autogen_multiagent (line 375) | async def agent_autogen_multiagent(settings: OpenAISettings, tracer: Tra... function agent_autogen_mcp (line 407) | async def agent_autogen_mcp(settings: OpenAISettings, tracer: Tracer) ->... function openai_agents_sdk_run_config (line 423) | def openai_agents_sdk_run_config(settings: OpenAISettings) -> RunConfig: function openai_agents_sdk_eval_hook_and_guardrail (line 430) | async def openai_agents_sdk_eval_hook_and_guardrail(settings: OpenAISett... function openai_agents_sdk_mcp_tool_use (line 478) | async def openai_agents_sdk_mcp_tool_use(settings: OpenAISettings, trace... function openai_agents_sdk_handoff_tool_output_type_and_reward (line 492) | async def openai_agents_sdk_handoff_tool_output_type_and_reward(settings... function assert_expected_pairs_in_tree (line 638) | def assert_expected_pairs_in_tree( function agent_function (line 701) | def agent_function( function test_tracer_integration_agentops (line 709) | async def test_tracer_integration_agentops( function test_tracer_integration_weave (line 720) | async def test_tracer_integration_weave( function _run_tracer_with_agent (line 738) | async def _run_tracer_with_agent( FILE: tests/tracer/test_otel.py function create_span (line 38) | def create_span(name: str, sampled: bool = True, with_context: bool = Tr... function add_otel_span (line 55) | async def add_otel_span( function create_mock_store (line 64) | def create_mock_store(otlp_supported: bool = False) -> MagicMock: function store_supports_otlp (line 74) | def store_supports_otlp(request: pytest.FixtureRequest) -> bool: function otlp_server (line 79) | def otlp_server(store_supports_otlp: bool): function store (line 121) | def store(store_supports_otlp: bool, otlp_server: Optional[Dict[str, Any... function otel_tracer (line 130) | def otel_tracer(): function test_otel_tracer_create_span_records_fields (line 138) | def test_otel_tracer_create_span_records_fields(otel_tracer: OtelTracer)... function test_otel_tracer_operation_context_records_span (line 157) | def test_otel_tracer_operation_context_records_span(otel_tracer: OtelTra... function test_initialization_and_shutdown (line 174) | def test_initialization_and_shutdown(): function test_span_collection_with_filtering (line 211) | def test_span_collection_with_filtering(): function test_context_managers_clear_state (line 232) | def test_context_managers_clear_state(store: MagicMock): function test_store_integration_complete (line 268) | def test_store_integration_complete(store: MagicMock): function test_event_loop_operations (line 332) | def test_event_loop_operations(): function test_concurrent_access (line 362) | def test_concurrent_access(store: MagicMock): function test_multiprocessing_behavior (line 391) | def test_multiprocessing_behavior(store_supports_otlp: bool): function test_store_write_timeout (line 438) | def test_store_write_timeout(store: MagicMock): function test_multiple_processors_in_same_process (line 460) | def test_multiple_processors_in_same_process(): function test_context_manager_reusability (line 490) | def test_context_manager_reusability(store: MagicMock): function _otel_reward_subprocess (line 515) | def _otel_reward_subprocess(mode: str, conn: Connection[tuple[str, Any]]... function _otel_reward_subprocess_async (line 519) | async def _otel_reward_subprocess_async(mode: str, conn: Connection[tupl... function _run_otel_reward_test (line 579) | def _run_otel_reward_test(mode: str) -> dict[str, Any]: function test_otel_tracer_captures_reward_from_decorator (line 605) | def test_otel_tracer_captures_reward_from_decorator(): function test_otel_tracer_captures_reward_from_emit_reward (line 613) | def test_otel_tracer_captures_reward_from_emit_reward(): FILE: tests/tracer/test_weave.py class MockLightningStore (line 15) | class MockLightningStore(LightningStore): method __init__ (line 18) | def __init__(self) -> None: method get_next_span_sequence_id (line 22) | async def get_next_span_sequence_id(self, rollout_id: str, attempt_id:... method add_span (line 25) | async def add_span(self, span: Span) -> Span: method clear_spans (line 29) | def clear_spans(self) -> None: method get_traces (line 32) | def get_traces(self) -> list[Span]: class FakeWeaveCall (line 36) | class FakeWeaveCall: method __init__ (line 37) | def __init__( class FakeWeaveClient (line 54) | class FakeWeaveClient: method __init__ (line 55) | def __init__(self, server: object): method create_call (line 61) | def create_call( method finish_call (line 72) | def finish_call(self, call: FakeWeaveCall, exception: Exception | None... method flush (line 78) | def flush(self) -> None: function _func_without_exception (line 82) | def _func_without_exception(): function _func_with_exception (line 87) | def _func_with_exception(): function test_weave_tracer_create_span (line 93) | def test_weave_tracer_create_span(monkeypatch: pytest.MonkeyPatch) -> None: function test_weave_tracer_operation_context_records_exception (line 109) | def test_weave_tracer_operation_context_records_exception(monkeypatch: p... function test_weave_trace_without_exception (line 129) | async def test_weave_trace_without_exception(): function test_weave_trace_with_exception (line 155) | async def test_weave_trace_with_exception(): function test_weave_with_op (line 183) | async def test_weave_with_op(): function test_weave_trace_call_to_span (line 220) | async def test_weave_trace_call_to_span(): FILE: tests/trainer/sample_components.py class SampleBase (line 8) | class SampleBase: class SampleComponent (line 12) | class SampleComponent(SampleBase): method __init__ (line 13) | def __init__(self, required: int, optional: int = 7) -> None: class SimpleComponent (line 18) | class SimpleComponent(SampleBase): method __init__ (line 19) | def __init__(self) -> None: class ComponentWithoutOptional (line 23) | class ComponentWithoutOptional(SampleBase): method __init__ (line 24) | def __init__(self, value: int) -> None: class ComponentWithKwargs (line 28) | class ComponentWithKwargs(SampleBase): method __init__ (line 29) | def __init__(self, **kwargs: Any) -> None: class Unrelated (line 33) | class Unrelated: FILE: tests/trainer/test_init_utils.py function test_load_class_resolves_fully_qualified_name (line 17) | def test_load_class_resolves_fully_qualified_name() -> None: function test_instantiate_component_uses_provided_kwargs (line 22) | def test_instantiate_component_uses_provided_kwargs() -> None: function test_instantiate_component_applies_optional_defaults_callable (line 30) | def test_instantiate_component_applies_optional_defaults_callable() -> N... function test_instantiate_component_ignores_unknown_optional_defaults (line 40) | def test_instantiate_component_ignores_unknown_optional_defaults() -> None: function test_instantiate_from_spec_with_string_path (line 51) | def test_instantiate_from_spec_with_string_path() -> None: function test_instantiate_from_spec_with_dict_type (line 58) | def test_instantiate_from_spec_with_dict_type() -> None: function test_instantiate_from_spec_missing_type_uses_default_cls (line 68) | def test_instantiate_from_spec_missing_type_uses_default_cls() -> None: function test_instantiate_from_spec_missing_type_raises_when_required (line 80) | def test_instantiate_from_spec_missing_type_raises_when_required() -> None: function test_build_component_returns_existing_instance (line 85) | def test_build_component_returns_existing_instance() -> None: function test_build_component_uses_default_factory_for_none (line 96) | def test_build_component_uses_default_factory_for_none() -> None: function test_build_component_returns_none_when_allowed (line 108) | def test_build_component_returns_none_when_allowed() -> None: function test_build_component_from_string_spec (line 120) | def test_build_component_from_string_spec() -> None: function test_build_component_from_registry_key_string_spec (line 130) | def test_build_component_from_registry_key_string_spec() -> None: function test_build_component_from_dict_spec_with_optional_defaults (line 141) | def test_build_component_from_dict_spec_with_optional_defaults() -> None: function test_build_component_from_type_spec (line 153) | def test_build_component_from_type_spec() -> None: function test_build_component_from_callable_spec (line 163) | def test_build_component_from_callable_spec() -> None: function test_build_component_invalid_type_error (line 174) | def test_build_component_invalid_type_error() -> None: function test_build_component_type_error_fmt (line 186) | def test_build_component_type_error_fmt() -> None: function test_instantiate_component_applies_literal_optional_default (line 196) | def test_instantiate_component_applies_literal_optional_default() -> None: function test_instantiate_from_spec_invalid_type_error_message (line 202) | def test_instantiate_from_spec_invalid_type_error_message() -> None: function test_build_component_from_string_type_mismatch (line 207) | def test_build_component_from_string_type_mismatch() -> None: function test_build_component_none_without_factory_raises_default_message (line 220) | def test_build_component_none_without_factory_raises_default_message() -... function test_build_component_with_type_not_subclass_raises (line 229) | def test_build_component_with_type_not_subclass_raises() -> None: function test_build_component_callable_returning_wrong_type_raises (line 242) | def test_build_component_callable_returning_wrong_type_raises() -> None: function test_build_component_optional_defaults_skipped_when_not_supported (line 254) | def test_build_component_optional_defaults_skipped_when_not_supported() ... function test_build_component_dict_spec_uses_registry_type_lookup (line 266) | def test_build_component_dict_spec_uses_registry_type_lookup() -> None: function test_build_component_dict_spec_supports_name_registry_lookup (line 277) | def test_build_component_dict_spec_supports_name_registry_lookup() -> None: FILE: tests/trainer/test_trainer_dev.py class DummyStrategy (line 17) | class DummyStrategy(ExecutionStrategy): method __init__ (line 20) | def __init__(self) -> None: method execute (line 23) | def execute(self, algorithm_bundle, runner_bundle, store) -> None: # ... class DummyAgent (line 27) | class DummyAgent(LitAgent[Any]): class SlowAlgorithm (line 31) | class SlowAlgorithm(Algorithm): method run (line 34) | def run(self, train_dataset=None, val_dataset=None): # type: ignore[o... function test_dev_requires_fast_algorithm (line 38) | def test_dev_requires_fast_algorithm() -> None: function test_dev_allows_fast_algorithm (line 46) | def test_dev_allows_fast_algorithm() -> None: FILE: tests/trainer/test_trainer_init.py function test_trainer_with_predefined_tracer (line 10) | def test_trainer_with_predefined_tracer() -> None: function test_trainer_with_strategy_alias_shm (line 23) | def test_trainer_with_strategy_alias_shm() -> None: function test_trainer_with_strategy_dict_main_thread (line 35) | def test_trainer_with_strategy_dict_main_thread() -> None: function test_trainer_with_initialized_strategy_ignores_n_runners (line 49) | def test_trainer_with_initialized_strategy_ignores_n_runners() -> None: function test_trainer_with_client_server_strategy_dict (line 63) | def test_trainer_with_client_server_strategy_dict() -> None: function test_trainer_port_forwarded_to_client_server_strategy (line 80) | def test_trainer_port_forwarded_to_client_server_strategy() -> None: function test_trainer_port_ignored_for_non_client_server_strategy (line 92) | def test_trainer_port_ignored_for_non_client_server_strategy() -> None: function test_trainer_port_overrides_existing_client_server_strategy (line 105) | def test_trainer_port_overrides_existing_client_server_strategy() -> None: function test_trainer_with_env_vars_for_execution_strategy (line 120) | def test_trainer_with_env_vars_for_execution_strategy(monkeypatch: pytes... function test_trainer_with_string_adapter (line 140) | def test_trainer_with_string_adapter() -> None: function test_trainer_with_adapter_dict_no_type (line 147) | def test_trainer_with_adapter_dict_no_type() -> None: FILE: tests/utils/test_metrics.py function test_validate_labels_reports_missing_label_with_metric_name (line 21) | def test_validate_labels_reports_missing_label_with_metric_name() -> None: function test_normalize_label_names_preserves_original_order (line 34) | def test_normalize_label_names_preserves_original_order() -> None: function test_console_backend_logs_counters_with_registration_order (line 39) | def test_console_backend_logs_counters_with_registration_order() -> None: function test_console_backend_logs_histograms_with_human_units (line 52) | def test_console_backend_logs_histograms_with_human_units() -> None: function test_console_backend_respects_group_level_limit (line 70) | def test_console_backend_respects_group_level_limit(): function test_console_backend_log_uses_logger (line 78) | def test_console_backend_log_uses_logger(caplog: pytest.LogCaptureFixtur... class _RecordingBackend (line 85) | class _RecordingBackend(MetricsBackend): method __init__ (line 86) | def __init__(self) -> None: method register_counter (line 89) | def register_counter( method register_histogram (line 97) | def register_histogram( method inc_counter (line 106) | async def inc_counter(self, name: str, amount: float = 1.0, labels: Op... method observe_histogram (line 109) | async def observe_histogram(self, name: str, value: float, labels: Opt... function test_multi_metrics_backend_fans_out_calls (line 114) | async def test_multi_metrics_backend_fans_out_calls() -> None: function test_prometheus_backend_binds_stubbed_prometheus (line 136) | async def test_prometheus_backend_binds_stubbed_prometheus(monkeypatch: ... function test_prometheus_backend_normalizes_metric_names (line 153) | def test_prometheus_backend_normalizes_metric_names(monkeypatch: pytest.... function test_prometheus_backend_detects_normalized_name_conflicts (line 165) | def test_prometheus_backend_detects_normalized_name_conflicts(monkeypatc... function _split_segments (line 175) | def _split_segments(log_lines: Sequence[str]) -> List[str]: function test_console_backend_sliding_window_rate_and_eviction (line 183) | async def test_console_backend_sliding_window_rate_and_eviction(monkeypa... function _duration_to_seconds (line 207) | def _duration_to_seconds(payload: str) -> float: function test_console_backend_histogram_quantiles_and_group_depth (line 220) | async def test_console_backend_histogram_quantiles_and_group_depth(monke... function test_console_backend_logs_all_metric_groups (line 257) | async def test_console_backend_logs_all_metric_groups(monkeypatch: pytes... function test_console_backend_snapshot_logs_single_line (line 277) | def test_console_backend_snapshot_logs_single_line() -> None: function test_console_backend_snapshot_entries_are_sorted (line 295) | def test_console_backend_snapshot_entries_are_sorted() -> None: function test_console_backend_group_level_none_aggregates_all_label_groups (line 315) | def test_console_backend_group_level_none_aggregates_all_label_groups() ... function test_console_backend_group_level_positive_only_aggregates_prefix (line 338) | def test_console_backend_group_level_positive_only_aggregates_prefix() -... function test_console_backend_logs_preserve_registration_label_order (line 361) | async def test_console_backend_logs_preserve_registration_label_order(mo... function test_console_backend_metric_specific_group_level_applies (line 379) | async def test_console_backend_metric_specific_group_level_applies(monke... function test_console_backend_global_group_level_overrides_metric (line 398) | async def test_console_backend_global_group_level_overrides_metric(monke... function test_console_backend_histogram_metric_group_level (line 417) | async def test_console_backend_histogram_metric_group_level(monkeypatch:... FILE: tests/utils/test_otel.py function _span_context (line 43) | def _span_context(trace_id_hex: str, span_id_hex: str) -> trace_api.Span... function test_flatten_simple_nested_dict_and_list (line 53) | def test_flatten_simple_nested_dict_and_list() -> None: function test_flatten_simple_nested_dict_and_list_with_leaf_expansion (line 62) | def test_flatten_simple_nested_dict_and_list_with_leaf_expansion() -> None: function test_full_qualified_name_handles_builtin_and_custom_classes (line 72) | def test_full_qualified_name_handles_builtin_and_custom_classes() -> None: function test_flatten_empty_dict (line 84) | def test_flatten_empty_dict() -> None: function test_flatten_empty_list (line 89) | def test_flatten_empty_list() -> None: function test_flatten_root_list_of_primitives (line 95) | def test_flatten_root_list_of_primitives() -> None: function test_flatten_nested_lists_and_dicts (line 105) | def test_flatten_nested_lists_and_dicts() -> None: function test_flatten_leaf_lists_can_stay_compact (line 121) | def test_flatten_leaf_lists_can_stay_compact() -> None: function test_flatten_non_leaf_lists_still_expand_when_leaf_expansion_disabled (line 127) | def test_flatten_non_leaf_lists_still_expand_when_leaf_expansion_disable... function test_flatten_leaf_lists_with_mixed_types_warns_and_expands (line 136) | def test_flatten_leaf_lists_with_mixed_types_warns_and_expands(caplog: p... function test_flatten_leaf_lists_with_mixed_numbers_warns_and_expands (line 149) | def test_flatten_leaf_lists_with_mixed_numbers_warns_and_expands(caplog:... function test_flatten_mixed_types_and_none (line 163) | def test_flatten_mixed_types_and_none() -> None: function test_flatten_non_string_key_raises_value_error (line 181) | def test_flatten_non_string_key_raises_value_error() -> None: function test_flatten_root_primitive_is_allowed (line 197) | def test_flatten_root_primitive_is_allowed() -> None: function test_unflatten_simple_nested_dict (line 204) | def test_unflatten_simple_nested_dict() -> None: function test_unflatten_consecutive_numeric_keys_to_list (line 213) | def test_unflatten_consecutive_numeric_keys_to_list() -> None: function test_unflatten_non_consecutive_numeric_keys_stays_dict (line 225) | def test_unflatten_non_consecutive_numeric_keys_stays_dict() -> None: function test_unflatten_mixed_numeric_and_non_numeric_keys_stays_dict (line 240) | def test_unflatten_mixed_numeric_and_non_numeric_keys_stays_dict() -> None: function test_unflatten_root_list_from_numeric_keys (line 254) | def test_unflatten_root_list_from_numeric_keys() -> None: function test_unflatten_empty_flat_dict_returns_empty_dict (line 265) | def test_unflatten_empty_flat_dict_returns_empty_dict() -> None: function test_unflatten_nested_lists_and_dicts (line 271) | def test_unflatten_nested_lists_and_dicts() -> None: function test_unflatten_list_of_lists (line 288) | def test_unflatten_list_of_lists() -> None: function test_unflatten_conflicting_primitive_and_nested_path_prefers_nested (line 303) | def test_unflatten_conflicting_primitive_and_nested_path_prefers_nested(... function test_round_trip_flatten_then_unflatten_preserves_structure (line 323) | def test_round_trip_flatten_then_unflatten_preserves_structure(value: Di... function test_round_trip_unflatten_then_flatten_preserves_flat_structure (line 340) | def test_round_trip_unflatten_then_flatten_preserves_flat_structure(flat... function test_round_trip_with_empty_list_information_loss_is_expected (line 347) | def test_round_trip_with_empty_list_information_loss_is_expected() -> None: function test_sanitize_attribute_value_handles_primitives_and_lists (line 359) | def test_sanitize_attribute_value_handles_primitives_and_lists() -> None: function test_sanitize_attribute_value_falls_back_to_json_for_hybrid_lists (line 367) | def test_sanitize_attribute_value_falls_back_to_json_for_hybrid_lists(ca... function test_sanitize_attribute_value_serializes_non_serializable_objects_when_forced (line 374) | def test_sanitize_attribute_value_serializes_non_serializable_objects_wh... function test_sanitize_attribute_value_respects_force_flag (line 383) | def test_sanitize_attribute_value_respects_force_flag() -> None: function test_sanitize_attributes_returns_clean_values (line 391) | def test_sanitize_attributes_returns_clean_values() -> None: function test_sanitize_attributes_serializes_non_serializable_values_by_default (line 406) | def test_sanitize_attributes_serializes_non_serializable_values_by_defau... function test_sanitize_attributes_respects_force_flag (line 417) | def test_sanitize_attributes_respects_force_flag() -> None: function test_sanitize_attributes_exposes_key_in_error (line 427) | def test_sanitize_attributes_exposes_key_in_error() -> None: function test_format_exception_attributes_captures_metadata (line 436) | def test_format_exception_attributes_captures_metadata() -> None: function test_sanitize_list_attribute_sanity_supports_primitive_lists (line 449) | def test_sanitize_list_attribute_sanity_supports_primitive_lists() -> None: function test_sanitize_list_attribute_sanity_rejects_mixed_types (line 456) | def test_sanitize_list_attribute_sanity_rejects_mixed_types() -> None: function test_check_attributes_sanity_accepts_valid_payload (line 461) | def test_check_attributes_sanity_accepts_valid_payload() -> None: function test_check_attributes_sanity_requires_string_keys (line 474) | def test_check_attributes_sanity_requires_string_keys() -> None: function test_check_attributes_sanity_wraps_list_errors (line 479) | def test_check_attributes_sanity_wraps_list_errors() -> None: function test_check_attributes_sanity_rejects_non_primitive_values (line 484) | def test_check_attributes_sanity_rejects_non_primitive_values() -> None: function test_make_and_extract_link_attributes_round_trip (line 489) | def test_make_and_extract_link_attributes_round_trip() -> None: function test_make_link_attributes_rejects_non_string_values (line 510) | def test_make_link_attributes_rejects_non_string_values() -> None: function test_make_tag_attributes_and_extract_round_trip (line 517) | def test_make_tag_attributes_and_extract_round_trip() -> None: function test_extract_tags_from_attributes_rejects_non_strings (line 527) | def test_extract_tags_from_attributes_rejects_non_strings() -> None: function test_filter_attributes_keeps_exact_matches_and_children (line 536) | def test_filter_attributes_keeps_exact_matches_and_children() -> None: function test_filter_and_unflatten_attributes_strips_prefix_and_rebuilds_nested_structure (line 551) | def test_filter_and_unflatten_attributes_strips_prefix_and_rebuilds_nest... function test_filter_and_unflatten_attributes_rejects_exact_prefix_key (line 566) | def test_filter_and_unflatten_attributes_rejects_exact_prefix_key() -> N... function test_query_linked_spans_matches_trace_id_on_readable_span (line 573) | def test_query_linked_spans_matches_trace_id_on_readable_span() -> None: function test_query_linked_spans_matches_custom_span_attributes (line 589) | def test_query_linked_spans_matches_custom_span_attributes() -> None: function test_query_linked_spans_excludes_span_with_mismatched_span_id (line 605) | def test_query_linked_spans_excludes_span_with_mismatched_span_id() -> N... function test_query_linked_spans_requires_all_links_to_match (line 620) | def test_query_linked_spans_requires_all_links_to_match() -> None: function test_query_linked_spans_handles_readable_span_without_context (line 635) | def test_query_linked_spans_handles_readable_span_without_context() -> N... function test_get_tracer_provider_raises_when_tracer_uninitialized (line 644) | def test_get_tracer_provider_raises_when_tracer_uninitialized(monkeypatc... function test_get_tracer_provider_logs_when_provider_not_sdk (line 651) | def test_get_tracer_provider_logs_when_provider_not_sdk( function test_get_tracer_delegates_to_active_span_processor (line 666) | def test_get_tracer_delegates_to_active_span_processor(monkeypatch: pyte... function test_get_tracer_without_active_span_processor_builds_isolated_tracer (line 686) | def test_get_tracer_without_active_span_processor_builds_isolated_tracer... function test_get_tracer_raises_when_provider_not_initialized (line 731) | def test_get_tracer_raises_when_provider_not_initialized(monkeypatch: py... FILE: tests/utils/test_otlp.py class _StubStore (line 38) | class _StubStore: method __init__ (line 39) | def __init__(self) -> None: method get_many_span_sequence_ids (line 43) | async def get_many_span_sequence_ids(self, rollout_attempt_ids: Sequen... function _make_request (line 52) | def _make_request( function _set_any_value (line 85) | def _set_any_value(av: AnyValue, value: object) -> None: function _add_attribute (line 106) | def _add_attribute(attrs: Iterable[KeyValue], key: str, value: object) -... function _build_span_request (line 112) | def _build_span_request() -> ExportTraceServiceRequest: function test_handle_otlp_export_success_with_gzip_response (line 154) | async def test_handle_otlp_export_success_with_gzip_response() -> None: function test_handle_otlp_export_rejects_invalid_content_type (line 182) | async def test_handle_otlp_export_rejects_invalid_content_type() -> None: function test_handle_otlp_export_rejects_bad_payload (line 200) | async def test_handle_otlp_export_rejects_bad_payload() -> None: function test_handle_otlp_export_accepts_gzip_body (line 218) | async def test_handle_otlp_export_accepts_gzip_body() -> None: function test_spans_from_proto_prefers_span_level_metadata (line 236) | async def test_spans_from_proto_prefers_span_level_metadata() -> None: function test_spans_from_proto_requests_sequence_ids_when_missing (line 257) | async def test_spans_from_proto_requests_sequence_ids_when_missing() -> ... function test_spans_from_proto_bulk_issues_for_mixed_rollouts (line 278) | async def test_spans_from_proto_bulk_issues_for_mixed_rollouts() -> None: function test_spans_from_proto_skips_spans_without_ids (line 317) | async def test_spans_from_proto_skips_spans_without_ids() -> None: function test_normalize_sequence_id_handles_bad_values (line 328) | def test_normalize_sequence_id_handles_bad_values(caplog: pytest.LogCapt... function test_any_value_to_python_full_roundtrip (line 334) | def test_any_value_to_python_full_roundtrip() -> None: function test_kv_list_to_dict_converts_values (line 359) | def test_kv_list_to_dict_converts_values() -> None: function test_bytes_to_hex_helpers (line 368) | def test_bytes_to_hex_helpers() -> None: function test_events_and_links_from_proto (line 375) | def test_events_and_links_from_proto() -> None: function test_resource_from_proto (line 396) | def test_resource_from_proto() -> None: function test_maybe_gzip_response_parses_quality_values (line 404) | def test_maybe_gzip_response_parses_quality_values() -> None: function test_bad_request_response_matches_request_encoding (line 413) | def test_bad_request_response_matches_request_encoding() -> None: class _DummyReadableSpan (line 424) | class _DummyReadableSpan: method __init__ (line 425) | def __init__(self) -> None: function test_lightning_store_otlp_exporter_overrides_resources (line 429) | def test_lightning_store_otlp_exporter_overrides_resources(monkeypatch: ... FILE: tests/utils/test_server_launcher.py function _make_app_health (line 40) | def _make_app_health(always_ok: bool = True) -> FastAPI: function _new_server (line 57) | def _new_server(app: FastAPI, host: str, port: int) -> uvicorn.Server: function _make_flag_context (line 69) | def _make_flag_context(flag_dict: Dict[str, bool], key_prefix: str = "ct... function _queue_get_async (line 81) | async def _queue_get_async( function _build_gunicorn_app (line 88) | def _build_gunicorn_app(app: FastAPI, host: str, port: int, workers: int... function _probe_json (line 105) | async def _probe_json(url: str, expected: Dict[str, Any], timeout: float... function _free_port (line 122) | def _free_port(host: str, port: int) -> None: function test_fastapi_health_ok_background_then_shutdown (line 130) | async def test_fastapi_health_ok_background_then_shutdown(): function test_fastapi_no_health_background_then_shutdown (line 161) | async def test_fastapi_no_health_background_then_shutdown(): function test_fastapi_health_timeout_raises_and_server_is_stopped (line 184) | async def test_fastapi_health_timeout_raises_and_server_is_stopped(): function test_uvicorn_startup_failure_is_wrapped_as_runtimeerror (line 220) | async def test_uvicorn_startup_failure_is_wrapped_as_runtimeerror(): function test_startup_deadline_if_server_never_starts (line 251) | async def test_startup_deadline_if_server_never_starts(): function test_port_already_used_conflict_raises_runtimeerror (line 279) | async def test_port_already_used_conflict_raises_runtimeerror(): function test_wait_for_serve_true_graceful_shutdown (line 308) | async def test_wait_for_serve_true_graceful_shutdown(): function test_unhealthy_left_running_background_then_manual_shutdown (line 350) | async def test_unhealthy_left_running_background_then_manual_shutdown(ca... function test_unhealthy_left_running_wait_for_serve_true (line 386) | async def test_unhealthy_left_running_wait_for_serve_true(caplog: pytest... function test_run_uvicorn_thread_reports_ready_and_stops_cleanly (line 429) | async def test_run_uvicorn_thread_reports_ready_and_stops_cleanly(): function test_run_uvicorn_thread_reports_health_failure_event (line 471) | async def test_run_uvicorn_thread_reports_health_failure_event(): function test_run_uvicorn_subprocess_ready_and_handles_sigterm (line 509) | async def test_run_uvicorn_subprocess_ready_and_handles_sigterm(): function test_run_uvicorn_subprocess_reports_health_failure (line 550) | async def test_run_uvicorn_subprocess_reports_health_failure(): function test_run_uvicorn_thread_no_health_reports_ready_and_stops_cleanly (line 579) | async def test_run_uvicorn_thread_no_health_reports_ready_and_stops_clea... function test_run_uvicorn_thread_reports_startup_bind_failure_event (line 623) | async def test_run_uvicorn_thread_reports_startup_bind_failure_event(): function test_run_uvicorn_subprocess_reports_startup_bind_failure (line 664) | async def test_run_uvicorn_subprocess_reports_startup_bind_failure(): function test_run_uvicorn_subprocess_ready_and_handles_sigint (line 705) | async def test_run_uvicorn_subprocess_ready_and_handles_sigint(): function test_run_gunicorn_ready_and_handles_sigterm_preload (line 746) | async def test_run_gunicorn_ready_and_handles_sigterm_preload(): function test_run_gunicorn_reports_health_failure_preload (line 792) | async def test_run_gunicorn_reports_health_failure_preload(): function test_run_gunicorn_no_health_reports_ready_and_sigint_preload (line 829) | async def test_run_gunicorn_no_health_reports_ready_and_sigint_preload(): function test_run_gunicorn_reports_startup_bind_failure_preload (line 873) | async def test_run_gunicorn_reports_startup_bind_failure_preload(capfd: ... function test_run_uvicorn_asyncio_applies_serve_context (line 919) | async def test_run_uvicorn_asyncio_applies_serve_context(): function test_run_uvicorn_thread_applies_serve_context (line 953) | async def test_run_uvicorn_thread_applies_serve_context(): function test_run_uvicorn_subprocess_applies_serve_context (line 1002) | async def test_run_uvicorn_subprocess_applies_serve_context(): function test_run_gunicorn_applies_serve_context_preload (line 1052) | async def test_run_gunicorn_applies_serve_context_preload(): function test_launcher_start_stop_basic_modes (line 1104) | async def test_launcher_start_stop_basic_modes(launch_mode: LaunchMode): function test_launcher_start_stop_mp_modes (line 1135) | async def test_launcher_start_stop_mp_modes(n_workers: int): function test_launcher_reload_preserves_port_and_recovers (line 1162) | async def test_launcher_reload_preserves_port_and_recovers(launch_mode: ... function test_launcher_reload_preserves_port_mp (line 1192) | async def test_launcher_reload_preserves_port_mp(n_workers: int): function test_launcher_run_forever_cancellable (line 1221) | async def test_launcher_run_forever_cancellable(launch_mode: LaunchMode): function test_launcher_run_forever_cancellable_mp (line 1258) | async def test_launcher_run_forever_cancellable_mp(n_workers: int): function test_launcher_assigns_random_port_when_none (line 1296) | async def test_launcher_assigns_random_port_when_none(launch_mode: Launc... function test_launcher_endpoint_access_endpoint_health_url_normalization (line 1319) | async def test_launcher_endpoint_access_endpoint_health_url_normalizatio... FILE: tests/utils/test_system_snapshot.py function _patch_system_snapshot (line 15) | def _patch_system_snapshot( function test_system_snapshot_excludes_gpu_by_default (line 65) | def test_system_snapshot_excludes_gpu_by_default(monkeypatch: pytest.Mon... function test_system_snapshot_includes_gpus_when_requested (line 92) | def test_system_snapshot_includes_gpus_when_requested(monkeypatch: pytes... function test_sanity_check (line 109) | def test_sanity_check() -> None: function test_system_snapshot_cpu_percent_samples_immediately (line 128) | def test_system_snapshot_cpu_percent_samples_immediately(monkeypatch: py...