Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Bug: tools.model_benchmark uses hardcoded ':' for PYTHONPATH instead of os.pathsep

クローズ
#1,861 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #1862 @mangeshraut712 による — マージ済み

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
tooling

調査の方向性

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 の本文から書いたものです。

説明

bug
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時間
マージ済み PR(30日)
220

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/TensorRT-Model-Connect のほかの issue

NVIDIA/TensorRT-Model-Connect の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。