Skip to content

Restart pool - #71

Draft
AdrienLeGuillou wants to merge 10 commits into
mainfrom
restart_pool
Draft

AdrienLeGuillou wants to merge 10 commits into
mainfrom
restart_pool

Conversation

@AdrienLeGuillou

Copy link
Copy Markdown
Member

Utilities to works with a restart pool.
The pool is a directory containing individual simulations

AdrienLeGuillou and others added 7 commits October 5, 2026 15:50
- netsim_run_one_scenario now runs batches with netsim_path_wrapper (pool
  directory or single file); netsim_run_one_scenario_path is folded into it,
  so netsim_scenarios(), step_tmpl_netsim_scenarios() and the swfcalib
  output templates all accept restart pool directories
- merge batches with merge() (merge.netsim is not exported by EpiModel)
- honor a custom control$future.use.plan; per-simulation checkpoint dirs
- make_restart_pool: pool element i = row i of keep_sims, pool_index.csv
  provenance file, clear errors, removes a partial pool on failure
- add_to_restart_pool: recursive dir creation, empty dir, numbering check
- new exported validate_restart_pool() (checks kept out of the wrapper)
- roxygen docs and exports for make_restart_pool, netsim_path_wrapper and
  validate_restart_pool
- merge_netsim_scenarios(): pass keep.run, keep.cumulative.edgelist and
  keep.attr.history to merge.netsim (resolves the TODO)
- step_tmpl_merge_netsim_scenarios(): pass arguments by name (two swaps of
  keep.diss.stats / param.error cancelled out)
- tests/testthat/test-restart_pool.R; version 2.10.0, NEWS

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Completes 0e918a3, which removed the numbering check of
add_to_restart_pool and the parameter and time step checks of
validate_restart_pool but left the file unparsable:
- add_to_restart_pool counts the existing pool files again
- validate_restart_pool closes its loop and builds the per-element table
  (pool_num, file_path, n_runs, nsteps; no more same_param)
- docs, NEWS and tests no longer describe or expect the removed checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The files were listed alphabetically (batch 10 before batch 2), so
merge_netsim_scenarios merged scenarios of 10+ batches out of order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The restart pools and batch merges use make_restart_point(sim_num = ),
the merge.netsim keep.* arguments and merges in sequence, all coming
with EpiModel 2.7.0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant