Skip to content

Commit 2472d56

Browse files
authored
Fangyangci/add failed type (#1357)
1 parent 95667fe commit 2472d56

35 files changed

Lines changed: 587 additions & 4198 deletions

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
with:
2929
python-version: "3.11"
3030

31-
- run: uv sync --locked --only-group docs
31+
- run: uv sync --only-group docs
3232

3333
- name: Configure git for mike
3434
run: |

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
run: uv python install 3.11
2828

2929
- name: Install dependencies
30-
run: uv sync --locked --all-extras --all-groups
30+
run: uv sync --all-extras --all-groups
3131

3232
- name: Check license headers
3333
run: |

.github/workflows/modelkit-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
node-version: 22
5959

6060
- name: Install dependencies
61-
run: uv sync --locked --all-extras
61+
run: uv sync --all-extras
6262

6363
- name: Run tests (${{ matrix.group }})
6464
shell: pwsh

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,3 +280,4 @@ src/winml/modelkit/analyze/rules/runtime_check_rules/**/*.parquet
280280

281281
# Generated by mike (docs versioning)
282282
docs/versions.json
283+
/uv.lock

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ See the [README](./README.md#getting-started) for prerequisites and installation
1616
```bash
1717
git clone https://github.com/microsoft/winml-cli.git
1818
cd winml-cli
19-
uv sync --locked
19+
uv sync
2020
uv run pre-commit install
2121
```
2222

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This folder hosts the source for the [winml-cli](https://github.com/microsoft/wi
66

77
| Task | Command |
88
|---|---|
9-
| Install dev deps | `uv sync --locked` |
9+
| Install dev deps | `uv sync` |
1010
| Live preview | `uv run mkdocs serve` |
1111
| Build for CI | `uv run mkdocs build --strict` |
1212
| Publish (one-shot from laptop) | `uv run mkdocs gh-deploy --force` |
@@ -48,7 +48,7 @@ Python 3.10+ and [uv](https://github.com/astral-sh/uv).
4848

4949
```bash
5050
# from the repo root
51-
uv sync --locked
51+
uv sync
5252
uv run mkdocs serve
5353
```
5454

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ For the full contributing guide — development setup, coding conventions, testi
88
# Clone and set up
99
git clone https://github.com/microsoft/winml-cli.git
1010
cd winml-cli
11-
uv sync --locked
11+
uv sync
1212
uv run pre-commit install
1313

1414
# Download runtime check rules (required for `winml analyze`)

docs/getting-started/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ uv pip install winml-cli
2727

2828
```powershell
2929
uv python install cpython-3.11-windows-x86_64-none
30-
uv sync --locked --python cpython-3.11-windows-x86_64-none
30+
uv sync --python cpython-3.11-windows-x86_64-none
3131
```
3232

3333
The x64 interpreter runs under Windows emulation on Arm64 hardware; `winml sys` still reports the Arm64 machine, and the NPU/GPU/CPU providers work normally.

pyproject.toml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,14 @@ dependencies = [
5151
# form of what WinML's wasdk metadata pins as `1.24.5.post202604171637` (PEP 440
5252
# normalized) — an exact `==` can't reconcile the two. A bounded range keeps the
5353
# 1.24.x series while resolving to the published wheel.
54-
"onnxruntime-windowsml>=1.24.5,<1.25 ; sys_platform == 'win32'",
54+
"onnxruntime-windowsml==1.24.5.202604171637 ; sys_platform == 'win32'",
5555
"onnxscript>=0.2",
5656
"opentelemetry-sdk>=1.39.1",
5757
"optimum>=2",
5858
"optimum-onnx>=0.1",
59-
"plotext>=5.3.2",
59+
# plotext 6.0 was recently released with breaking API changes that conflict
60+
# with the current live chart code. Upgrade the code and dependency to >=6 together.
61+
"plotext>=5.3.2,<6",
6062
# PINNED EXACTLY ON PURPOSE — do NOT relax to a range.
6163
# pandas version drift changes parquet string typing/metadata, producing
6264
# non-functional but huge diffs across every generated rule artifact. If you
@@ -88,7 +90,9 @@ dependencies = [
8890
optional-dependencies.audio = [ "soundfile>=0.13" ]
8991
optional-dependencies.openvino = [ "openvino>=2023" ]
9092
optional-dependencies.qnn = [
91-
"onnxruntime-qnn>=1.24.1; python_version>='3.11'",
93+
# 2.1+ is a plugin-only wheel under ``onnxruntime_qnn``. Older releases
94+
# also install the ``onnxruntime`` package and overwrite Windows ML files.
95+
"onnxruntime-qnn>=2.1; python_version>='3.11'",
9296
]
9397
urls."Bug Tracker" = "https://github.com/microsoft/winml-cli/issues"
9498
urls.Documentation = "https://github.com/microsoft/winml-cli/blob/main/README.md"
@@ -119,19 +123,12 @@ environments = [
119123
"sys_platform == 'linux' and platform_machine == 'x86_64'",
120124
"sys_platform == 'win32' and platform_machine == 'AMD64'",
121125
]
122-
# Overrides:
123-
# 1. Exercise transformers 5.x in development while keeping the published
124-
# `transformers>=4.57` metadata compatible with optimum-onnx 0.1.0's
125-
# `transformers<4.58.0` ceiling. The transformers_compat shim bridges the
126-
# few 4.x internals optimum-onnx reaches for under transformers 5.
127-
# 2. Neutralize onnxruntime-qnn's transitive standard `onnxruntime` requirement.
128-
# onnxruntime-windowsml ships the same `onnxruntime/` module; installing plain
129-
# onnxruntime alongside it overwrites windowsml's files on disk and kills the
130-
# DirectML EP. The `sys_platform == 'unobtainium'` marker is never true, so uv
131-
# never installs plain onnxruntime while still keeping onnxruntime-qnn.
132-
override-dependencies = [
133-
"transformers>=5,<6",
134-
"onnxruntime ; sys_platform == 'unobtainium'",
126+
# The QNN plugin declares standard ``onnxruntime`` as a runtime dependency,
127+
# but WinML CLI uses the API-compatible ``onnxruntime-windowsml`` build.
128+
# Installing both distributions corrupts their shared ``onnxruntime`` package
129+
# tree and makes the active CPU/DML runtime depend on installation order.
130+
exclude-dependencies = [
131+
{ package = { name = "onnxruntime-qnn" }, dependencies = [ "onnxruntime" ] },
135132
]
136133

137134
[[tool.uv.index]]

scripts/e2e_eval/README.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ uv run python scripts/e2e_eval/run_eval.py --continue
9595
# Backfill accuracy onto an existing perf-only batch (reuses cached perf)
9696
uv run python scripts/e2e_eval/run_eval.py --eval-type both --continue
9797

98-
# Retry only ENVIRONMENT failures (disk/network issues)
99-
uv run python scripts/e2e_eval/run_eval.py --retry-failed ENVIRONMENT UNKNOWN
98+
# Retry only retryable infra/download failures
99+
uv run python scripts/e2e_eval/run_eval.py --retry-failed HF_FETCH_FAIL ENVIRONMENT UNKNOWN
100100

101101
# Retry ALL failed jobs
102102
uv run python scripts/e2e_eval/run_eval.py --retry-failed
@@ -121,11 +121,12 @@ uv run python scripts/e2e_eval/run_eval.py --update-baseline --eval-type accurac
121121
| `--device` | `auto` | Target device |
122122
| `--ep` || Execution provider (e.g. `qnn`, `dml`, `openvino`); applied at perf/eval time |
123123
| `--timeout` | 600 | Per-subprocess timeout (seconds) |
124+
| `--clean-cache [TARGET ...]` | off | Clean caches after each job. `TARGET`: `winml`, `huggingface`, `others` (others = VitisAI cache + temp/cwd leaked scratch files). Use `--clean-cache` without TARGET to clear all (legacy behavior). |
124125
| `--update-baseline` | off | Offline mode: refresh `cache/baseline_cache.json` via the PyTorch baseline, then exit (no build/perf/eval) |
125126
| `--list` | off | List models and exit |
126127
| `--verbose` | off | Print stderr for failed models |
127128
| `--continue` | off | Skip jobs with existing results (but backfill accuracy onto perf-only results when `--eval-type` wants it) |
128-
| `--retry-failed [TYPE ...]` || Re-run failed jobs (implies `--continue`) |
129+
| `--retry-failed [TYPE ...]` || Re-run failed jobs (implies `--continue`); unknown types are rejected as argument errors. Retry criteria are not mutually exclusive: `HF_FETCH_FAIL` also checks failed perf and accuracy logs for `WinError 10060`, `we couldn't connect to 'https://huggingface.co'`, or `thrown while requesting HEAD https://huggingface.co`, even when the primary perf classification is another type or accuracy is `FAIL`. |
129130
| `--build-only` | off | Build with `--no-compile`, writing each stage's ONNX (no EP needed). Loops the EP matrix when `--ep`/`--device` omitted |
130131

131132
### `run_llm_eval.py` — Run GenAI Context Sweep
@@ -334,7 +335,8 @@ Groups (`Foundry Toolkit`, `Benchmark`, `ISV`, `microsoft`, `Top200`, …) categ
334335

335336
### Failure Classification
336337

337-
Failures are classified from `stdout + stderr` pattern matching (ordered by pipeline stage):
338+
Perf failures receive one primary classification from `stdout + stderr` pattern
339+
matching (ordered by pipeline stage; first match wins):
338340

339341
| Type | Stage |
340342
|---|---|
@@ -343,13 +345,20 @@ Failures are classified from `stdout + stderr` pattern matching (ordered by pipe
343345
| `OPT_FAIL` | Graph optimization |
344346
| `COMPILE_FAIL` | Compilation / quantization |
345347
| `RUNTIME_FAIL` | Inference |
348+
| `HF_FETCH_FAIL` | Hugging Face model/config fetch or cache miss |
346349
| `ENVIRONMENT` | Disk / network (retryable) |
347350
| `TIMEOUT` | Exceeded time limit |
348351
| `UNKNOWN` | No pattern matched |
349352

350353
Classification is **derived on-the-fly** from stored facts — updating classifier
351354
rules automatically reclassifies all historical results.
352355

356+
`--retry-failed` criteria are not mutually exclusive. In addition to matching
357+
`HF_FETCH_FAIL` when it is the primary perf classification, the runner scans failed
358+
perf and accuracy logs for supplemental Hugging Face fetch markers. A job can
359+
therefore match both `EXPORT_FAIL` and `HF_FETCH_FAIL`, or both accuracy `FAIL` and
360+
`HF_FETCH_FAIL`; requesting either applicable retry type re-runs it.
361+
353362
### Output Structure
354363

355364
```

0 commit comments

Comments
 (0)