trulens.dashboard.utils.dashboard_utils¶
trulens.dashboard.utils.dashboard_utils
¶
Classes¶
Functions¶
format_sample_rate
¶
Format a nullable sample rate for display.
format_leaderboard_sample_rate
¶
Format the latest observed rate as a percentage.
add_online_eval_columns
¶
Add stable display columns for nullable sampling telemetry.
read_query_params_into_session_state
¶
read_query_params_into_session_state(
page_name: str,
transforms: Optional[
Dict[str, Callable[[str], Any]]
] = None,
)
This method loads query params into the session state. This function should only be called only once when the page is first initialized.
| PARAMETER | DESCRIPTION |
|---|---|
page_name
|
Name of the page being initialized. Used to prefix page-specific session keys.
TYPE:
|
transforms
|
An optional dictionary mapping query param names to a function that deserializes the respective query arg value. Defaults to None. |
read_spcs_oauth_token
¶
Reads the OAuth token from the file system. This is only available if the container is running in SPCS.
get_session
¶
get_session() -> TruSession
Parse command line arguments and initialize TruSession with them.
As TruSession is a singleton, further TruSession() uses will get the same configuration.