Fixed test_axon.py unit test
Fixed test_serialization.py test
@@ -14,14 +14,32 @@ import unittest
import bittensor
import torchvision
import pytest
-
+from munch import Munch
class TestSerialization(unittest.TestCase):
config = None
def setUp(self):
- self.config = Config.load()
+ config = {'neuron':
+ {'datapath': 'data/', 'learning_rate': 0.01, 'momentum': 0.9, 'batch_size_train': 64,
+ 'batch_size_test': 64, 'log_interval': 10, 'sync_interval': 100, 'priority_interval': 100,
+ 'name': 'mnist', 'trial_id': '1608070667'},
+ 'synapse': {'target_dim': 10},
+ 'dendrite': {'key_dim': 100, 'topk': 10, 'stale_emit_filter': 10000, 'pass_gradients': True,
+ 'timeout': 0.5,
+ 'do_backoff': True, 'max_backoff': 100},
+ 'axon': {'port': 8091, 'remote_ip': '191.97.53.53'},
+ 'nucleus': {'max_workers': 5, 'queue_timeout': 5, 'queue_maxsize': 1000},
+ 'metagraph': {'chain_endpoint': '206.189.254.5:12345', 'stale_emit_filter': 10000},
+ 'meta_logger': {'log_dir': 'data/'},
+ 'session': {'keyfile': None, 'keypair': None}
+ }
+
+ config = Munch.fromDict(config)
mnemonic = Keypair.generate_mnemonic()
+ keypair = Keypair.create_from_mnemonic(mnemonic)
+ config.session.keypair = keypair
+
self.keypair = Keypair.create_from_mnemonic(mnemonic)
def test_serialize(self):
