Apply API
AI functionality in SuperDuperDB revolves around creating AI models, and configuring them to interact with data via the datalayer.
There are many decisions to be made and configured; for this SuperDuperDB
provides the Component
abstraction.
The typical process is:
1. Create a component
Build your components, potentially including other subcomponents.
from superduperdb import <ComponentClass>
component = <ComponentClass>(
'identifier',
**kwargs # can include other components
)
2. Apply the component to the datalayer
"Applying" the component the db
datalayer, also
applies all sub-components. So only 1 call is needed.
db.apply(component)
3. Reload the component (if necessary)
The .apply
command saves everything necessary to reload the component
in the SuperDuperDB system.
reloaded = db.load('type_id', 'identifier') # `type_id`
Read more
📄️ Model
- Wrap a standard AI model with functionality necessary for SuperDuperDB
📄️ Listener
- apply a model to compute outputs on a query
📄️ VectorIndex
- Wrap a Listener so that outputs are searchable
📄️ Stack
- Wraps multiple potentially interdependent components
📄️ DataType
- Convert objects which should be added to the database or model outputs to encoded bytes
📄️ Schema
- Apply a dictionary of FieldType and DataType to encode columnar data
📄️ Table
- Create a table in an SQL database, which has a Schema attached
📄️ Dataset
- An immutable snapshot of a query saved to db.artifact_store
📄️ Metric
- Wrapper around a function intended to validate model outputs
📄️ Validation
- Validate a Model by attaching a Validation component
📄️ Trainer
- Train a Model by attaching a Trainer component