Skip to content

Skip unused fit prep by default, including the ignition and escape prep - #111

Merged
eliotmcintire merged 3 commits into
developmentfrom
feat/skip-unused-ignition-prep
Nov 18, 2026
Merged

eliotmcintire merged 3 commits into
developmentfrom
feat/skip-unused-ignition-prep

Conversation

@eliotmcintire

@eliotmcintire eliotmcintire commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

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: skipUnusedFitPrep now defaults to TRUE, so by default a run with doFit = FALSE prepares neither spread nor ignition fit data; doFit TRUE or NA, validation, profiling and held-out folds are unchanged, and skipUnusedFitPrep = FALSE restores 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 lightningMaps and ignitionFitRTM itself). 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 scheduled prepIgnitionFitData and prepEscapeFitData when ignitionFit was prepared; only the spread covariates followed fitPrepNeeded().

Fix: fitPrepNeeded(sim, module = "fireSense_spreadFit") takes a module. For "fireSense_ignitionFit" it uses fitDataNeeded(resolveDoFit(doFit, refitExisting)) from that module's params (unset: NA, its default). heldOutFold and mode are spread-fit settings (ignitionFit has no heldOutFold), so they are not passed. prepEventsToSchedule(which, fitPrep, ignitionPrep) leaves out the ignition/escape events, and prepSpreadFitFireData, when ignitionPrep is FALSE. prepSpreadFitFireData only feeds the ignition/escape prep when the spread covariates are skipped; the spread fit's own spreadFirePolys/escapeFireSet consumers read them only when it fits, and in that case prepSpreadFitData runs. Parameter text, roxygen and NEWS updated.

Predict-side objects: ignitionFirePoints is made in .inputObjects and clipped in init; nonEscapedFireSizesHa is made in Init() from it. Neither needs the skipped events, so dataPrepPredict and summary still get them. One difference: ignitionFirePoints stays the input points (no escaped column, buffer-start points not dropped); prepIgnitionFitData used to replace it with the core points. fireSense_summary passes it to hindcastObserved() with its own core raster.

Reuses: fireSenseUtils::fitDataNeeded, fireSenseUtils::resolveDoFit, SpaDES.core::paramCheckOtherMods (via the existing fitPrepNeeded, generalised in place); new: none.

Tests: test-skipUnusedFitPrep.R extended (ignitionFit doFit FALSE/TRUE/NA, unset, refitExisting, heldOutFold, spread mode, skipUnusedFitPrep FALSE). Full suite convertToPackage + 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

…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
@eliotmcintire eliotmcintire added enhancement New feature or request backwards compatible Existing code and results keep working unchanged labels Nov 17, 2026
eliotmcintire and others added 2 commits November 17, 2026 16:32
… 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
@eliotmcintire eliotmcintire changed the title Skip the ignition and escape prep when ignitionFit only reuses its ledger fit Skip unused fit prep by default, including the ignition and escape prep Nov 18, 2026
@eliotmcintire
eliotmcintire merged commit 1f42f34 into development Nov 18, 2026
9 checks passed
@eliotmcintire
eliotmcintire deleted the feat/skip-unused-ignition-prep branch November 18, 2026 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backwards compatible Existing code and results keep working unchanged enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant