Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Child Hotkeys #2071

Merged
merged 39 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6dda55b
init commit
opendansor Jun 26, 2024
783392f
Add child singular cli done
opendansor Jun 26, 2024
c8bd350
Set Child Hotkey
opendansor Jun 26, 2024
d2bc588
Set children multiple command.
opendansor Jun 26, 2024
f9d54d0
Remove merge conflict artifacts
opendansor Jun 26, 2024
de50693
Add GetChildrenHotkeysCommand
opendansor Jun 27, 2024
67cedd5
Add RevokeChildHotkey
opendansor Jun 27, 2024
3bc473f
lint
opendansor Jun 27, 2024
b3279ed
Revoke children multiple command
opendansor Jun 27, 2024
b8e2fa5
lint
opendansor Jun 27, 2024
5b2e595
CLI revoke multiple
opendansor Jun 27, 2024
36f7466
lint
opendansor Jun 27, 2024
8766851
Imports
opendansor Jun 27, 2024
f11fe3d
lint
opendansor Jun 27, 2024
156ee56
lint
opendansor Jun 27, 2024
2dcd6f9
imports in init
opendansor Jun 27, 2024
295cd4c
Refactor to follow new pattern
opendansor Jun 29, 2024
e77e688
Merge branch 'staging' into feature/opendansor/child_hotkeys
opendansor Jul 1, 2024
e4db609
U64 for all proportion values
opendansor Jul 1, 2024
79457b3
lint
opendansor Jul 1, 2024
5f6a754
debug
Jul 2, 2024
937f614
Clean up a bit.
opendansor Jul 2, 2024
c34cc8c
Merge pull request #2093 from opentensor/sam/debug_childkey
opendansor Jul 2, 2024
3053276
Clean up a bit.
opendansor Jul 2, 2024
2148dee
u16 to u64
opendansor Jul 3, 2024
2315d8b
un-refactor
opendansor Jul 3, 2024
70655e2
APY + other updates
opendansor Jul 8, 2024
4103cd4
lint
opendansor Jul 8, 2024
98d0768
lint
opendansor Jul 8, 2024
4c3bcbc
Extract Method, and params
opendansor Jul 8, 2024
a3ca5a5
Pr comments
opendansor Jul 10, 2024
26de88c
merge staging into child_hotkeys
opendansor Aug 5, 2024
04bbe9a
Update child hotkeys with new subtensor calls and remove ChildInfo ob…
opendansor Aug 8, 2024
dffb080
ruff
opendansor Aug 9, 2024
c7a95af
Merge branch 'staging' into feature/opendansor/child_hotkeys
opendansor Aug 9, 2024
a18fcd5
update
opendansor Aug 9, 2024
df6564b
update
opendansor Aug 9, 2024
432b503
ruff
opendansor Aug 9, 2024
36c42a0
mypy error
opendansor Aug 9, 2024
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
12 changes: 11 additions & 1 deletion bittensor/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@
WalletCreateCommand,
CommitWeightCommand,
RevealWeightCommand,
SetChildCommand,
SetChildrenCommand,
GetChildrenCommand,
RevokeChildCommand,
RevokeChildrenCommand,
)

