tracdap.rt.metadata.model

Module Contents

Classes

ModelDefinition

Define a model for execution on the TRAC platform

ModelInputSchema

Describes the data schema of a model input

ModelOutputSchema

Describes the data schema of a model output

ModelParameter

Describes an individual parameter of a model

class tracdap.rt.metadata.model.ModelDefinition

Define a model for execution on the TRAC platform

entryPoint :str
inputs :Dict[str, ModelInputSchema]
language :str
outputs :Dict[str, ModelOutputSchema]
package :str
parameters :Dict[str, ModelParameter]
path :str
repository :str
version :str
class tracdap.rt.metadata.model.ModelInputSchema

Describes the data schema of a model input

In many cases models define the entire schemas of their inputs, in which case the input schema is just a wrapper around a schema definition. This is what is supported now.

Other approaches are possible. Models can define dynamic inputs, in which case the input schema is provided at runtime and can be interrogated by the model code. Models may also define inputs with some required fields and a dynamic portion. For non-tabular inputs, other options may be required. These capabilities may be added in future releases.

schema :tracdap.rt.metadata.data.SchemaDefinition
class tracdap.rt.metadata.model.ModelOutputSchema

Describes the data schema of a model output

In many cases models define the entire schemas of their outputs, in which case the output schema is just a wrapper around a schema definition. This is what is supported now.

Other approaches are possible. Models can define dynamic outputs, in which case the model decides at runtime what the output schema will be. Pass-through schemas (output X has the same schema as dynamic input Y) and pass-through-extend schemas (output X has the schema of dynamic input Y, plus one or more new columns) can also be useful. These capabilities may be added in future releases.

schema :tracdap.rt.metadata.data.SchemaDefinition
class tracdap.rt.metadata.model.ModelParameter

Describes an individual parameter of a model

defaultValue :Optional[tracdap.rt.metadata.data.Value]
label :str
paramType :tracdap.rt.metadata.data.TypeDescriptor