Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Silas-Asamoah/stormlog/llms.txt
Use this file to discover all available pages before exploring further.
MemoryTracker
Real-time TensorFlow GPU memory tracker with configurable sampling and alerts.Constructor
Time between memory samples in seconds
Memory threshold for triggering alerts in MB
TensorFlow device to monitor (e.g., ‘/GPU:0’). Defaults to ‘/GPU:0’
Whether to log tracking events
Methods
start_tracking
Start real-time memory tracking.stop_tracking
Stop tracking and return results.Object containing memory usage history, timestamps, events, and alerts
get_current_memory
Get current memory usage without starting tracking.Current memory usage in MB
set_alert_threshold
Update the alert threshold during tracking.New threshold in MB
add_alert_callback
Add callback function for memory alerts.Function to call when alert is triggered. Receives alert dictionary with timestamp, memory_mb, and threshold_mb
check_alerts
Check if any alerts have been triggered recently.True if alerts triggered in last 10 seconds
get_tracking_results
Get current tracking results without stopping.TrackingResult
Results from real-time memory tracking.Start timestamp
End timestamp
List of memory samples in MB
Corresponding timestamps for each sample
Telemetry events captured during tracking
List of triggered alerts
Peak memory usage in MB
Average memory usage in MB
Properties
duration: Total tracking duration in seconds memory_growth_rate: Memory growth rate in MB/secondMemoryWatchdog
Automatic memory management and cleanup for TensorFlow.Constructor
Maximum memory before forced cleanup
Memory threshold to trigger cleanup
Time between memory checks in seconds
Methods
start
Start memory watchdog monitoring.stop
Stop memory watchdog.force_cleanup
Force immediate memory cleanup.add_cleanup_callback
Add custom cleanup callback function.Function to call during cleanup operations