Skip to content

v0.8.8 — Tuning Engine Split & Import Hygiene

Choose a tag to compare

@github-actions github-actions released this 30 Aug 13:17
· 59 commits to master since this release
93d7719

📦 Release

  • Version sync to 0.8.8 (app + frontend + core): root pyproject.toml,
    frontend/ml-canvas/package.json / package-lock.json, and
    skyulf-core/setup.py bumped to 0.8.8.

🧠 Core — F-18: _tuning/engine.py split (finding closed)

  • The 1,830-line skyulf/modeling/_tuning/engine.py (largest file in the
    library) is now a ~700-line orchestrator plus six leaf modules:
    params.py (search-space cleaning, param splitting, model instantiation,
    seed overlays), splitters.py (CV splitter builder family), metrics.py
    (metric validation/aliases, resolve_metric/resolve_scorer with
    pos_label pinning), grid_random.py (candidate generation + per-fold
    scoring), refit.py (best-model refit + decision-threshold tuning), and a
    strategies/ package (halving.py, optuna.py with the F-14 lazy
    loader, runner.py).
  • Pure code movement — the public TuningCalculator/TuningApplier surface
    is untouched, test-pinned private methods remain as one-line delegates,
    and stale test pins were retargeted to the new modules with the same
    coverage.

🧹 Core — F-11: import cycles & deferred imports (finding closed)

  • One real import cycle broken (modeling/base → _evaluation → sklearn_wrapper → base): the four _evaluation modules now import
    SklearnBridge from the leaf engines.sklearn_bridge, so base.py
    imports its evaluation/cross-validation dependencies at module level.
  • 173 function-level imports eliminated (ruff PLC0415): 144 hoisted to
    module level (internal, stdlib, hard dependencies incl. all 93 deferred
    polars imports), 29 genuinely optional extras (matplotlib, rich, shap,
    optuna, imblearn, sentence_transformers, vaderSentiment, causallearn, h3,
    scatter_matrix) kept deferred with documented per-site
    # noqa: PLC0415 - <reason> waivers.
  • Enforcement: PLC0415 is now in the ruff select set for
    skyulf-core/skyulf/ (backend/tests/entry points exempt), with the ruff
    pin bumped to >=0.15,<1.0 to match the pre-commit hook.
  • Monkeypatch-safe: third-party calls patched by tests keep
    module-attribute form (sklearn_metrics.*, scipy_stats.*,
    stattools.adfuller); degradation gates (SKLEARN_AVAILABLE etc.)
    untouched. Failures now surface at import time, and the real module graph
    is visible for the upcoming F-09/F-08 structural work.

🧾 Housekeeping

  • Findings tracker: with F-18 + F-11 closed, 3 findings remain open
    (F-30 deferred pending a compat call; structural F-09/F-08).
  • README refresh.