Repository navigation
Skip unused fit prep by default, including the ignition and escape prep - #111
Merged
Merged
Conversation
…dger fit Under skipUnusedFitPrep, prepIgnitionFitData, prepEscapeFitData (and then prepSpreadFitFireData) follow fireSense_ignitionFit's own doFit, via fitPrepNeeded(sim, module). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgg187sAPQZwQT3Mf4
… params are absent Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgg187sAPQZwQT3Mf4
…no fit data Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXgg187sAPQZwQT3Mf4
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.
A run that does not fit no longer prepares fit data: the ignition and escape prep (about 14 minutes, including a lightning download) is now skipped like the spread covariates, and skipping is now the default.
Affects:
skipUnusedFitPrepnow defaults to TRUE, so by default a run withdoFit = FALSEprepares neither spread nor ignition fit data;doFitTRUE or NA, validation, profiling and held-out folds are unchanged, andskipUnusedFitPrep = FALSErestores the old behaviour.Pairs with the fireSense_ignitionFit and fireSense_dataPrepPredict PRs (ignitionFit no longer needs the ignition covariates when reusing a ledger fit; dataPrepPredict builds
lightningMapsandignitionFitRTMitself). It calls nothing new from fireSenseUtils#246, but with the new default it must merge after those two PRs and the matching fireSense_spreadFit default change (PredictiveEcology/fireSense_spreadFit#136).Technical details
Defect:
prepEventsToSchedule()(fireSense_dataPrepFit.R, ~1569) always scheduledprepIgnitionFitDataandprepEscapeFitDatawhen ignitionFit was prepared; only the spread covariates followedfitPrepNeeded().Fix:
fitPrepNeeded(sim, module = "fireSense_spreadFit")takes a module. For"fireSense_ignitionFit"it usesfitDataNeeded(resolveDoFit(doFit, refitExisting))from that module's params (unset: NA, its default).heldOutFoldandmodeare spread-fit settings (ignitionFit has noheldOutFold), so they are not passed.prepEventsToSchedule(which, fitPrep, ignitionPrep)leaves out the ignition/escape events, andprepSpreadFitFireData, whenignitionPrepis FALSE.prepSpreadFitFireDataonly feeds the ignition/escape prep when the spread covariates are skipped; the spread fit's ownspreadFirePolys/escapeFireSetconsumers read them only when it fits, and in that caseprepSpreadFitDataruns. Parameter text, roxygen and NEWS updated.Predict-side objects:
ignitionFirePointsis made in.inputObjectsand clipped ininit;nonEscapedFireSizesHais made inInit()from it. Neither needs the skipped events, so dataPrepPredict and summary still get them. One difference:ignitionFirePointsstays the input points (noescapedcolumn, buffer-start points not dropped);prepIgnitionFitDataused to replace it with the core points. fireSense_summary passes it tohindcastObserved()with its own core raster.Reuses:
fireSenseUtils::fitDataNeeded,fireSenseUtils::resolveDoFit,SpaDES.core::paramCheckOtherMods(via the existingfitPrepNeeded, generalised in place); new: none.Tests:
test-skipUnusedFitPrep.Rextended (ignitionFitdoFitFALSE/TRUE/NA, unset,refitExisting,heldOutFold, spreadmode,skipUnusedFitPrepFALSE). Full suiteconvertToPackage+test_local: base 549 pass, 1 skip, 0 fail; branch 559 pass, 1 skip, 0 fail. The new test file on base: 5 errors.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXgg187sAPQZwQT3Mf4