Files
voicebox/backend/tests/test_check_progress_state.py
T
Jamie Pine 17106b1e40 Add progress tracking and caching checks for model downloads
- Introduced methods to check if models are cached locally in MLX and PyTorch backends.
- Enhanced progress tracking during model loading to filter out non-download progress when models are cached.
- Updated HFProgressTracker to conditionally report progress based on download status.
- Added test scripts for monitoring SSE events during model downloads and verifying progress tracking functionality.
- Improved overall error handling and logging for better debugging during model download processes.
2026-01-30 16:47:54 -08:00

49 lines
1.2 KiB
Python

"""
Check the internal state of ProgressManager.
"""
import sys
import time
# Add backend to path
sys.path.insert(0, '.')
from utils.progress import get_progress_manager
from utils.tasks import get_task_manager
def main():
pm = get_progress_manager()
tm = get_task_manager()
print("=" * 60)
print("ProgressManager State Inspector")
print("=" * 60)
# Check all progress
print("\nAll progress entries:")
print(f" _progress dict: {pm._progress}")
# Check listeners
print("\nActive listeners:")
print(f" _listeners dict: {pm._listeners}")
# Check main loop
print(f"\nMain loop set: {pm._main_loop is not None}")
if pm._main_loop:
print(f" Loop running: {pm._main_loop.is_running()}")
# Check task manager
print("\nTaskManager state:")
print(f" Active downloads: {tm.get_active_downloads()}")
print(f" Active generations: {tm.get_active_generations()}")
# Check for specific model
print("\nChecking whisper-base specifically:")
progress = pm.get_progress("whisper-base")
if progress:
print(f" Progress: {progress}")
else:
print(" No progress data found")
if __name__ == "__main__":
main()