activitysim icon indicating copy to clipboard operation
activitysim copied to clipboard

Validate all input files for all components before running anything

Open jpn-- opened this issue 1 year ago • 1 comments
trafficstars

Currently, ActivitySim loads component inputs "on demand". For example, the settings file for trip mode choice is not read in until it is needed. If there is a problem with this file, it won't be discovered until it is used, which could be a long time after a model run is started.

Describe the solution you'd like We should load and validate all input files at the beginning of a model run, so users can be alerted to problems promptly. This would require that users actually have correctly configured inputs for an entire model run before it is started, and could not, e.g. start a run knowing it will fail at component 9, but intending to collect and evaluate outputs that are generated before that. As a work around, if the user knows a fail will occur at component 9, they could just disable that component (and all later steps).

This validation consists of potentially several steps, not all need to be implemented simultaneously:

  • [ ] Validate the syntax and content of YAML config files with pydantic, to ensure they are correct
  • [ ] Validate that all named coefficients in any SPEC files are defined in a coefficients file
  • [ ] Validate that all expressions in any SPEC files will run with the data

jpn-- avatar Jan 29 '24 20:01 jpn--

Strictly validate the spec files for syntax only -- not data.

Load Yamls all at the start once at the beginning.

Resolve coefficients in the spec files.

dhensle avatar Nov 12 '24 19:11 dhensle