Skip to content

Fix all open issues: #69, #70, #71 - #72

Merged
dantzert merged 1 commit into
mainfrom
kilo/super-meadow-ll2
Sep 8, 2026
Merged

dantzert merged 1 commit into
mainfrom
kilo/super-meadow-ll2

Conversation

@dantzert

@dantzert dantzert commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes all three open issues and makes the CI green.

Issue #69 — UnderdampedOscillatorKernel overflow for zeta >= 1

  • modpods/kernels.py: Replaced the unstable sinh(s*t) formulation in the overdamped branch with a stable difference-of-exponentials form. For zeta > 1 both exponents are negative, so no overflow occurs. The limiting case zeta -> 1 is also handled correctly.

Issue #71 — metrics.py crashes on zero predictions due to log10(0)

  • modpods/metrics.py: Refactored compute_detailed_metrics to use a _log10_sorted helper that clips sorted values to a small positive floor (1e-12) before np.log10. The FDC denominator is also guarded against zero. Zero/negative predictions no longer produce -inf/NaN metrics.

Issue #70 — lti_system_gen is extraordinarily slow for realistic problems

  • modpods/train.py: Exposed the Bayesian optimization budget (n_calls, n_initial_points) as overrideable optimizer kwargs, so users can trade accuracy for speed.
  • modpods/train.py: Added a fast_mode flag to SingleKernelTrainer, MultiKernelTrainer, and delay_io_train that:
    • Uses a cheaper optimizer budget (max_iter // 10, popsize 5)
    • Caps max_transforms at 2 (sufficient for most physical systems)
    • Switches to differential_evolution instead of Bayesian optimization
  • modpods/lti.py / modpods/estimator.py: Added fast_mode and optimizer_kwargs parameters to lti_system_gen, LTISystem, and DelayIO for consistency.
  • modpods/train.py: Fixed pre-existing mypy errors on differential_evolution calls.

Verification

- Issue #69: Replace unstable sinh with stable difference-of-exponentials in UnderdampedOscillatorKernel for zeta >= 1
- Issue #71: Guard log10(0) in compute_detailed_metrics with a small positive floor
- Issue #70: Expose Bayesian optimization budget (n_calls, n_initial_points) and add fast_mode flag to speed up lti_system_gen

All 69 tests pass; black, ruff, codespell, and mypy all clean.

Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
@dantzert
dantzert merged commit 21d1690 into main Sep 8, 2026
2 checks passed
@dantzert
dantzert deleted the kilo/super-meadow-ll2 branch September 8, 2026 00:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant