Unit overhaul 5/6: Redesign FitBinding around FitTargets#226
Open
henrikjacobsenfys wants to merge 1 commit into
Open
Unit overhaul 5/6: Redesign FitBinding around FitTargets#226henrikjacobsenfys wants to merge 1 commit into
henrikjacobsenfys wants to merge 1 commit into
Conversation
This was referenced Jul 6, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## split/02c-unit-rename #226 +/- ##
=========================================================
+ Coverage 97.99% 98.28% +0.28%
=========================================================
Files 53 53
Lines 3892 3897 +5
Branches 664 660 -4
=========================================================
+ Hits 3814 3830 +16
+ Misses 48 39 -9
+ Partials 30 28 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
b220e65 to
dec68e6
Compare
928927a to
115f419
Compare
Replace FitBinding's parameter_name/modes API with a single `targets` spec that maps a model's declared predictions (its get_fit_targets) onto dataset keys, and update ParameterAnalysis to consume the resolved FitTargets. Component models fit their single evaluate prediction; diffusion models select named predictions with optional key overrides. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
dec68e6 to
879cc94
Compare
115f419 to
508ba38
Compare
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.
Replace FitBinding's
parameter_name/modesAPI with a singletargetsspec that maps a model's declared predictions (itsget_fit_targets()) onto keys of the parameters Dataset, and updateParameterAnalysisto consume the resolvedFitTargets. Component models fit their singleevaluateprediction; diffusion models select named predictions (area/width, plusdelta_areafor DeltaLorentz) with optional dataset-key overrides.Split out of the unit-system overhaul as an independent, self-contained change. Builds on
FitTarget(#221) and theget_fit_targets()model API added in the core rename (#224).Also advances the tutorial notebooks to the new
FitBinding(targets=…)API (tutorial0_basics,tutorial0_more_advanced,tutorial1_brownian); they run green undertutorial-testson this branch.All unit tests pass.
Stack — splitting the monolithic "Unit system overhaul" (#217) into a reviewable series. Merge bottom-up:
develop(Unit overhaul 1/6: Add unit-conversion utilities and FitTarget #221)verify_Q_index→split/01-unit-utils(Unit overhaul 2/6: Centralize Q-index validation via verify_Q_index #222)Variablein 1/angstrom →split/02a-verify-q-index(Unit overhaul 3/6: Store Q as a scipp Variable in 1/angstrom #223)unitintox_unit/y_unit+ tutorials →split/02b-q-variable(Unit overhaul 4/6: Separate unit into x_unit/y_unit and update tutorials #224)split/02c-unit-rename(Unit overhaul 5/6: Redesign FitBinding around FitTargets #226)split/02d-fit-binding(Unit overhaul 6/6: ExpressionComponent physical constants and parameter units #227)🤖 Generated with Claude Code