Fixed BERT example
@@ -17,7 +17,9 @@ import torch
import transformers
from transformers import DataCollatorForLanguageModeling
-def main(hparams):
+def main():
+ argparser = argparse.ArgumentParser()
+
# Args
learning_rate = 0.01
batch_size = 20
@@ -28,9 +30,7 @@ def main(hparams):
# Create background objects.
# Connect the metagraph.
# Start the axon server.
- config = bittensor.Config.from_hparams( hparams )
- logger.info(config)
- bittensor.init( config )
+ bittensor.init(argparser)
bittensor.start()
# Build Synapse
@@ -83,7 +83,4 @@ def main(hparams):
if __name__ == "__main__":
- parser = argparse.ArgumentParser()
- hparams = bittensor.Config.add_args(parser)
- hparams = parser.parse_args()
- main(hparams)
\ No newline at end of file
+ main()
\ No newline at end of file
