fix(calibration): tolerate a symfluence without get_calibration_slice (0.2.4) - #8
Merged
Merged
Conversation
… (0.2.4) This package calls InMemoryModelWorker.get_calibration_slice(), which landed in symfluence after the 0.9.2 currently on PyPI. The call sites sit inside the except Exception in compute_gradient / evaluate_with_gradient, so on a released symfluence the AttributeError would be swallowed: no crash, no traceback, and the loss would quietly stop being restricted to the calibration period — reintroducing exactly the leakage this package was just fixed for. Add _calibration_slice(worker): use the shared implementation whenever the core provides it, otherwise compute the window locally. That decouples publishing this fix from cutting a symfluence release, and keeps users pinned to an older core correct rather than silently wrong. Verified the two paths return an identical slice, and that an unset, malformed or non-overlapping period yields None rather than "score everything". Bumps version to 0.2.4. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
DarriEy
force-pushed
the
release/calibration-window-fallback
branch
from
July 28, 2026 21:38
d24576a to
4eabc8d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This package calls
InMemoryModelWorker.get_calibration_slice(), added to symfluence after the 0.9.2 currently on PyPI.The call sites live inside the
except Exceptionincompute_gradient/evaluate_with_gradient. So against a released symfluence theAttributeErroris swallowed — no crash, no traceback — and the differentiable loss quietly stops being restricted to the calibration period. That is precisely the evaluation-period leakage this package was just fixed for, reintroduced silently by a version mismatch.Publishing the fix without this would therefore ship a package that appears to work and does not.
What
_calibration_slice(worker): use the shared implementation whenever the core provides it, otherwise compute the window locally.This decouples releasing this fix from cutting a symfluence release, and keeps users pinned to an older core correct rather than silently wrong. Once a symfluence carrying the shared helper is on PyPI the fallback becomes dead code and can be dropped.
Verification
New
tests/test_calibration_slice_fallback.py(7 tests):Nonerather than degrading to "score everything"Checked across all seven model packages: both paths return an identical slice.
Bumps version to 0.2.4.
Related
Follows the calibration-window fixes merged in symfluence-org/SYMFLUENCE#392 and #393 and the seven model-package PRs.
🤖 Generated with Claude Code