titus.producer.chain.engine

titus.producer.chain.engine(pfas, name=None, randseed=None, doc=None, version=None, metadata={}, options={}, tryYaml=False, verbose=False, sharedState=None, multiplicity=1, style='pure', debug=False)[source]

Create a single PFA from a chained workflow, returning the result as an executable scoring engine.

Parameters:
  • pfas (list of titus.pfaast.EngineConfig, Pythonized JSON, or JSON strings) – PFA documents for which the output of document i is the input to document i + 1
  • check (bool) – test the chained PFA for validity
  • name (string or None) – optional name for the chained PFA
  • randseed (integer or None) – optional random number seed for the chained PFA
  • doc (string or None) – optional documentation string for the chained PFA
  • version (integer or None) – optional version number for the chained PFA
  • metadata (dict of strings) – metadata for the chained PFA (default is {})
  • options (dict of Pythonized JSON) – implementation options for the chained PFA (default is {})
  • tryYaml (bool) – if True, attempt to interpret pfas as YAML (assuming they fail as JSON)
  • verbose (bool) – if True, write status messages to standard output
  • sharedState (titus.genpy.SharedState) – external state for shared cells and pools to initialize from and modify; pass None to limit sharing to instances of a single PFA file
  • multiplicity (positive integer) – number of instances to return (default is 1; a single-item collection)
  • style (string) – style of scoring engine; only one currently supported: “pure” for pure-Python
  • debug (bool) – if True, print the Python code generated by this PFA document before evaluating
Return type:

titus.genpy.EngineConfig

Returns:

a PFA document representing the chained workflow