Bug: tools.model_benchmark uses hardcoded ':' for PYTHONPATH instead of os.pathsep
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #1862 来自 @mangeshraut712 —— 已合并
评估
调研方向
The issue identifies tools/model_benchmark.py and tools/tests/test_model_benchmark.py. Read aiperf_command and the existing assertion, then check how the environment constructs PYTHONPATH and how the test splits it. Done means both use the platform path separator and the test passes on supported platforms.
由索引模型根据 Issue 内容生成。
描述
Affected area
Validation or benchmarking
TensorRT-Model-Connect version
main (commit cd87bfc3)
Installation method
Other
Model and revision
not model-specific
Environment
OS: Windows / Linux
GPU: N/A
Driver: N/A
CUDA: N/A
TensorRT: N/A
Container image or package: Python 3.10+ (tools/model_benchmark.py)
Minimal reproducer
import argparse
from pathlib import Path
from tools.model_benchmark import aiperf_command
args = argparse.Namespace(
aiperf_python=Path("python"),
environment=Path("env.yaml"),
out_root=Path("out"),
model=[],
shard=None,
rerun=False,
)
command, env = aiperf_command(args)
print("PYTHONPATH:", env["PYTHONPATH"])
Observed behavior
In tools/model_benchmark.py (line 47), aiperf_command constructs PYTHONPATH using a hardcoded colon separator:
return command, {"PYTHONPATH": ":".join(str(REPOSITORY / root) for root in roots)}
On Windows platforms, filesystem paths contain drive letters (e.g. C:...) and Python parses PYTHONPATH using os.pathsep (';'). Joining paths with ':' breaks the path search list, preventing Python from splitting the directories properly and causing ModuleNotFoundError: No module named 'trtmc_aiperf_qual' when running the benchmark.
Expected behavior
tools/model_benchmark.py should use os.pathsep.join(...) instead of a hardcoded ":" so that PYTHONPATH is formatted portably across all supported operating systems.
In tools/tests/test_model_benchmark.py (line 19), the assertion should also be updated to split on os.pathsep instead of hardcoded ":".
Relevant logs
ModuleNotFoundError: No module named 'trtmc_aiperf_qual'
Submission checks
- I searched open and closed issues and found no duplicate.
- This is not a security vulnerability.
- I removed secrets, credentials, private URLs, and restricted artifacts.
- 主要语言
- Python
- 星标
- 283
- 派生
- 75
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 220
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NVIDIA/TensorRT-Model-Connect 的其他 Issue
-
Docs: ITrtModule::forward() output-buffer lifetime and dtype contract are undocumented可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
NVIDIA/TensorRT-Model-Connect#1126 · 1 条评论 ·
维护者通常 1 天内回复
-
Bug: trtmc-aiperf-qual run exits 1 when Acc passes and Perf is measured可能已有人在做 @JiaxinD 于 1 天前认领。 未关闭bug
难度 1/5 1 小时以内 新手友好度 20/100
NVIDIA/TensorRT-Model-Connect#1897 · 1 条评论 ·
维护者通常 1 天内回复
-
Feature: Support LeRobot GR00T N1.7 policies with native Model Connect bundles可能已有人在做 @chaofengw-nv 于 1 天前认领。 未关闭AI enhancement model-onboarding
难度 5/5 一周以上 新手友好度 25/100
NVIDIA/TensorRT-Model-Connect#1881 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Feature: Support LeRobot Pi 0.5 policies with native Model Connect bundles可能已有人在做 @chaofengw-nv 于 1 天前认领。 未关闭AI enhancement model-onboarding
难度 5/5 一周以上 新手友好度 35/100
NVIDIA/TensorRT-Model-Connect#1880 · 已指派 1 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 6/100
NVIDIA/TensorRT-Model-Connect#1700 · 4 条评论 ·
维护者通常 1 天内回复
查看 NVIDIA/TensorRT-Model-Connect 的全部 Issue
相似的 Issue
-
ai_p2 bug comp-datalake
难度 2/5 1-3 小时 新手友好度 85/100
ClickHouse/ClickHouse#128306 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
[bug] openlit: LLM spans from openlit 1.37+ get no OpenInference attributes, and cache and reasoning token counts are dropped可能已有人在做 @sohom-cs 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 74/100
Arize-ai/openinference#4199 · 1 个 reaction ·
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
MichaelYcJo/SpecSeal#1192 ·