From 1558b3918463d25a98d29e69524737c99d5395a9 Mon Sep 17 00:00:00 2001 From: Luke Kim <80174+lukekim@users.noreply.github.com> Date: Thu, 23 Nov 2023 12:25:35 +0900 Subject: [PATCH] Remove training --- .../content/en/reference/Spicepod/_index.md | 124 ------------------ 1 file changed, 124 deletions(-) diff --git a/spiceaidocs/content/en/reference/Spicepod/_index.md b/spiceaidocs/content/en/reference/Spicepod/_index.md index df04a401..b2113a04 100644 --- a/spiceaidocs/content/en/reference/Spicepod/_index.md +++ b/spiceaidocs/content/en/reference/Spicepod/_index.md @@ -731,127 +731,3 @@ dataspaces: if args.position > 10: game.character.coins += 1 ``` - -## `training` - -**Required**. Controls the training process for Spice.ai. - -**Example** - -```yaml -training: - rewards: - - reward: buy - with: reward = 1 - - reward: sell - with: reward = 1 - - reward: hold - with: reward = 1 -``` - -### `training.goal` - -End the training early if Spice.ai reaches a training goal three times in a row. - -After a single episode is completed from a training run, a `score` is kept of the cumulative rewards that the Spice.ai runtime received. Use the `goal` here to write a python expression to check if the training goal has been met. - -**Example** - -```yaml -training: - goal: score >= 100 -``` - -### `training.loggers` - -A list of training loggers to enable for each pod training run. - -Supported loggers and their values are: - -| Logger | Value | -| ------------------------------------------------------ | ------------- | -| [TensorBoard](https://www.tensorflow.org/tensorboard/) | `tensorboard` | - -**_Example_** - -```yaml -training: - loggers: - - tensorboard -``` - -### `training.reward_init` - -A python code block that will be run before an action specific reward code block runs. Use this to define common variables that will be useful to reference in the specific reward code blocks. - -**Example** - -```yaml -training: - reward_init: | - # Compute price change between previous state and this one - # so it can be used in all three reward functions - prev_price = current_state["coinbase_btcusd_close"] - new_price = next_state["coinbase_btcusd_close"] - change_in_price = new_price - prev_price - rewards: - - reward: buy - with: reward = -change_in_price - - reward: sell - with: reward = change_in_price - - - reward: hold - with: | - if change_in_price > 0: - reward = -0.1 - else: - reward = 0.1 -``` - -### `training.reward_funcs` - -The path to a Python file that defines the reward functions to use, instead of python code blocks. - -### `training.rewards` - -**Required**. Defines how to reward the Spice.ai runtime during training so that it learns to take more intelligent actions. - -This can be a list of reward definitions or the string "uniform" to indicate that all rewards should receive the same reward. - -**Example** - -```yaml -training: - rewards: uniform -``` - -```yaml -training: - rewards: - - reward: buy - with: reward = 1 - - reward: sell - with: reward = 1 -``` - -### `training.rewards[*].reward` - -The name of the action to associate this reward function with. Should be the same name as an action defined in [actions](#actions) - -```yaml -actions: - - name: jump - -training: - rewards: - - reward: jump - with: reward = 1 -``` - -### `training.rewards[*].with` - -If `training.reward_funcs` is defined, then this should be the name of the function defined in the python file to use for specifying which reward to give the Spice.ai agent for taking this action. - -If `training.reward_funcs` is not defined, then this is a python code block that needs to assign a variable to `reward` to specify which reward to give the Spice.ai agent for taking this action. - -See [Rewards]({{}}) for more information on how to define reward functions.