# Create a console instance for CLI display.
Expand Down Expand Up @@ -162,11 +167,16 @@
"stake": {
"name": "stake",
"aliases": ["st", "stakes"],
"help": "Commands for staking and removing stake from hotkey accounts.",
"help": "Commands for staking and removing stake and setting child hotkey accounts.",
"commands": {
"show": StakeShow,
"add": StakeCommand,
"remove": UnStakeCommand,
"get_children": GetChildrenCommand,
"set_child": SetChildCommand,
"revoke_child": RevokeChildCommand,
"set_children": SetChildrenCommand,
"revoke_children": RevokeChildrenCommand,
},
},
"weights": {
Expand Down
184 changes: 125 additions & 59 deletions bittensor/commands/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,73 @@

from munch import Munch, munchify


from .stake import (
StakeCommand,
StakeShow,
SetChildCommand,
SetChildrenCommand,
GetChildrenCommand,
)
from .unstake import UnStakeCommand, RevokeChildCommand, RevokeChildrenCommand
from .overview import OverviewCommand
from .register import (
PowRegisterCommand,
RegisterCommand,
RunFaucetCommand,
SwapHotkeyCommand,
)
from .delegates import (
NominateCommand,
ListDelegatesCommand,
DelegateStakeCommand,
DelegateUnstakeCommand,
MyDelegatesCommand,
SetTakeCommand,
)
from .wallets import (
NewColdkeyCommand,
NewHotkeyCommand,
RegenColdkeyCommand,
RegenColdkeypubCommand,
RegenHotkeyCommand,
UpdateWalletCommand,
WalletCreateCommand,
WalletBalanceCommand,
GetWalletHistoryCommand,
)
from .weights import CommitWeightCommand, RevealWeightCommand
from .transfer import TransferCommand
from .inspect import InspectCommand
from .metagraph import MetagraphCommand
from .list import ListCommand
from .misc import UpdateCommand, AutocompleteCommand
from .senate import (
SenateCommand,
ProposalsCommand,
ShowVotesCommand,
SenateRegisterCommand,
SenateLeaveCommand,
VoteCommand,
)
from .network import (
RegisterSubnetworkCommand,
SubnetLockCostCommand,
SubnetListCommand,
SubnetSudoCommand,
SubnetHyperparamsCommand,
SubnetGetHyperparamsCommand,
)
from .root import (
RootRegisterCommand,
RootList,
RootSetWeightsCommand,
RootGetWeightsCommand,
RootSetBoostCommand,
RootSetSlashCommand,
)
from .identity import GetIdentityCommand, SetIdentityCommand

defaults: Munch = munchify(
{
"netuid": 1,
Expand Down Expand Up @@ -62,62 +129,61 @@
}
)

from .stake import StakeCommand, StakeShow
from .unstake import UnStakeCommand
from .overview import OverviewCommand
from .register import (
PowRegisterCommand,
RegisterCommand,
RunFaucetCommand,
SwapHotkeyCommand,
)
from .delegates import (
NominateCommand,
ListDelegatesCommand,
DelegateStakeCommand,
DelegateUnstakeCommand,
MyDelegatesCommand,
SetTakeCommand,
)
from .wallets import (
NewColdkeyCommand,
NewHotkeyCommand,
RegenColdkeyCommand,
RegenColdkeypubCommand,
RegenHotkeyCommand,
UpdateWalletCommand,
WalletCreateCommand,
WalletBalanceCommand,
GetWalletHistoryCommand,
)
from .weights import CommitWeightCommand, RevealWeightCommand
from .transfer import TransferCommand
from .inspect import InspectCommand
from .metagraph import MetagraphCommand
from .list import ListCommand
from .misc import UpdateCommand, AutocompleteCommand
from .senate import (
SenateCommand,
ProposalsCommand,
ShowVotesCommand,
SenateRegisterCommand,
SenateLeaveCommand,
VoteCommand,
)
from .network import (
RegisterSubnetworkCommand,
SubnetLockCostCommand,
SubnetListCommand,
SubnetSudoCommand,
SubnetHyperparamsCommand,
SubnetGetHyperparamsCommand,
)
from .root import (
RootRegisterCommand,
RootList,
RootSetWeightsCommand,
RootGetWeightsCommand,
RootSetBoostCommand,
RootSetSlashCommand,
)
from .identity import GetIdentityCommand, SetIdentityCommand
__all__ = [
"StakeCommand",
"StakeShow",
"SetChildCommand",
"SetChildrenCommand",
"GetChildrenCommand",
"UnStakeCommand",
"RevokeChildCommand",
"RevokeChildrenCommand",
"OverviewCommand",
"PowRegisterCommand",
"RegisterCommand",
"RunFaucetCommand",
"SwapHotkeyCommand",
"NominateCommand",
"ListDelegatesCommand",
"DelegateStakeCommand",
"DelegateUnstakeCommand",
"MyDelegatesCommand",
"SetTakeCommand",
"NewColdkeyCommand",
"NewHotkeyCommand",
"RegenColdkeyCommand",
"RegenColdkeypubCommand",
"RegenHotkeyCommand",
"UpdateWalletCommand",
"WalletCreateCommand",
"WalletBalanceCommand",
"GetWalletHistoryCommand",
"CommitWeightCommand",
"RevealWeightCommand",
"TransferCommand",
"InspectCommand",
"MetagraphCommand",
"ListCommand",
"UpdateCommand",
"AutocompleteCommand",
"SenateCommand",
"ProposalsCommand",
"ShowVotesCommand",
"SenateRegisterCommand",
"SenateLeaveCommand",
"VoteCommand",
"RegisterSubnetworkCommand",
"SubnetLockCostCommand",
"SubnetListCommand",
"SubnetSudoCommand",
"SubnetHyperparamsCommand",
"SubnetGetHyperparamsCommand",
"RootRegisterCommand",
"RootList",
"RootSetWeightsCommand",
"RootGetWeightsCommand",
"RootSetBoostCommand",
"RootSetSlashCommand",
"GetIdentityCommand",
"SetIdentityCommand",
]
Loading