Repository navigation
Add budgeted local search for expensive, asynchronous evaluations - #2
Merged
Merged
Conversation
- AsyncOptimizationProblem: evaluate returns a future, scores only need Clone, is_improvement decides acceptance (for noisy scores) - budgeted_local_search: first-improvement local search with a budget of evaluations, a cache of evaluated states and a seeded neighbor order - shared crate-internal LcgRng in core::rng - declare rust-version 1.88 (let chains in branch_and_bound)
casoon
added a commit
to casoon/typedlm
that referenced
this pull request
Oct 2, 2026
- optimize_few_shot (feature optimize): chooses k demonstrations from a pool by budgeted local search on a validation set; result as CompiledProgram with provenance, baseline and best reports, paired comparison and trials - candidates from complete labels or a teacher program's correct answers - pathwise as git dependency on casoon/pathwise#2 until it is released - MSRV checks split: 1.85 without optimize, 1.88 with it (pathwise)
Merged
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.
Adds an optimizer for problems whose evaluation is expensive, asynchronous and noisy — e.g. tuning a language-model program against a dataset (used by TypedLM's few-shot optimizer).
AsyncOptimizationProblem:evaluatereturns a future, the score only needsClone, andis_improvementdecides acceptance, so a noisy score can carry per-sample results for a statistical test.budgeted_local_search: first-improvement local search with a budget of evaluations, a cache of evaluated states and a seeded neighbor order. Runtime-agnostic, no new dependencies; parallelism belongs insideevaluate.LcgRngmoved to a crate-internalcore::rngand shared with simulated annealing (no behaviour change).rust-version = "1.88":branch_and_bounduses let chains, so builds below 1.88 already failed.Checked locally:
cargo fmt --check,cargo build --all-targets,cargo test --all-targets,cargo clippy --all-targets -- -D warnings,cargo doc --no-depswith-D warnings, andcargo +1.88.0 check --all-targets.