logging.basicConfig( format="%(asctime)s %(levelname)-8s %(message)s", level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S", ) B = 10 # 600 is_iid = True C = 0.1 lr = 0.1 for s in range(20): name = f"Seed value: {s}" logging.info(name) experiment = Experiment(workspace="federated-learning", project_name="Reproducability seed") experiment.set_name(name) # TODO a paraméterek helytelen nevére nem adott hibát config = TorchFederatedLearnerMNISTConfig( LEARNING_RATE=lr, IS_IID_DATA=is_iid, BATCH_SIZE=B, CLIENT_FRACTION=C, N_CLIENTS=100, N_EPOCH_PER_CLIENT=5, MAX_ROUNDS=300, SEED=s, ) learner = TorchFederatedLearnerMNIST(experiment, config) learner.train()
format="%(asctime)s %(levelname)-8s %(message)s", level=logging.INFO, datefmt="%Y-%m-%d %H:%M:%S", ) C = 1 NC = 2 E = 5 B = 50 is_iid = False dist = "IID" if is_iid else "non IID" name = f"torch - {dist} - glorot" logging.info(name) experiment = Experiment(workspace="federated-learning", project_name="compare-frameworks") experiment.set_name(name) # TODO a paraméterek helytelen nevére nem adott hibát config = TorchFederatedLearnerMNISTConfig( LEARNING_RATE=0.1, IS_IID_DATA=is_iid, BATCH_SIZE=B, CLIENT_FRACTION=C, N_CLIENTS=NC, N_EPOCH_PER_CLIENT=E, MAX_ROUNDS=1500, ) learner = TorchFederatedLearnerMNIST(experiment, config) learner.train()
from comet_ml import Experiment import logging from FLF.TorchFederatedLearnerMNIST import TorchFederatedLearnerMNIST, TorchFederatedLearnerMNISTConfig logging.basicConfig( format='%(asctime)s %(levelname)-8s %(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') name = "TorchClientBatchIter" logging.info(name) experiment = Experiment( workspace="federated-learning", project_name="simple_runs" ) experiment.set_name(name) config = TorchFederatedLearnerMNISTConfig(N_CLIENTS=100, CLIENT_FRACTION=0.1, N_ROUNDS=10, BATCH_SIZE=64) learner = TorchFederatedLearnerMNIST(experiment, config) learner.train() # TODO n workers for data loading is broken