trinity.buffer.viewer module#
- class trinity.buffer.viewer.SQLExperienceViewer(config: StorageConfig)[源代码]#
基类:
object- __init__(config: StorageConfig) None[源代码]#
- get_experiences(offset: int, limit: int = 10) List[Experience][源代码]#
- static run_viewer(model_path: str, db_url: str, table_name: str, port: int)[源代码]#
Start the Streamlit viewer.
- 参数:
model_path (str) -- Path to the tokenizer/model directory.
db_url (str) -- Database URL for the experience database.
table_name (str) -- Name of the experience table in the database.
port (int) -- Port number to run the Streamlit app on.
- trinity.buffer.viewer.get_color_for_action_mask(action_mask_value: int) str[源代码]#
Return color based on action_mask value
- trinity.buffer.viewer.render_experience(exp: Experience, tokenizer)[源代码]#
Render a single experience sequence in Streamlit.