diff --git a/examples/FedSimSiam/client/data.py b/examples/FedSimSiam/client/data.py index 95b10e7db..c96724e1e 100644 --- a/examples/FedSimSiam/client/data.py +++ b/examples/FedSimSiam/client/data.py @@ -39,7 +39,7 @@ def load_data(data_path, is_train=True): data_path = os.environ.get( "FEDN_DATA_PATH", abs_path+"/data/clients/1/cifar10.pt") - data = torch.load(data_path) + data = torch.load(data_path, weights_only=True) if is_train: X = data["x_train"] diff --git a/examples/huggingface/client/data.py b/examples/huggingface/client/data.py index dcbc0d167..d1c517578 100644 --- a/examples/huggingface/client/data.py +++ b/examples/huggingface/client/data.py @@ -11,7 +11,7 @@ def load_data(data_path=None, is_train=True): if data_path is None: data_path = os.environ.get("FEDN_DATA_PATH", abs_path + "/data/clients/1/enron_spam.pt") - data = torch.load(data_path) + data = torch.load(data_path, weights_only=True) if is_train: X = data["X_train"] y = data["y_train"] diff --git a/examples/mnist-pytorch-DPSGD/client/data.py b/examples/mnist-pytorch-DPSGD/client/data.py index b7cc5b8e7..18a674355 100644 --- a/examples/mnist-pytorch-DPSGD/client/data.py +++ b/examples/mnist-pytorch-DPSGD/client/data.py @@ -35,7 +35,7 @@ def load_data(data_path, is_train=True): data_path = os.environ.get("FEDN_DATA_PATH", abs_path + "/data/clients/1/mnist.pt") print("data path: ", data_path) - data = torch.load(data_path) + data = torch.load(data_path, weights_only=True) if is_train: X = data["x_train"] diff --git a/examples/mnist-pytorch/client/data.py b/examples/mnist-pytorch/client/data.py index b921f3132..f10fd1558 100644 --- a/examples/mnist-pytorch/client/data.py +++ b/examples/mnist-pytorch/client/data.py @@ -33,7 +33,7 @@ def load_data(data_path, is_train=True): if data_path is None: data_path = os.environ.get("FEDN_DATA_PATH", abs_path + "/data/clients/1/mnist.pt") - data = torch.load(data_path) + data = torch.load(data_path, weights_only=True) if is_train: X = data["x_train"]