DOC Add scorer composition diagram#2238
Open
romanlutz wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e451626a-e8bd-49a8-9b71-8598fbbe4ea6
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves the scoring documentation by adding a Mermaid diagram that clarifies runtime composition/stacking paths for scorer wrappers (as distinct from the inheritance hierarchy), making it easier for users to understand which scorer kinds can be wrapped/combined and what kind results.
Changes:
- Added a Mermaid flowchart explaining supported scorer-wrapper composition, including accepted input kinds and resulting scorer kinds.
- Expanded the surrounding narrative to explicitly describe supported stacking sequences (e.g., float-scale → conversation → threshold → inversion) and invalid generic
Scorerusage outside the true/false and float-scale bases.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| doc/code/scoring/3_combining_scorers.py | Adds a synced markdown cell containing the new Mermaid composition diagram and explanatory text for scorer stacking. |
| doc/code/scoring/3_combining_scorers.ipynb | Updates the corresponding notebook markdown cell to match the new diagram and explanatory text. |
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.
Description
Scorer wrappers can be stacked in several ways, but the existing documentation explains each wrapper separately and does not make the supported composition paths clear. This adds a Mermaid diagram that distinguishes runtime composition from inheritance and shows the exact accepted and resulting scorer kinds.
Solid arrows represent values passed through
scorer=orscorers=. Dashed arrows represent the scorer base implemented by each result. The surrounding text calls out supported stacking, including float-scale to conversation to threshold to inversion, and rejects genericScorertypes outside the true/false and float-scale bases.Tests and Documentation
doc/code/scoring/3_combining_scorers.pyand its paired notebook synchronized with a strict Jupytext round-trip comparison.