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

Extract config to new package #1401

Merged
merged 15 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def turn_console_off():


# ---- Config ----
from bittensor._config import config as config
from bittensor_config import config as config

# ---- LOGGING ----
# Duplicate import for ease of use.
Expand Down Expand Up @@ -169,7 +169,7 @@ def turn_console_off():

# ---- Classes -----
from bittensor._cli.cli_impl import CLI as CLI
from bittensor._config.config_impl import Config as Config
from bittensor_config.config_impl import Config as Config
from bittensor._subtensor.chain_data import DelegateInfo as DelegateInfo
from bittensor._wallet.wallet_impl import Wallet as Wallet
from bittensor._keyfile.keyfile_impl import Keyfile as Keyfile
Expand Down
2 changes: 1 addition & 1 deletion bittensor/_axon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def add_args(cls, parser: argparse.ArgumentParser, prefix: str = None):
"""Accept specific arguments from parser"""
prefix_str = "" if prefix is None else prefix + "."
if prefix is not None:
if not hasattr(bittensor.defaults, prefix):
if bittensor.defaults.get(prefix, d=None) == None:
setattr(bittensor.defaults, prefix, bittensor.Config())
getattr(bittensor.defaults, prefix).axon = bittensor.defaults.axon

Expand Down
9 changes: 0 additions & 9 deletions bittensor/_cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,6 @@ def __create_parser__() -> 'argparse.ArgumentParser':

return parser

@staticmethod
def config(args: List[str]) -> 'bittensor.config':
""" From the argument parser, add config to bittensor.executor and local config
Return: bittensor.config object
"""
parser = cli.__create_parser__()

return parser

@staticmethod
def config(args: List[str]) -> 'bittensor.config':
""" From the argument parser, add config to bittensor.executor and local config
Expand Down
194 changes: 0 additions & 194 deletions bittensor/_config/__init__.py

This file was deleted.

Loading