Skip to content

Commit

Permalink
Remove unused hotkey setting and env var
Browse files Browse the repository at this point in the history
  • Loading branch information
olzhasar-reef committed May 6, 2024
1 parent 4d42faf commit 63bf076
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 13 deletions.
1 change: 0 additions & 1 deletion app/src/bittensor_panel/core/bt.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ def get_subtensor() -> bittensor.subtensor:
def get_wallet() -> bittensor.wallet:
return bittensor.wallet(
name=settings.WALLET_NAME,
hotkey=settings.WALLET_HOTKEY,
path=settings.WALLET_PATH,
)

Expand Down
9 changes: 2 additions & 7 deletions app/src/bittensor_panel/core/tests/test_bt.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def test_get_wallet(mocker: MockerFixture, settings):

mock.assert_called_once_with(
name=settings.WALLET_NAME,
hotkey=settings.WALLET_HOTKEY,
path=settings.WALLET_PATH,
)

Expand Down Expand Up @@ -115,9 +114,7 @@ def mock_wallet(mocker: MockerFixture):


@pytest.mark.parametrize("result", [True, False])
def test_update_remote_hyperparam(
mock_subtensor: MagicMock, mock_wallet: MagicMock, result: bool, settings
):
def test_update_remote_hyperparam(mock_subtensor: MagicMock, mock_wallet: MagicMock, result: bool, settings):
mock_subtensor.return_value.set_hyperparameter.return_value = result

name = "difficulty"
Expand All @@ -136,9 +133,7 @@ def test_update_remote_hyperparam(
)


def test_update_remote_hyperparam_exception(
mock_subtensor: MagicMock, mock_wallet: MagicMock
):
def test_update_remote_hyperparam_exception(mock_subtensor: MagicMock, mock_wallet: MagicMock):
mock_subtensor.return_value.set_hyperparameter.side_effect = RuntimeError

with pytest.raises(SubtensorServerError):
Expand Down
4 changes: 1 addition & 3 deletions app/src/bittensor_panel/core/tests/test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ def hyperparam_dict(faker: Faker):

@pytest.fixture
def mock_load_hyperparams(mocker: MockerFixture, hyperparam_dict: dict[str, int]):
return mocker.patch(
"bittensor_panel.core.services.load_hyperparams", return_value=hyperparam_dict
)
return mocker.patch("bittensor_panel.core.services.load_hyperparams", return_value=hyperparam_dict)


def test_refresh_hyperparams(
Expand Down
1 change: 0 additions & 1 deletion app/src/bittensor_panel/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,5 +313,4 @@ def configure_structlog():
SUBTENSOR_ADDRESS = env.str("SUBTENSOR_ADDRESS", default="local")
SUBNET_UID = env.int("SUBNET_UID")
WALLET_NAME = env.str("WALLET_NAME")
WALLET_HOTKEY = env.str("WALLET_HOTKEY")
WALLET_PATH = env.path("WALLET_PATH")
1 change: 0 additions & 1 deletion envs/dev/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,4 @@ BACKUP_LOCAL_ROTATE_KEEP_LAST=
SUBTENSOR_ADDRESS=local
SUBNET_UID=1
WALLET_NAME="default"
WALLET_HOTKEY="default"
WALLET_PATH=""

0 comments on commit 63bf076

Please sign in to comment.