Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions docs/validator_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
- [`--sma.high.days INTEGER`](#--smahighdays-integer)
- [`--softmax.low.beta FLOAT`](#--softmaxlowbeta-float)
- [`--softmax.high.beta FLOAT`](#--softmaxhighbeta-float)
- [`--cycle_interval_minutes.low INTEGER`](#--cycle_interval_minuteslow-integer)
- [`--cycle_interval_minutes.high INTEGER`](#--cycle_interval_minuteshigh-integer)
- [`--logging.debug`](#--loggingdebug)
- [`--logging.info`](#--logginginfo)
- [`--logging.trace`](#--loggingtrace)
Expand Down Expand Up @@ -420,6 +422,72 @@ pm2 start validator.config.js -- --softmax.high.beta -0.2

<sup>[Back to top ^][table-of-contents]</sup>

#### `--cycle_interval_minutes.low INTEGER`

Cycle interval in minutes for the 24h prompt.

Default: `5`

Example:

```js
// validator.config.js
module.exports = {
apps: [
{
name: "validator",
interpreter: "python3",
script: "./neurons/validator.py",
args: "--cycle_interval_minutes.low 5",
env: {
PYTHONPATH: ".",
},
},
],
};
```

Alternatively, you can add the args directly to the command:

```shell
pm2 start validator.config.js -- --cycle_interval_minutes.low 5
```

<sup>[Back to top ^][table-of-contents]</sup>

#### `--cycle_interval_minutes.high INTEGER`

Cycle interval in minutes for the 1h prompt.

Default: `2`

Example:

```js
// validator.config.js
module.exports = {
apps: [
{
name: "validator",
interpreter: "python3",
script: "./neurons/validator.py",
args: "--cycle_interval_minutes.high 2",
env: {
PYTHONPATH: ".",
},
},
],
};
```

Alternatively, you can add the args directly to the command:

```shell
pm2 start validator.config.js -- --cycle_interval_minutes.high 2
```

<sup>[Back to top ^][table-of-contents]</sup>

#### `--logging.debug`

Turn on bittensor debugging information.
Expand Down
6 changes: 6 additions & 0 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ def __init__(self, config=None, cycle_name: str = CYCLE_LOW_FREQUENCY):
HIGH_FREQUENCY.window_days = self.config.sma.high.days
LOW_FREQUENCY.data_retention_days = self.config.retention.low.days
HIGH_FREQUENCY.data_retention_days = self.config.retention.high.days
LOW_FREQUENCY.cycle_interval_minutes = (
self.config.cycle_interval_minutes.low
)
HIGH_FREQUENCY.cycle_interval_minutes = (
self.config.cycle_interval_minutes.high
)
Comment on lines +86 to +91

PriceDataProvider.assert_assets_supported(HIGH_FREQUENCY.asset_list)
PriceDataProvider.assert_assets_supported(LOW_FREQUENCY.asset_list)
Expand Down
14 changes: 14 additions & 0 deletions synth/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,20 @@ def add_validator_args(_, parser: argparse.ArgumentParser):
default=-0.2,
)

parser.add_argument(
"--cycle_interval_minutes.low",
type=int,
help="Cycle interval in minutes for the low frequency prompt.",
default=5,
)

parser.add_argument(
"--cycle_interval_minutes.high",
type=int,
help="Cycle interval in minutes for the high frequency prompt.",
default=2,
)


def config(cls):
"""
Expand Down
Loading