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

Hotfixes 3.7.0 #1187

Merged
merged 11 commits into from
Mar 21, 2023
2 changes: 1 addition & 1 deletion bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def turn_console_off():
# Needs to use wss://
__bellagene_entrypoint__ = "wss://parachain.opentensor.ai:443"

__local_entrypoint__ = "ws://127.0.0.1:9945"
__local_entrypoint__ = "ws://127.0.0.1:9944"

__tao_symbol__: str = chr(0x03C4)

Expand Down
21 changes: 19 additions & 2 deletions bittensor/_cli/commands/delegates.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# DEALINGS IN THE SOFTWARE.

import sys
import os
import json
import argparse
import bittensor
Expand Down Expand Up @@ -46,7 +47,17 @@ def show_delegates( delegates: List['bittensor.DelegateInfo'], width: Optional[i
""" Pretty prints a table of delegates sorted by total stake.
"""
delegates.sort(key=lambda delegate: delegate.total_stake, reverse=True)
registered_delegate_info = json.load( open("delegates.json") )
try:
package_dir = os.path.dirname(bittensor.__file__)
root_dir = os.path.dirname(package_dir)
filename = os.path.join(root_dir, 'delegates.json')
if os.path.exists(filename):
registered_delegate_info = json.load( open(filename, 'r') )
else:
registered_delegate_info = {}
except:
registered_delegate_info = {}

table = Table(show_footer=True, width=width, pad_edge=False, box=None, expand=True)
table.add_column("[overline white]INDEX", str(len(delegates)), footer_style = "overline white", style='bold white')
table.add_column("[overline white]OWNER", style='rgb(50,163,219)', no_wrap=True, justify='left')
Expand Down Expand Up @@ -405,7 +416,13 @@ def run( cli ):
delegates.sort(key=lambda delegate: delegate[0].total_stake, reverse=True)

try:
registered_delegate_info = json.load( open("delegates.json") )
package_dir = os.path.dirname(bittensor.__file__)
root_dir = os.path.dirname(package_dir)
filename = os.path.join(root_dir, 'delegates.json')
if os.path.exists(filename):
registered_delegate_info = json.load( open(filename, 'r') )
else:
registered_delegate_info = {}
except:
registered_delegate_info = {}

Expand Down
6 changes: 3 additions & 3 deletions bittensor/_metagraph/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ def __new__(
if network == None:
network = config.subtensor.get('network', bittensor.defaults.subtensor.network)

if network =='finney':
return metagraph_impl.Metagraph( network = network, netuid = netuid )
elif network =='nakamoto':
if network =='nakamoto':
config.subtensor.network = 'nakamoto'
return naka_metagraph(config = config, subtensor = subtensor)
else:
return metagraph_impl.Metagraph( network = network, netuid = netuid )

@classmethod
def config(cls) -> 'bittensor.Config':
Expand Down
3 changes: 2 additions & 1 deletion requirements/prod.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pyyaml==6.0
rich==12.5.1
retry==0.9.2
requests==2.25.0
scalecodec>=1.2,<1.3
scalecodec==1.2.0
sentencepiece==0.1.97
termcolor==2.1.1
torch==1.13.1
Expand All @@ -43,4 +43,5 @@ qqdm==0.0.7
wandb>=0.11.1,<0.13.4
ansible_vault>=2.1
substrate-interface==1.5.0
jsonschema[format-nongpl]>=4.14.0,<=4.17.0
markupsafe==2.0.1