Repository navigation
feat(fit): progress logging + skip_candidates knob - #1
Merged
Merged
Conversation
tracer.fit() previously produced no output during potentially-long candidate sweeps and pipeline-family construction. On multi-class high-dim embedding inputs (e.g. 22-class × 1024-dim BGE-M3) a single stuck candidate (GradientBoosting) silently stretched a sweep from ~13s to ~20 minutes with no signal at all. This wires up default per-candidate + per-stage progress to stderr and exposes a configuration knob to drop known-slow candidates without monkey-patching. Changes - FitConfig.verbose: bool = True — gates a default stderr logger - FitConfig.skip_candidates: tuple[str, ...] = () — drop candidates by name - surrogate._candidates(n, skip=()) — new parameter - surrogate.search_best_surrogate now accepts skip= and tolerates both the legacy on_candidate(name, f1) signature and a new 3-arg variant on_candidate(name, f1, elapsed_seconds). Callback exceptions are warned and swallowed so a buggy logger can't abort a fit. - fit.pipeline.build_global / build_l2d / build_rsb / _build_accepting_stage / fit_frontier all accept log= and skip=, emit stage-start and stage-end heartbeats, and forward skip= to the surrogate sweep. - api.fit constructs the default stderr logger when verbose=True and threads log/skip through to fit_frontier. - CLI demo's monkey-patched _candidates / search_best_surrogate are updated to accept the new parameters transparently. Tests (tests/test_fit.py) - callback invoked once per candidate under both legacy and extended signatures - raising callback does not derail the sweep; warning is emitted - skip_candidates removes named models from the factory - verbose=True emits [tracer.fit +Xs] heartbeats to stderr - verbose=False remains silent All 21 tests pass locally. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
tracer.fit() previously produced no output during potentially-long candidate sweeps and pipeline-family construction. On multi-class high-dim embedding inputs (e.g. 22-class × 1024-dim BGE-M3) a single stuck candidate (GradientBoosting) silently stretched a sweep from ~13s to ~20 minutes with no signal at all.
This wires up default per-candidate + per-stage progress to stderr and exposes a configuration knob to drop known-slow candidates without monkey-patching.
Changes
Tests (tests/test_fit.py)
All 21 tests pass locally.