[PR #3759] [CLOSED] [TUI] fix auto-tuning budget handling and result reporting #4769

Closed
opened 2026-11-07 15:38:55 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/3759
Author: @enesunal
Created: 10/22/2026
Status: ❌ Closed

Base: main ← Head: main


📝 Commits (2)

  • 2a05be4 tuning: Fix budget decisions and confirmation reporting
  • 989b464 tuning: Wait for a measured run before estimating completion

📊 Changes

5 files changed (+141 additions, -14 deletions)

View changed files

📝 strata_cli/tune_commands.py (+4 -1)
📝 strata_control/autotune.py (+45 -13)
📝 strata_control/presets.py (+1 -0)
📝 tests/tuning/test_autotune.py (+79 -0)
📝 tests/tuning/test_presets.py (+12 -0)

📄 Description

Problem and result

A slow baseline could produce “time ran out” while budget remained and label deferred candidates as not worth trying. Per-request gains could also display contradictory results such as “+14%” alongside “51.5 → 51.5 tok/s”.

The tuner now distinguishes insufficient remaining budget from ineligible candidates, reports measured confirmation speeds, and waits for a completed measurement before showing an ETA.

None; focused bug fix.

Approach

Skip completed baseline work before budget checks, check the budget between tuning requests, and reject incomplete confirmation results. Preserve paired confirmation samples in saved presets.

Existing tuning objectives and defaults remain unchanged. No engine, dependency, or model-configuration changes.

Validation

Passed:

  • Fedora 44, Python 3.14.7, revision 989b464a:
    .venv/bin/python -B -m unittest tests.tuning.test_autotune tests.tuning.test_presets
    — Ran 64 tests ... OK.
  • git diff --check — clean.

Failed:

  • Before the fix, six new regression tests failed under .venv/bin/python -B -m unittest tests.tuning.test_autotune, reproducing the budget and reporting defects. All pass after the fix.

Not run:

  • Real calibration or inference; validation used synthetic engines and clocks.
  • CUDA/HIP/SYCL/Metal builds; changes are confined to Python tuning and reporting.

Limits

The time budget remains soft: an in-flight measurement may finish after it. Existing saved results are not rewritten. This fixes calibration behavior and reporting; it makes no inference-performance claim.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3759 **Author:** [@enesunal](https://github.com/enesunal) **Created:** 10/22/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`2a05be4`](https://github.com/Niko1221/Strata/commit/2a05be488bad5b86afaec0c8bcc2a16218a2652f) tuning: Fix budget decisions and confirmation reporting - [`989b464`](https://github.com/Niko1221/Strata/commit/989b464aea610225466d1d228638e351a6c9b21f) tuning: Wait for a measured run before estimating completion ### 📊 Changes **5 files changed** (+141 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `strata_cli/tune_commands.py` (+4 -1) 📝 `strata_control/autotune.py` (+45 -13) 📝 `strata_control/presets.py` (+1 -0) 📝 `tests/tuning/test_autotune.py` (+79 -0) 📝 `tests/tuning/test_presets.py` (+12 -0) </details> ### 📄 Description ## Problem and result A slow baseline could produce “time ran out” while budget remained and label deferred candidates as not worth trying. Per-request gains could also display contradictory results such as “+14%” alongside “51.5 → 51.5 tok/s”. The tuner now distinguishes insufficient remaining budget from ineligible candidates, reports measured confirmation speeds, and waits for a completed measurement before showing an ETA. ## Related discussion None; focused bug fix. ## Approach Skip completed baseline work before budget checks, check the budget between tuning requests, and reject incomplete confirmation results. Preserve paired confirmation samples in saved presets. Existing tuning objectives and defaults remain unchanged. No engine, dependency, or model-configuration changes. ## Validation Passed: - Fedora 44, Python 3.14.7, revision 989b464a: .venv/bin/python -B -m unittest tests.tuning.test_autotune tests.tuning.test_presets — Ran 64 tests ... OK. - git diff --check — clean. Failed: - Before the fix, six new regression tests failed under .venv/bin/python -B -m unittest tests.tuning.test_autotune, reproducing the budget and reporting defects. All pass after the fix. Not run: - Real calibration or inference; validation used synthetic engines and clocks. - CUDA/HIP/SYCL/Metal builds; changes are confined to Python tuning and reporting. ## Limits The time budget remains soft: an in-flight measurement may finish after it. Existing saved results are not rewritten. This fixes calibration behavior and reporting; it makes no inference-performance claim. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:38:55 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4769
No description provided.