AQIT 0.1.0
Loading...
Searching...
No Matches
aquin.trace_check Namespace Reference

Functions

dict[str, Any] _flatten_trace_result (dict[str, Any] result)
tuple[Path, Path] write_trace_check (dict[str, Any] result, *, str|None tool_name, str|Path cwd)
None _plot_trace_check (dict[str, Any] result, Path png_path)
None _plot_top_features (Any ax, list[dict[str, Any]] features)
None _plot_logit_lens (Any ax, list[dict[str, Any]] logit_lens, str trace_target)
None _plot_trace (Any ax, list[dict[str, Any]] trace_results)
None _plot_summary (Any ax, str prompt, str response, list[dict[str, Any]] attribution)

Variables

str _JSON_NAME = "trace-check.json"
str _PNG_NAME = "trace-check.png"

Function Documentation

◆ _flatten_trace_result()

dict[str, Any] _flatten_trace_result ( dict[str, Any] result)
protected

Definition at line 19 of file trace_check.py.

Referenced by write_trace_check().

◆ _plot_logit_lens()

None _plot_logit_lens ( Any ax,
list[dict[str, Any]] logit_lens,
str trace_target )
protected

Definition at line 147 of file trace_check.py.

Referenced by _plot_trace_check().

◆ _plot_summary()

None _plot_summary ( Any ax,
str prompt,
str response,
list[dict[str, Any]] attribution )
protected

Definition at line 200 of file trace_check.py.

Referenced by _plot_trace_check().

◆ _plot_top_features()

None _plot_top_features ( Any ax,
list[dict[str, Any]] features )
protected

Definition at line 118 of file trace_check.py.

Referenced by _plot_trace_check().

◆ _plot_trace()

None _plot_trace ( Any ax,
list[dict[str, Any]] trace_results )
protected

Definition at line 183 of file trace_check.py.

Referenced by _plot_trace_check().

◆ _plot_trace_check()

None _plot_trace_check ( dict[str, Any] result,
Path png_path )
protected

Definition at line 72 of file trace_check.py.

References _plot_logit_lens(), _plot_summary(), _plot_top_features(), and _plot_trace().

Referenced by write_trace_check().

◆ write_trace_check()

tuple[Path, Path] write_trace_check ( dict[str, Any] result,
* ,
str | None tool_name,
str | Path cwd )

Definition at line 51 of file trace_check.py.

References _flatten_trace_result(), and _plot_trace_check().

Variable Documentation

◆ _JSON_NAME

str aquin.trace_check._JSON_NAME = "trace-check.json"
protected

Definition at line 15 of file trace_check.py.

◆ _PNG_NAME

str aquin.trace_check._PNG_NAME = "trace-check.png"
protected

Definition at line 16 of file trace_check.py.