Repository navigation
saveFitTables: write the ignition and escape fit tables to disk - #119
Merged
Merged
Conversation
…(sim) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
eliotmcintire
added a commit
that referenced
this pull request
Nov 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh
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 can now save the exact ignition and escape tables its fits are trained on. Analyses outside the fit, such as spatial random effects, can then read them. Until now the tables lived only in the event cache.
Affects: nothing by default. With
saveFitTablesset, a run also writes one file per table to its output folder.Technical details
Defect:
prepIgnitionFitDataandprepEscapeFitData(fireSense_dataPrepFit.R,prepare_IgnitionFit,prepare_EscapeFit) leavefireSense_ignitionCovariatesandfireSense_escapeCovariatesonly in the simList and the event cache; nothing writes them.Fix: new parameter
saveFitTables(character, defaultcharacter(0);"ignition","escape"). A new eventsaveFitTables(R/saveFitTables.R, scheduled at priority 2 after the prep events at priority 1) writes<table>_<ELF>.qs2tooutputPath(sim)and registers each file. It only reads the tables from the simList, so a cache hit ofprepIgnitionFitDatastill writes them. Cache keys do not change: the parameter hascacheKey = FALSE, and the event is in.neverCache(default nowc("init", "saveFitTables")) because a cache hit would skip the write. A requested table the run did not build (skipUnusedFitPrep) gives a message, not an error.Reuses:
SpaDES.core::registerOutputs(),SpaDES.core::outputPath(),defineParameter(cacheKey = FALSE),.neverCache,qs2(already inreqdPkgs), thescheduleEventpattern ofinit; new:saveFitTables()andsaveFitTablesEvents()(nothing in the module writes fit tables or registers outputs).Tests: new
test-saveFitTables.R(19 expectations: files appear and round-trip equal to the simList table, default writes nothing, only requested tables, tables unchanged, missing table skipped, unknown name refused, event never cached and scheduled after prep).test-metadata.Randtest-neverCache.Rlist the new parameter and default. New test file on base: 4 failures, 5 errors, 1 pass (function absent). Full suite (convertToPackage()+test_local(), scratch library, BLAS/OMP threads 1): branch 0 failures, 0 errors, 677 pass, 1 skip; base 0 failures, 0 errors, 656 pass, 1 skip.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lx3DXhXsFis2pbqBTh2PPh