peal.preflight¶
Check whether a run config could run, without starting it.
Starting a PEAL run costs anywhere from minutes to a day, and several failure
modes only surface late: a config that does not parse, a student or generator
that is not on this machine, an output directory that would be moved aside
because overwrite is on. This module answers those questions in under a
second so a reproduction script, or CI, can refuse to start instead.
Use it from the command line via preflight.py in the repository root, or
programmatically:
from peal.preflight import check_config, check_script
problems, notes = check_config("configs/.../square1000x098_sce_cfkd.yaml")
Module attributes
config keys whose value is a path to something that must already exist |
|
sub-keys carrying a path when one of the INPUT_KEYS holds an inline block rather than a path, as in |
|
keys naming a directory the run writes, which therefore need not exist yet |
|
an adaptor names the checkpoint it corrects (a file that must exist), a predictor names the directory it will train into. |
|
file extensions that count as loadable weights for a generator or a sparse dictionary. |
|
absolute-path prefixes that are personal by convention (another user's home directory is detected separately in |
Functions
Return (problems, notes) for one config. |
|
Run check_config over every config a script references, in script order. |
|
Check the files a script runs, not the configs it passes. |
|
Every --config argument a reproduction script passes, in order. |
|
Resolve the placeholders PEAL configs use. |
|
True if a config path lives in another user's home directory or a scratch space, unless it sits under |
|
The artefact paths running this config would create. |
|
Absolute path of the repository root (the parent of the |
|
Every |