Repository navigation
feat(metrics): the size of each trial, in Trial, Progress::Trial and everywhere a trial is reported - #59
Merged
Conversation
…everywhere a trial is reported The search holds the encoded bytes of every trial when it scores them, and reported only quality and score, so a page drawing the search could plot nothing against size. `Trial` gains `size`, filled by the search; `Search::run` takes a closure returning `Scored`, with the output, the score and the size, in place of the pair. `Progress::Trial` carries it, each entry of `trials` in `--json` carries it, `-v` and the progress line print it, and the npm package has it on `Trial` and on what `onTrial` receives. Closes #55 Co-Authored-By: Claude Fable 5.1 <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.
Closes #55, with a plain
sizeon the RustTrial: the search is the one place that holds the bytes of a trial that did not win, so the number is made where it is known and carried out from there.Search::runis generic over the output, so it cannot measure the output itself. Its closure now returnsScored { output, score, size }in place of(output, score); the tests over pure curves hand it a size that follows the quality and check it comes back on every trial. That and the new fields are the breaking entries in the changelog, undermetricsandsqzer. Every other check is against the file written: in the facade, the CLI and the package tests, the trial at the chosen quality has the size of the output bytes.Checked locally:
cargo test -p sqzer-metrics -p sqzer -p sqzer-cli,cargo clippy --workspace --all-targets --all-features,cargo docwith warnings denied,cargo deny check, andwasm-pack test --node, 16 tests.The page bumps its version after the release, as the issue says; nothing in
ROADMAP.mdlists it, so there is no line to remove there.🤖 Generated with Claude Code