Update app.py
Browse files
app.py
CHANGED
@@ -231,6 +231,7 @@ from logging import INFO, DEBUG
|
|
231 |
from flwr.common.logger import log
|
232 |
|
233 |
DEVICE = torch.device("cpu")
|
|
|
234 |
|
235 |
def load_data(dataset_name, train_size=20, test_size=20, num_clients=2):
|
236 |
raw_datasets = load_dataset(dataset_name)
|
@@ -345,7 +346,7 @@ class CustomClient(fl.client.NumPyClient):
|
|
345 |
plot_placeholder.pyplot(fig)
|
346 |
|
347 |
def read_log_file():
|
348 |
-
with open("log.txt", "r") as file:
|
349 |
return file.read()
|
350 |
|
351 |
def main():
|
|
|
231 |
from flwr.common.logger import log
|
232 |
|
233 |
DEVICE = torch.device("cpu")
|
234 |
+
fl.common.logger.configure(identifier="myFlowerExperiment", filename="./log.txt")
|
235 |
|
236 |
def load_data(dataset_name, train_size=20, test_size=20, num_clients=2):
|
237 |
raw_datasets = load_dataset(dataset_name)
|
|
|
346 |
plot_placeholder.pyplot(fig)
|
347 |
|
348 |
def read_log_file():
|
349 |
+
with open("./log.txt", "r") as file:
|
350 |
return file.read()
|
351 |
|
352 |
def main():
|