mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2312] [CLOSED] [Engine] keep configured vision resident during calibration #3977
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3977
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2312
Author: @Tsury
Created: 10/13/2026
Status: ❌ Closed
Base:
main← Head:fix/calibrate-vision-2301📝 Commits (1)
f07b6d6fix(calibrate): retain configured vision during tuning📊 Changes
2 files changed (+125 additions, -16 deletions)
View changed files
📝
tools/calibrate.py(+29 -16)📝
tools/test_calibrate.py(+96 -0)📄 Description
Problem and result
With a configured nonelastic vision encoder, calibration starts the engine without that encoder. Automatic expert-cache sizing therefore measures different memory availability from normal serving. Keep the encoder resident before the first engine start and through every calibration restart, then release it and its log on success or failure.
Related discussion
Fixes #2301. This refresh follows the tracker reset instructions in https://github.com/Niko1221/Strata/pull/2312#issuecomment-6272941081 and reuses this PR and branch.
Approach
Use the existing
Vision, serving path normalization, andvision_envwith oneExitStackfor cleanup. Text-only configurations and caller-supplied engine factories keep their existing lifetime behavior. The rebase preserves current main's per-engine environment overrides, progress/cancellation parameters, long-prompt measurement, HIP handling, prompts, sweeps, thresholds, and selection logic.Validation
Tested revision:
a50a46f603aa7e0784ada9e3c4bb691a79228fd2, based on current main9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4(Strata 0.2.1 / source engine 0.1.46.3). Environment: Linux x86_64, Python 3.14.4; pure tests with stand-in encoders/engines.Passed:
python3 tools/test_calibrate.py: 36 tests pass. The 30 existing main tests passed before applying the fix. The six retained vision-lifetime cases cover GPU/CPU encoder lifetime across restarts, relative paths and environments, engine/measurement failures, encoder-start failure and log closure, and text/custom-factory behavior.git diff --check HEAD^ HEAD: passes.Failed:
python3 tools/test_setup_calibrate.pycheck could not run because that file does not exist. Setup integration cases are part of the passingtools/test_calibrate.pysuite.Not run:
Limits
This refresh covers the maintained nonelastic vision path. The elastic-vision parity case reported in https://github.com/Niko1221/Strata/pull/2312#issuecomment-6184304034 remains outside this refresh and unverified. No elastic scheduling policy, calibration setting, or default is changed. Pure lifetime tests establish control flow and cleanup, not GPU sizing or speed on other platforms.
AI assistance: Codex helped rebase the focused fix, run the checks, and prepare this description.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.