Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Environment:Truera Trulens Streamlit Dashboard Environment

From Leeroopedia
Knowledge Sources
Domains Infrastructure, Visualization
Last Updated 2026-02-14 08:00 GMT

Overview

Python 3.9+ (excluding 3.9.7) environment with Streamlit >= 1.35, Plotly, and Jupyter widgets for the TruLens evaluation dashboard.

Description

This environment provides the visualization layer for exploring TruLens evaluation results. It includes a Streamlit-based dashboard with tabs for Leaderboard, Records, and Compare views, plus embeddable Streamlit components for Jupyter notebooks. The dashboard uses custom React components for OTEL trace visualization and supports both legacy and OTEL-based record viewers. Version-specific Streamlit API compatibility is handled automatically.

Usage

Use this environment for viewing evaluation results via `run_dashboard()`. Required in all workflows that end with dashboard visualization, including RAG Evaluation, Custom App Instrumentation, LangGraph Agent Evaluation, and Snowflake Observability.

System Requirements

Category Requirement Notes
OS Any (OS Independent) Linux, macOS, Windows all supported
Python >= 3.9, != 3.9.7 Python 3.9.7 is explicitly excluded
Network localhost access Dashboard runs on local port (default 8501)

Dependencies

Python Packages

  • `trulens-core` >= 2.0.0
  • `streamlit` >= 1.35
  • `plotly` >= 6.0.0
  • `ipywidgets` >= 7.1.2
  • `jupyter` >= 1
  • `pandas` >= 1.0.0
  • `psutil` >= 5.9
  • `rich` >= 13.6
  • `traitlets` >= 5.0.5
  • `packaging` >= 23.0

Optional Packages

  • `streamlit-aggrid` >= 1.0.5, < 1.1.8 (for enhanced data grid in `full` extra)

Credentials

The following environment variables are optional:

  • `TRULENS_UI_CUSTOM_PAGES`: Path to a directory containing custom Streamlit pages to include in the dashboard.
  • `TRULENS_OTEL_TRACING`: Set to `1` by the dashboard automatically to enable OTEL tracing.

Quick Install

# Install dashboard with all dependencies
pip install trulens-dashboard>=2.6.0

# Optional: Install with enhanced data grid
pip install "trulens-dashboard[full]>=2.6.0"

Code Evidence

Python 3.9.7 exclusion from `src/dashboard/pyproject.toml:30`:

python = "^3.9,!=3.9.7"

Streamlit version compatibility from `src/dashboard/trulens/dashboard/utils/streamlit_compat.py:3-6`:

from packaging.version import Version
import streamlit as st

st_version = Version(st.__version__)

Version-specific API checks from `src/dashboard/trulens/dashboard/utils/streamlit_compat.py:18,35`:

if st_version >= Version("1.36.0"):  # gap parameter support
if st_version >= Version("1.38.0"):  # wrap_lines parameter support

Custom pages support from `src/dashboard/trulens/dashboard/main.py:23`:

if custom_pages_dir := os.environ.get("TRULENS_UI_CUSTOM_PAGES"):

Common Errors

Error Message Cause Solution
`ModuleNotFoundError: streamlit` Streamlit not installed `pip install trulens-dashboard`
Port 8501 already in use Another Streamlit instance running Stop the existing instance or specify a different port
Python 3.9.7 error Using excluded Python version Upgrade to Python 3.9.8+ or use 3.10+

Compatibility Notes

  • Python 3.9.7: Explicitly excluded due to a known bug. Use any other 3.9.x version or later.
  • Streamlit >= 1.36.0: Enables `gap` parameter for improved layout.
  • Streamlit >= 1.38.0: Enables `wrap_lines` parameter for better text display.
  • streamlit-aggrid: Constrained to < 1.1.8 for compatibility.

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment