trulens.dashboard.utils.records_utilsΒΆ
trulens.dashboard.utils.records_utils
ΒΆ
ClassesΒΆ
FunctionsΒΆ
df_cell_highlight
ΒΆ
df_cell_highlight(
score: float,
feedback_name: str,
feedback_directions: Dict[str, bool],
n_cells: int = 1,
) -> List[str]
Returns the background color for a cell in a DataFrame based on the score and feedback name.
PARAMETER | DESCRIPTION |
---|---|
score
|
The score value to determine the background color.
TYPE:
|
feedback_name
|
The feedback name to determine the background color.
TYPE:
|
feedback_directions
|
A dictionary mapping feedback names to their directions. True if higher is better, False otherwise.
TYPE:
|
n_cells
|
The number of cells to apply the background color. Defaults to 1.
TYPE:
|
display_feedback_call
ΒΆ
display_feedback_call(
record_id: str,
call: List[Dict[str, Any]],
feedback_name: str,
feedback_directions: Dict[str, bool],
)
Display the feedback call details in a DataFrame.
_render_feedback_pills
ΒΆ
_render_feedback_pills(
feedback_col_names: Sequence[str],
feedback_directions: Dict[str, bool],
selected_row: Optional[Series] = None,
)
Render each feedback as pills.
PARAMETER | DESCRIPTION |
---|---|
feedback_col_names
|
The name of the feedback function columns. |
feedback_directions
|
A dictionary mapping feedback names to their directions. True if higher is better, False otherwise. |
selected_row
|
The selected row (if any). If provided, renders the feedback values. Defaults to None. |
RETURNS | DESCRIPTION |
---|---|
Any
|
The feedback pills streamlit component. |