Skip to content

winml perf crashes on clean install — psutil imported but not a runtime dependency #936

Description

@timenick

Found during the v0.2.0 Gate 3 bug bash.

Symptom

On a clean pip install winml-cli, any winml perf invocation (with or without --monitor / --memory) fails immediately:

Error: Benchmark failed: No module named 'psutil'

Root cause

src/winml/modelkit/session/monitor/memory_tracker.py:13 has a module-level import psutil, and the perf flow imports memory_tracker unconditionally. psutil is not declared in [project].dependencies in pyproject.toml — only the dev type stub types-psutil is present. As a result the published wheel's Requires-Dist omits psutil, so it is never installed for end users.

Regression

Introduced by #861 (feat: add --memory flag to measure RAM and VRAM per phase). memory_tracker.py did not exist at v0.1.0, so winml perf was unaffected there.

Impact

Blocks v0.2.0 — winml perf is a headline command and is broken out-of-the-box for every clean install. Installing psutil manually confirms perf/build/--monitor otherwise work correctly, so the only defect is the missing dependency declaration.

Fix

Add psutil to [project].dependencies in pyproject.toml.

Metadata

Metadata

Assignees

Labels

P0Critical — blocking, crash, data loss

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions