Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
latentvector committed Apr 8, 2024
1 parent 25aa441 commit fc66d5a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 4 additions & 3 deletions commune/subspace/subspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,9 +1060,10 @@ def subnet2state( self, network: int = None, block: Optional[int] = None ) -> Op
def is_registered( self, key: str, netuid: int = None, block: Optional[int] = None) -> bool:
netuid = self.resolve_netuid( netuid )
if not c.valid_ss58_address(key):
name2key = self.name2key(netuid=netuid)
if key in name2key:
key = name2key[key]
key2addresss = c.key2address(netuid=netuid)
if key in key2addresss:
key = key2addresss[key]

assert c.valid_ss58_address(key), f"Invalid key {key}"
is_reged = bool(self.query('Uids', block=block, params=[ netuid, key ]))
return is_reged
Expand Down
Empty file added modules/basi/app.py
Empty file.
6 changes: 1 addition & 5 deletions modules/basi/basi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ def call_many(self, text, n=10, **kwargs):
kwargs['text'] = ' '.join(text)
futures += [c.submit(self.call, kwargs=kwargs)]
return c.wait(futures, timeout=10)







Basi.run(__name__)
4 changes: 2 additions & 2 deletions vali/vali.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ def module_info(self, **kwargs):

def module_infos(self,
keys = ['name', 'w',
'staleness', 'timestamp',
'latency', 'address'],
'staleness',
'latency', 'ss58_address'],
path = 'cache/module_infos',
max_age = 3600,
network = None,
Expand Down

0 comments on commit fc66d5a

Please sign in to comment.