Applying Model
instances to db
There are 4 key AI Model
sub classes, see here for detailed usage:
Path | Description |
---|---|
superduper.components.model.ObjectModel | Wraps a Python object to compute outputs |
superduper.components.model.APIModel | Wraps a model hosted behind an API to compute outputs |
superduper.components.model.QueryModel | Maps a Database select query with a free variable over inputs |
superduper.components.model.SequentialModel | Computes outputs sequentially for a sequence of Model instances |
As well as these key sub-classes, we have classes in the superduper.ext.*
subpackages:
See here for more information.
Whenever one of these Model
descendants is instantiated, and db.apply(model)
is called,
several things can (do) happen:
- The
Model
's metadata is saved in thedb.metadata_store
. - It's associated data (e.g.) model is saved in the
db.artifact_store
. - (Optional) if the
Model
has aTrainer
attached, then theModel
is trained/ fit on the specified data. - (Optional) if the
Model
has anEvaluation
method attached, then theModel
is evaluated on the specified data.