Models YAML Specification
Spice ML Models YAML manifest Specification v0.2 (beta)
Spice ML Models are defined in YAML. To create a Model, add a manifest YAML file to the /models
path of a connected GitHub repository.
YAML Schema Reference
name
name
The name of the model. Only alpha characters and underscores are supported with no spaces.
description
[optional]
description
[optional]An optional description for the model.
family
[optional]
family
[optional]The model family.
type
type
The model type. For more details see Model Type Specification.
metadata
metadata
A key-value bag of metadata/parameters for the model. When type
is autogluon
or darts
, model
, is a reserved key to specify hyperparameters of the underlying model (see Model Type Specification)
handler
handler
The code file that contains the entry points for training and inferencing.
E.g. gas_fees.py
epochs
epochs
Training iterations count.
training
training
Optional. Defines training for the model.
Example
entry_point
The entry point (function) for training.
E.g. gas_fees.train
sql
The Spice.ai SQL query for fetching training data.
E.g. WITH counts AS ( SELECT block_number, count(1) as "count" FROM eth.recent_transactions GROUP BY block_number ) SELECT number as "ts", CAST(b.base_fee_per_gas / 1000000000.0 AS DOUBLE) as "y", CAST(c."count" AS DOUBLE) as "y2" FROM eth.recent_blocks b INNER JOIN counts c ON b.number = c.block_number WHERE b.base_fee_per_gas IS NOT NULL ORDER BY block_number DESC LIMIT 500
loggers
loggers
A list of loggers to enable for each training run.
Supported loggers and their values are:
Logger | Value |
---|---|
|
Example
inferencing
inferencing
Optional. Defines inferencing for the model.
Example
entry_point
The entry point (function) for inferencing.
E.g. gas_fees.infer
sql
The Spice.ai SQL query for fetching inferencing data.
E.g. SELECT number as "ts", CAST(base_fee_per_gas / 1000000000.0 AS DOUBLE) as "y", CAST(transaction_count AS DOUBLE) as "y2" from eth.recent_blocks WHERE base_fee_per_gas IS NOT NULL ORDER BY ts DESC LIMIT 35
lookback_size
The lookback size/window.
forecast_size
The forecast size/window.
Example definition
Last updated