This repository has been archived on 2026-08-19. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
ROCm-Research-Archive/_TestScripts/Scripts and Tests/check_inference_deps.py
T
2026-08-20 00:45:43 +02:00

30 lines
977 B
Python

#!/usr/bin/env python3
"""Check which imports the inference/ subpackage actually needs."""
import subprocess, sys
cmd = """
cd /opt/qwen3-tts
# Only scan inference/ subdir (the actual runtime path)
grep -rh '^import\\|^from' qwen3_tts_gguf/inference/ 2>/dev/null | \
grep -v __pycache__ | grep -v '^\\.\\|^from \\.' | sort -u
"""
result = subprocess.run(
["docker", "run", "--rm", "--entrypoint", "bash", "sudx/qwen3-tts:latest", "-c", cmd],
capture_output=True, text=True
)
print("=== inference/ external imports ===")
print(result.stdout)
# Also check schema/ since inference imports it
cmd2 = """
cd /opt/qwen3-tts
grep -rh '^import\\|^from' qwen3_tts_gguf/schema/ 2>/dev/null | \
grep -v __pycache__ | grep -v '^from \\.' | sort -u
"""
result2 = subprocess.run(
["docker", "run", "--rm", "--entrypoint", "bash", "sudx/qwen3-tts:latest", "-c", cmd2],
capture_output=True, text=True
)
print("=== schema/ external imports ===")
print(result2.stdout)