Web Interface Guide
Comprehensive guide to the RING-5 Streamlit web interface.
Overview
The RING-5 web application provides an interactive dashboard for:
- Parsing gem5 simulator output
- Transforming and filtering data
- Creating publication-quality visualizations
- Managing analysis portfolios
Application Structure
Navigation Sidebar
The sidebar provides access to all pages:
- Home: Application overview and dataset preview
- Data Source: Parse gem5 stats or upload CSV files
- Data Managers: View and transform data
- Upload Data: Direct CSV upload
- Manage Plots: Create and configure visualizations
- Portfolio: Save and load analysis sessions
- Performance: Monitor application performance
Current Dataset Display
When data is loaded, the main page shows:
- Rows: Number of data points
- Columns: Number of variables
- Source: Data origin (parsed path or uploaded file)
Pages in Detail
1. Data Source Page
Purpose: Load data into RING-5
Parse gem5 Stats
Workflow:
- Select gem5 output directory
- Configure stats file pattern (default:
stats.txt) - Click Scan Variables
- Review discovered variables
- Select variables to parse
- Click Parse Selected Variables
- Wait for completion
Pattern Aggregation: Variables with repeated indices (cpu0, cpu1, cpu2) are consolidated into regex patterns (cpu\d+).
Scan Configuration:
- Limit: Number of files to scan (-1 for all)
- Pattern: Glob pattern for stats files
- Recursive: Search subdirectories
Upload CSV
Workflow:
- Click Browse to select CSV file
- Review preview
- Click Upload
- Data is loaded into session
CSV Requirements:
- First row must be column headers
- UTF-8 encoding recommended
- Comma-separated values
2. Data Managers Page
Purpose: View, filter, and transform loaded data
Tabs
Visualization Tab:
- Full data table view
- Search functionality
- Column filtering
- Pagination support
- Download filtered view as CSV
Operations:
- Search across all columns
- Filter by column value
- Sort by columns
- Export current view
Seeds Reducer: Aggregate multiple seeds/runs:
- Group by configuration and benchmark
- Apply aggregation function (mean, median, geomean)
- Reduce variance from multiple runs
Mixer: Merge multiple datasets:
- Combine data from different sources
- Join on common columns
- Useful for multi-experiment comparisons
Outlier Remover: Identify and remove statistical outliers:
- Z-score method
- IQR method
- Custom threshold
Preprocessor: Clean and prepare data:
- Handle missing values
- Convert data types
- Rename columns
3. Manage Plots Page
Purpose: Create and configure visualizations
Creating Plots
- Click Create New Plot
- Select plot type:
- Bar Chart
- Grouped Bar Chart
- Stacked Bar Chart
- Grouped Stacked Bar Chart
- Line Plot
- Scatter Plot
- Histogram
- Enter plot name
- Click Create
Plot Configuration
Each plot has independent configuration:
Data Mapping:
- X-axis: Variable for horizontal axis
- Y-axis: Variable for vertical axis
- Group by: Variable for grouping (grouped plots)
- Stack by: Variable for stacking (stacked plots)
- Color by: Variable for color coding
Data Processing Pipeline: Add transformations sequentially:
- Column Selector: Keep specific columns
- Sort: Order data
- Mean Calculator: Add aggregated means
- Normalize: Normalize to baseline
- Filter: Apply conditions
- Transformer: Custom transformations
Plot Styling:
- Title and labels
- Legend position
- Color scheme
- Size dimensions
- Grid lines
- Font sizes
Managing Multiple Plots
Plot Selector: Dropdown to switch between plots
Plot Controls:
- Rename: Update plot name
- Delete: Remove plot
- Duplicate: Create copy
- Export Pipeline: Save pipeline configuration
- Import Pipeline: Load pipeline from file
4. Upload Data Page
Purpose: Direct CSV file upload
Features:
- Drag-and-drop support
- File preview before upload
- Column type detection
- Error handling for malformed CSV
Use Cases:
- Pre-processed data
- External analysis results
- Manual data entry exports
5. Portfolio Page
Purpose: Save and load complete analysis sessions
Saving Portfolios
- Click Save Portfolio
- Enter portfolio name
- Optional: Add description
- Click Save
Saved Content:
- All loaded data (DataFrame)
- All plot objects (configurations + pipelines)
- All transformations
- All session state
Loading Portfolios
- Select portfolio from dropdown
- Click Load Portfolio
- Session is restored completely
Format: Portfolios are saved as JSON files containing serialized data and configurations.
6. Performance Page
Purpose: Monitor application performance and resource usage
Metrics:
- Parse Operations: Number of parse tasks
- Worker Pool Size: Concurrent workers
- CSV Cache: Cached CSV files
- Session State Size: Number of state keys
- Memory Usage: DataFrame sizes
Actions:
- Clear All Caches: Reset CSV pool cache
- Monitor Performance: Real-time metrics
State Management
Session State
RING-5 uses Streamlit session state for:
- Loaded data (
data) - Plot objects (
plots_objects) - Parsed variables (
parse_variables) - Scanned variables (
scanned_variables) - Configuration settings
State Persistence: Session state is not persistent across browser sessions. Use portfolios for persistence.
StateManager API
Central state management through StateManager class:
from src.web.state_manager import StateManager
# Get data
data = StateManager.get_data()
# Set data
StateManager.set_data(new_data)
# Check if data exists
if StateManager.has_data():
# Process data
Interactive Features
Plotly Interactivity
All plots support:
- Zoom: Box zoom, scroll zoom
- Pan: Click and drag
- Hover: Inspect data points
- Legend Toggle: Click to show/hide traces
- Download: Export as PNG/SVG
- Relayout: Drag axes to resize
Real-time Updates
Changes trigger automatic updates:
- Adding/removing shapers
- Updating plot configuration
- Changing data mapping
- Applying filters
Keyboard Shortcuts
- Ctrl+R / Cmd+R: Rerun application
- Ctrl+Click on link: Open in new tab
- Escape: Close modals/dialogs
Data Flow
gem5 Output Directory
↓
[Scan Variables]
↓
[Select Variables]
↓
[Parse Stats]
↓
[Load Data] → StateManager
↓
[Apply Shapers] → Pipeline
↓
[Create Plot] → Visualization
↓
[Save Portfolio] → JSON File
Best Practices
- Load Data First: Always load data before creating plots
- Use Meaningful Names: Name plots descriptively
- Save Regularly: Create portfolios for important analyses
- Pipeline Incrementally: Add transformations one at a time
- Review Data: Check Data Managers before plotting
- Export Pipelines: Save pipeline configurations for reuse
Common Workflows
Workflow 1: Quick Analysis
- Data Source → Parse gem5 Stats
- Scan → Select → Parse
- Manage Plots → Create Plot
- Configure → Visualize
- Portfolio → Save
Workflow 2: Multi-Configuration Comparison
- Upload CSV with pre-processed data
- Data Managers → Review data
- Manage Plots → Create Grouped Bar Chart
- Configure grouping by configuration
- Apply normalization to baseline
- Save portfolio
Workflow 3: Publication Figure
- Parse gem5 stats
- Apply shapers: Filter → Sort → Normalize
- Create plot with custom styling
- Adjust fonts, colors, legend
- Export as PNG (high resolution)
- Save pipeline for reproducibility
Troubleshooting
Application Not Loading
Solutions:
- Check terminal for errors
- Ensure port 8501 is not in use
- Restart application:
Ctrl+Cthen./launch_webapp.sh
Data Not Appearing
Solutions:
- Verify data was loaded (check Current Dataset)
- Check session state: Performance page
- Try reloading: Press
Rkey
Plot Not Updating
Solutions:
- Click Update Plot button
- Check pipeline for errors
- Review data mapping
- Verify data exists after transformations
Session State Lost
Solutions:
- Session state resets on browser close
- Save portfolios before closing
- Use portfolio to restore session
Advanced Features
Custom Plotly Configuration
Access Plotly config in plot settings:
- Modebar buttons
- Display logo
- Responsive sizing
- Scroll zoom
Pipeline Import/Export
Share pipeline configurations:
- Export pipeline as JSON
- Share file with collaborators
- Import on different dataset
- Pipeline is reusable across projects
Data Manager Chaining
Chain multiple data managers:
- Outlier Remover → Remove statistical outliers
- Seeds Reducer → Aggregate runs
- Preprocessor → Clean column names
Next Steps
- Data Transformations: Data Transformations Guide
- Creating Plots: Plot Creation Guide
- Portfolios: Advanced portfolio management
- API Reference: Backend Facade API
Need Help? See Troubleshooting or open an issue on GitHub.