"lib/ssh:/git@developer.sourcefind.cn:2222/OpenDAS/dynamo.git" did not exist on "3c7c1d64ce3994ccf247d164a3287b3f89e2278e"
Unverified Commit 517f3024 authored by Keiven C's avatar Keiven C Committed by GitHub
Browse files

fix: updated dynamo_check.py for the new TensorRT-LLM tensorrt_llm virtualenv location (#3153)


Signed-off-by: default avatarKeiven Chang <keivenchang@users.noreply.github.com>
parent e3068d61
...@@ -1594,69 +1594,7 @@ class FrameworkInfo(NodeInfo): ...@@ -1594,69 +1594,7 @@ class FrameworkInfo(NodeInfo):
frameworks_found = 0 frameworks_found = 0
for module_name, display_name in frameworks_to_check: for module_name, display_name in frameworks_to_check:
# Special handling for TensorRT-LLM to avoid NVML crashes # Regular import for all frameworks
if module_name == "tensorrt_llm":
# Check if it's installed in system packages first
python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
system_packages = [
f"/usr/local/lib/python{python_version}/dist-packages",
f"/usr/lib/python{python_version}/dist-packages",
]
for pkg_path in system_packages:
if os.path.exists(pkg_path):
tensorrt_dirs = [
d for d in os.listdir(pkg_path) if "tensorrt_llm" in d
]
if tensorrt_dirs:
frameworks_found += 1
# Try to get version safely
try:
result = subprocess.run(
[
sys.executable,
"-c",
"import tensorrt_llm; print(tensorrt_llm.__version__)",
],
capture_output=True,
text=True,
timeout=10,
)
if result.returncode == 0:
version = result.stdout.strip()
package_info = PythonPackageInfo(
package_name=display_name,
version=version,
module_path=f"{pkg_path}/tensorrt_llm/__init__.py",
is_framework=True,
is_installed=True,
)
else:
package_info = PythonPackageInfo(
package_name=display_name,
version=f"Found in {pkg_path} but not importable",
is_framework=True,
is_installed=True,
)
self.add_child(package_info)
break
except (
subprocess.TimeoutExpired,
subprocess.CalledProcessError,
):
package_info = PythonPackageInfo(
package_name=display_name,
version=f"Found in {pkg_path} but not importable",
is_framework=True,
is_installed=True,
)
self.add_child(package_info)
break
# Don't add anything if not found in system
continue
# Regular import for other frameworks
try: try:
module = __import__(module_name) module = __import__(module_name)
version = getattr(module, "__version__", "installed") version = getattr(module, "__version__", "installed")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment