We are excited to announce the release of Spice.ai v0.4-alpha! 🏄♂️
Highlights include support for authoring reward functions in a code file, the ability to specify the time of recommendation, and ingestion support for transaction/correlation ids. Authoring reward functions in a code file is a significant improvement to the developer experience than specifying functions inline in the YAML manifest, and we are looking forward to your feedback on it!
If you are new to Spice.ai, check out the getting started guide and star spiceai/spiceai on GitHub.
The spice upgrade command was added in the v0.3.1-alpha release, so you can now upgrade from v0.3.1 to v0.4 by simply running spice upgrade in your terminal. Special thanks to community member @Adm28 for contributing this feature!
In addition to defining reward code inline, it is now possible to author reward code in functions in a separate Python file.
The reward function file path is defined by the reward_funcs property.
A function defined in the code file is mapped to an action by authoring its name in the with property of the relevant reward.
Example:
Learn more in the documentation: docs.spiceai.org/concepts/rewards/external
Spice.ai can now learn from cyclical patterns, such as daily, weekly, or monthly cycles.
To enable automatic cyclical field generation from the observation time, specify one or more time categories in the pod manifest, such as a month or weekday in the time section.
For example, by specifying month the Spice.ai engine automatically creates a field in the AI engine data stream called time_month_{month} with the value calculated from the month of which that timestamp relates.
Example:
Supported category values are:
month dayofmonth dayofweek hour
Learn more in the documentation: docs.spiceai.org/reference/pod/#time
It is now possible to specify the time of recommendations fetched from the /recommendation API.
Valid times are from pod epoch_time to epoch_time + period.
Previously the API only supported recommendations based on the time of the last ingested observation.
Requests are made in the following format: GET http://localhost:8000/api/v0.1/pods/{pod}/recommendation?time={unix_timestamp}
An example for quickstarts/trader
GET http://localhost:8000/api/v0.1/pods/trader/recommendation?time=1605729600
Specifying {unix_timestamp} as 0 will return a recommendation based on the latest data. An invalid {unix_timestamp} will return a result that has the valid time range in the error message:
order_id, trace_id) in the pod manifest.training section is not included in the manifest.Spice.ai started with the vision to make AI easy for developers. We are building Spice.ai in the open and with the community. Reach out on Slack or by email to get involved. We will also be starting a community call series soon!