Data Models API
Synalinks features four distinct types of data models, each serving a unique purpose within the framework:
-
DataModel: This is the backend-dependent data model, built on Pydantic's
BaseModel. It is the primary model most users will interact with. It allows for schema and variable declarations, and is used to format datasets. When entering a workflow, this data model is automatically converted into a backend-independent format. -
JsonDataModel: This is the backend-independent data model that flows through the pipelines. It holds both a JSON schema and a JSON value, enabling it to perform computations. Unlike the backend-dependent model, this one is dynamically created and modified.
-
SymbolicDataModel: This is the symbolic data model used during the functional API declaration to infer the pipeline's edges and nodes. It only holds a JSON schema, allowing the system to compute the pipeline from inputs and outputs without performing actual computations.
-
Variable: This data model holds the module's state and can be updated during training. It includes a JSON schema and JSON value, enabling computations, and also contains metadata about training.
Optimizers can update it during the training process.
Data Models API Overview
- The DataModel Class: The backend-dependent data models.
- The JsonDataModel Class: The backend-independent data models.
- The SymbolicDataModel Class: The symbolic data models.
- The Variable Class: The variable data models that the optimizers can act upon.
- The Base DataModels: A collection of basic backend-dependent data models.