Skip to content

Commit

Permalink
use wait epoch
Browse files Browse the repository at this point in the history
  • Loading branch information
open-junius committed Nov 6, 2024
1 parent 5736af9 commit 676b3b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/e2e_tests/test_commit_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
register_subnet,
sudo_set_hyperparameter_bool,
sudo_set_hyperparameter_values,
wait_epoch,
wait_interval,
)
from tests.e2e_tests.utils.e2e_test_utils import setup_wallet
Expand Down Expand Up @@ -142,11 +143,11 @@ async def test_commit_and_reveal_weights(local_chain):
weight_commit_reveal_interval = subtensor.query_module(
module="SubtensorModule", name="RevealPeriodEpochs", params=[netuid]
)
periods = reveal_periods.value

periods = weight_commit_reveal_interval.value
assert periods > 0, "Invalid RevealPeriodEpochs"

# Wait until the reveal block range, the default temp is 300
await wait_interval(300, subtensor)
await wait_epoch(subtensor, netuid=netuid)

# Reveal weights
success, message = subtensor.reveal_weights(
Expand Down

0 comments on commit 676b3b9

Please sign in to comment.