Skip to content

Performance blocker: make every canonical estimator operation beat sklearn/Python #478

Description

@godofecht

Goal

The canonical flow-scikit benchmark should have zero supported estimator operations materially slower than sklearn/Python on the same machine and numerical backend.

Current canonical-v2 evidence has moved beyond the older SVC.predict ~0.67x claim. #481 records current KernelSVC prediction as faster than sklearn on both Iris and Digits and explicitly identifies the older architecture-map inference claim as stale. Do not treat SVC prediction as the first blocker unless a fresh local operation-level run reproduces a loss.

The current concrete losses are tracked by focused children, including LinearSVC fit (#479), KernelSVC fit (#480), DecisionTree Digits (#482), RandomForest Digits fit (#483), GaussianNB Digits predict (#484), KMeans Digits fit (#485), Lasso fit (#486), and KernelRidge fit/predict (#487/#488). Artifact/provenance drift is tracked in #493.

Required work

  1. Re-run the canonical suite with current main, pinned BLAS thread counts and the five-repeat measurement protocol.
  2. Classify every loss by substrate: Python/control overhead, allocation/copy, scalar loop, BLAS/LAPACK dispatch, algorithmic mismatch, cache/layout, or measurement noise.
  3. Fix losses one operation at a time, preserving sklearn-equivalent semantics and existing parity tolerances.
  4. Add scaled workloads for every canonical row so wins are not artifacts of fixed interpreter/import overhead.
  5. Track fit/predict/transform/predict_proba separately; no estimator-level average may hide a slow operation.
  6. Add peak RSS/allocation evidence for representative fits and inference paths.

Current priority

Use operation-level evidence, not stale estimator-level summaries. Before optimizing a row, confirm the current local result and provenance. When a previously losing operation becomes a win, update generated architecture/performance artifacts through #493 instead of carrying the obsolete classification forward.

For KernelSVC specifically, keep fit and predict separate: #480 owns training efficiency; #481 owns prediction-only scaled verification and stale-artifact cleanup.

Exit criteria

  • zero canonical supported rows below 0.95x Python after noise filtering;
  • target state: every row >= 1.05x Flow win;
  • ties must have a filed optimization hypothesis rather than being silently counted as wins;
  • machine-readable report lists wins/ties/losses by operation and workload size;
  • benchmark documentation explains why Flow wins each class rather than only publishing ratios.

Parent programme: flooooooooooow/flow#727.

Validation and benchmark qualification are local-only. Do not add, enable, trigger, inspect, wait for, or rely on GitHub Actions or other hosted CI/workflows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions