bittensor.core.config#
Implementation of the config class, which manages the configuration of different Bittensor modules.
Example
import argparse import bittensor as bt
parser = argparse.ArgumentParser(‘Miner’) bt.Axon.add_args(parser) bt.Subtensor.add_args(parser) bt.Async_subtensor.add_args(parser) bt.Wallet.add_args(parser) bt.logging.add_args(parser) bt.PriorityThreadPoolExecutor.add_args(parser) config = bt.config(parser)
print(config)
Exceptions#
Raised when there's an error loading the config file. |
Classes#
Manages configuration for Bittensor modules with nested namespace support. |
Module Contents#
- class bittensor.core.config.Config(parser=None, args=None, strict=False, default=DEFAULTS)[source]#
Bases:
munch.DefaultMunchManages configuration for Bittensor modules with nested namespace support.
Construct a new DefaultMunch. Like collections.defaultdict, the first argument is the default value; subsequent arguments are the same as those for dict.
- Parameters:
parser (argparse.ArgumentParser)
strict (bool)
default (Any)