add_argument( '-op', '-optimizer', type = str, default = "SGD", help = 'optimizer to be used, by default implementing stochastic gradient descent') add_argument( '-lr', "-learning_rate", type = float, default = 0.01, help = "learning rate, use value from origin paper as default") add_argument( '-mn', '-model_name', type = str, default = 'mnist_cnn', help = 'the model to train') add_argument( '-B', '-batchsize', type = int, default = 10, help = 'local train batch size') add_argument( '-sm', '-save_most_recent', type = int, default = 2, help = 'in case of saving space, keep only the recent specified number of snapshops 0 means keep all') add_argument( '-sf', '-save_freq', type = int, default = 5, help = 'save frequency of the network_snapshot') add_argument( '-rp', '-resume_path', type = str, default = None, help = 'resume from the path of saved network_snapshots only provide the date') NOT GOOD if there needs to perform chain resyncing.') add_argument( '-dtx', '-destroy_tx_in_block', type = int, default = 0, help = 'currently transactions stored in the blocks are occupying GPU ram and have not figured out a way to move them to CPU ram or harddisk, so turn it on to save GPU ram in order for PoS to run 100+ rounds. add_argument( '-sn', '-save_network_snapshots', type = int, default = 0, help = 'only save network_snapshots if this is set to 1 will create a folder with date in the snapshots folder') add_argument( '-v', '-verbose', type = int, default = 1, help = 'print verbose debug log') add_argument( '-g', '-gpu', type = str, default = '0', help = 'gpu id to use(e.g. ArgumentDefaultsHelpFormatter, description = "Block_FedAvg_Simulation") ArgumentParser( formatter_class = argparse. # NETWORK_SNAPSHOTS_BASE_FOLDER = "/content/drive/MyDrive/BFA/snapshots" # set program execution time for logging purposeÄate_time = datetime. # TODO in reuqest_to_download, forgot to check for maliciousness of the block minerįrom Device import Device, DevicesInNetwork # TODO update forking log after loading network snapshots # TODO KickR continuousness should skip the rounds when nodes are not selected as workers # TODO Do not associate with blacklisted node. # TODO a chain is invalid if a malicious block is identified after this miner is identified as malicious # TODO miner sometimes receives worker transactions directly for unknown reason - discard tx if it's not the correct type # TODO need to make changes in these functions on Sunday # PoS also uses resync chain - the chain with highter stake # assume just skip verifying a transaction if offline, in reality it may continue to verify what's left most of the time, unnecessary because workers always send the newer updates, if it's not the last worker's updates # assume no resending transaction mechanism if a transaction is lost due to offline or time out. In real distributed network, remove peers if cannot reach for a long period of time # TODO let's not remove peers because of offline as peers may go back online later, instead just check if they are online or offline. # TODO subnets - potentially resolved by let each miner sends block # TODO when accepting transactions, check comm_round must be in the same, that is to assume by default they only accept the transactions that are in the same round, so the final block contains only updates from the same round # TODO redistribute offline() based on very transaction, not at the beginning of every loop
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |