g3_fit: Split up model-running and fit generation#43
Merged
willbutler42 merged 2 commits intomainfrom Aug 7, 2025
Merged
Conversation
It's been a long while since this was necessary, as the reporint output just includes it.
Break out the bulk of g3_fit() into g3_fit_inner(), which just generates the fit report from report output. More immediately, this helps with testing: g3_fit_inner() can now, given a stored heap of arrays, compare the fit output to a baseline. A model doesn't need to be constructed to test a scenario. Long-term, the compartmentalisation helps the long-term goal of breaking up g3_fit into discrete chunks, so we don't have to run the full g3_fit output. Being separate functions means dependencies don't sneak back in.
Collaborator
|
Looks good, thanks. |
Open
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.
This splits off the model-running from the report generation in g3_fit(). This shouldn't really alter anything immediately, I mostly wanted to know if it was possible.
Given it seems to be, then it'd be worth keeping so it stays that way. This means we can do things like:
g3_fit_inner()into smaller chunks to ensure nothing gets broken.g3_fit()on the output afterwards. Ultimately being able to choose the output you want by invoking bits ofg3_fit().