aiq.profiler.decorators#

Attributes#

Functions#

set_framework_profiler_handler(...)

Decorator that wraps an async context manager function to set up framework-specific profiling.

chain_wrapped_build_fn(...)

Convert an original build function into an async context manager that

Module Contents#

logger#
_library_instrumented#
callback_handler_var: contextvars.ContextVar[Any | None]#
set_framework_profiler_handler(
workflow_llms: dict = None,
frameworks: list[aiq.builder.framework_enum.LLMFrameworkEnum] = None,
) collections.abc.Callable[[collections.abc.Callable[Ellipsis, contextlib.AbstractAsyncContextManager[Any]]], collections.abc.Callable[Ellipsis, contextlib.AbstractAsyncContextManager[Any]]]#

Decorator that wraps an async context manager function to set up framework-specific profiling.

chain_wrapped_build_fn(
original_build_fn: collections.abc.Callable[Ellipsis, contextlib.AbstractAsyncContextManager],
workflow_llms: dict,
function_frameworks: list[aiq.builder.framework_enum.LLMFrameworkEnum],
) collections.abc.Callable[Ellipsis, contextlib.AbstractAsyncContextManager]#

Convert an original build function into an async context manager that wraps it with a single call to set_framework_profiler_handler, passing all frameworks at once.