Monitoring & Metrics
The Transfer Learning Video Processing Pipeline includes comprehensive monitoring and metrics tracking capabilities to help you understand performance, resource usage, and processing status.Real-time Dashboard
The pipeline provides a beautiful real-time dashboard powered by Rich, accessible through the CLI:Dashboard Options
string
Filter metrics for a specific video ID
number
default:"2.0"
Dashboard refresh rate in seconds
boolean
default:"false"
Show historical metrics instead of real-time data
Dashboard Sections
The dashboard is divided into several panels:-
Header Panel
- Current video being processed
- Processing duration
- Frame progress
-
Performance Metrics
- Mean and P95 latency
- Throughput statistics
- Total processing time
-
System Resources
- CPU usage (color-coded)
- Memory usage (color-coded)
- Disk usage
- Network I/O
- GPU metrics (if available)
-
API Statistics
- API call counts
- Mean latency per API
- Success/failure rates
-
Custom Metrics
- User-defined metrics
- Application-specific KPIs
Metrics Collection
System Metrics
The pipeline automatically tracks system resource usage:Performance Metrics
Track performance-related metrics:Custom Metrics
Add your own custom metrics:Using the Timer
The pipeline provides a convenient Timer context manager for timing operations:Metrics Storage
Metrics are automatically saved to JSON files in dated directories:Metrics File Format
Historical Analysis
View historical metrics for a specific video:Best Practices
-
Start/End Tracking
-
Use Timers for Operations
-
Add Custom Metrics
-
Monitor Resource Usage
- Keep an eye on system resource usage
- Set up alerts for high resource utilization
- Use color-coded indicators in the dashboard
-
Regular Cleanup
Configuration
Configure monitoring settings in your.env file:
Troubleshooting
Common Issues
-
High Resource Usage
- Check system metrics panel for bottlenecks
- Adjust batch sizes and concurrent processing
- Consider GPU offloading if available
-
Slow Processing
- Monitor API latencies in the dashboard
- Check network I/O metrics
- Optimize batch sizes and caching
-
Missing Metrics
- Ensure metrics tracking is enabled
- Check file permissions in metrics directory
- Verify proper start/end processing calls
Debug Mode
Enable debug logging for more detailed information:API Reference
MetricsTracker
method
Start tracking metrics for a video processing run
method
End tracking metrics and save results
method
Record an API call with its latency
method
Add a custom metric
Timer
constructor
Initialize a timer for operation tracking