This section describes the behaviour of the engine at runtime and how it is influenced by elements of the manifest, combined with input provided by a client through the concept of option values.
This document only covers the general contract of accelerator rendering and does not cover the details of invocation and passing of options, nor does it cover the way the result of invocation may be delivered / retrieved.
For the specific case of invocation over http, please refer to endpoint specification. Other implementations may exist (for example, local invocation via a CLI) and the concepts listed here remain applicable.
At a high level, the invocation of a single accelerator is made up of the following phases: 1. Pre-validation: To the best extent possible, the contents of the accelerator files are parsed and understood by the engine. This means that errors in the configuration of the accelerator (i.e. errors in the contents of the
accelerator.yaml manifest) are reported early.
For a given state of the contents of a accelerator, that phase is cacheable (i.e. the same files produce the same outcome)
Model Population with Option Values: The model is initially populated with all the values provided for invocation. Clients MUST provide values for all options defined in the options specification section of the manifest which aren't configured with a
Model Population with Option Values Defaults: The options that are defined in the manifest with a
defaultValue and that haven't already been set are given their default value.
At this point, the populated model is validated against the accelerator manifest: 1. All passed-in options MUST have a valid
name 2. All known options MUST be present (ie the set of names declared must be a subset of the ones actually present) 3. All known options MUST be of a type that conforms to their declared
Failure to validate stops processing and results in an error being reported.
Addition of Standard Variables: The model is further populated with additional values which the engine always computes, including values that may depend on the contents of a pre-existing target directory.
The exact set of standard variables is out of scope of this specification, but the engine never overwrites a user provided option with a standard variable (i.e. authors can always provide the option to effectively override a standard variable).
Errors may happen while computing the value of a standard variable, in which case processing stops and an error is reported.