Pull requests / #589
#589 make_profile: --reorder so a trace can rank ahead of a complete base
closed · @yannickloth · 0 comentários · No GitHub
Descrição
Fixes #587. `tools/make_profile.py` ranks the base first, then the trace pairs, then the fill. The base is only appended to, and the shipped `data/expert-profile.bin` ranks all 24,576 pairs — so `--base <trace>` was a no-op (reported `0 from the traces`, byte-identical output), and a `--dump-routing` trace could never order the VRAM tier that `--expert-cache auto` fills from the profile. Add `--reorder`: rank the trace's pairs first (most frequent first), let the base fill the rest, then the fill. The default is unchanged; `--no-base` is unchanged. The ranking moves into `rank_profile()` so it can be tested without a model. - `tools/make_profile.py`: `rank_profile()`, the `--reorder` flag, docstring - `tools/test_make_profile.py`: 7 unittest cases — the no-op, `--reorder`, `--no-base`, the frequency/tie order, `--reorder` with no traces, and an end-to-end run over a complete base ``` $ python -m unittest tools.test_make_profile Ran 7 tests in 0.002s OK ``` On this host's coding trace against the shipped profile the same command now reports `5808 from the traces` and reorders the top; without `--reorder` the output is still byte-identical to `data/expert-profile.bin`. Relevant to the profile-seeding workflow behind #477 (`--expert-profile-save` now persists what the adaptive tier learns; this is the offline/one-shot counterpart for a known workload).
No site
Links install, modelos, releases.