opentensor / bittensor-subnet-template

Template Design for a Bittensor subnetwork
MIT License
65 stars 113 forks source link

Features/more modular #27

Closed steffencruz closed 10 months ago

steffencruz commented 10 months ago

Additional refactor of features/modular to make further use of inheritance from a BaseNeuron class. Incorporates some ideas from @Eugene-hu . Still some issues with 'pushing down' logic, my attempt to solve is via noisy base methods in the parent class that only shut up if you overload them.

# neurons/validator.py
class ValidatorNeuron(BaseValidatorNeuron):
   ...
# neurons/miner.py
class MinerNeuron(BaseMinerNeuron):
   ...
# base/validator.py
class BaseValidatorNeuron(BaseNeuron):
   ...
# base/miner.py
class BaseMinerNeuron(BaseNeuron):
   ...
# base/neuron.py
class BaseNeuron(ABC):
    # shared functionality (wallet, subtensor, metagraph, basic sync)
   ...

Also attempts to add pylint