Skip to content

Commit

Permalink
add docstring for template_setup_cache
Browse files Browse the repository at this point in the history
  • Loading branch information
jpn-- committed Mar 31, 2022
1 parent 8ef72ce commit 1a93cd3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions activitysim/benchmarking/componentwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,22 @@ def template_setup_cache(
config_overload_dir="dynamic_configs",
):
"""
Prepare an example model for benchmarking.
The algorithm for benchmarking components requires an existing pipeline
file with checkpoints after every component, which allows the code to
recreate the state of pipeline tables immediately prior to each component's
execution. The checkpoints file is very large, and can be recreated
by running the model, so it is not stored/downloaded but just rebuilt as
needed.
This template function creates that pipeline store if it does not exist by
getting the example model and running once through from the beginning through
the last component to be benchmarked. After this is done, a token is written
out to `benchmark-setup-token.txt` in the output directory, flagging that
the complete checkpointed pipeline has been created without errors and is
ready to use. If the template setup finds this token file, all this work
is assumed to be already done and is skipped.
Parameters
----------
Expand Down

0 comments on commit 1a93cd3

Please sign in to comment.