Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Cerrado
#1,861 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Ya se ha fusionado un pull request relacionado.

  • #1862 de @mangeshraut712 — fusionado

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
python
Área
tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Python
Estrellas
283
Forks
75
Merge medio
1 d 18 h
PR fusionados (30 d)
220

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de NVIDIA/TensorRT-Model-Connect

Todos los issues de NVIDIA/TensorRT-Model-Connect

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.