159 questions
Advice
0
votes
0
replies
52
views
Hyperparameter tuning for federated learning
I am doing research about federated learning and I am exploring different options for hyperparameter tuning (i am using flower as FL framework and docker to simulate a cross-silo environment with 4 ...
1
vote
0
answers
72
views
PyTorch and NVIdia Flare is taking all computing resource on machine learning experiments
I am utilizing PyTorch for federated experiments. As my experiments involves 50 datasets with models, so, I have to run multiple ML models experiments parallelly.
The code for training ML model is ...
1
vote
0
answers
158
views
Why does my flwr federated learning setup freeze at round 1 while on deployment engine?
I'm new to the federated learning systems and I'm trying to train a model using 2 supernodes (clients). I managed to start the superlink (server) succesfully and successfully connect the nodes to the ...
0
votes
1
answer
39
views
How to transfer collaborator metadata in OpenFL
I am using securefederatedai/openfl workflow api, I want to transfer some of collaborator details, general ones like class distribution, class ratio, data mean, median.
How can I securely transfer ...
0
votes
1
answer
72
views
How can I create an iterative process when i have an TFF error with an inexisting module
When I try to create my iterative process for training my federated models with Tensorflow, I encounter this error
module 'tensorflow_federated.python.learning.algorithms' has no attribute '...
0
votes
1
answer
257
views
Kubernetes deployment for Flower server in Python fails with "Port in server address is already in use"
I am trying to deploy a Federated Learning server using Flower (flwr) on a Kubernetes cluster with a custom Docker image (fl-server:latest). The server needs to run on a specific port and host. My ...
0
votes
0
answers
92
views
Facing a problem with running a Federated Learning code
I am trying to run the code in the following link shaoxiongji/federated-learning using the following steps:
1- Clone the Repository:
git clone https://github.com/shaoxiongji/federated-learning.git
2- ...
0
votes
0
answers
37
views
Unexpected MSE Behavior in Online Federated Learning Simulation Using Random Fourier Features (RFF) Based Kernel LMS
I am trying to simulate the Online Federated Learning framework presented in the paper "Communication-Efficient Online Federated Learning Framework for Nonlinear Regression" by Gogineni et ...
1
vote
1
answer
150
views
Custom model aggregator TensorFlow Federated
I am experimenting with TensorFlow Federated, simulating a training process with the FedAvg algorithm.
def model_fn():
# Wrap a Keras model for use with TensorFlow Federated
keras_model = ...
0
votes
1
answer
173
views
How to integrate Federated Learning using Flower framworke in react js /flask web app
I want to create a web application using React.js, Flask, and the Flower framework with Tensorflow for image classification. I am stuck and would appreciate any tips or resources. Can anyone help me?
...
0
votes
0
answers
71
views
Federated dataloader deprecated?
In the federated Learning code below, I'm using Pysyft. the goal is to distribute the FashionMNIST dataset to different clients
federated_train_loader = syft.FederatedDataLoader(
datasets....
0
votes
0
answers
65
views
GPU percentage allocation for a Python class
I'm developing a sort of federated learning environment and it contains a Server class and 10 instances of the Client classes. I train the various clients one after the other and I'd like to specify ...
0
votes
2
answers
84
views
Reading Data in Python using pandas
import pandas as pd
import sklearn
from sklearn.datasets import load_iris
Loading data from a CSV file
data = pd.read_csv('D:/Projects/FLGRU_Model/FLDataset/01-12/DrDoS_LDAP.csv')
df = pd.read_csv(...
1
vote
0
answers
58
views
Federated Averaging somehow always gives identical accuracy on test set
I am implementing federated averaging on the IoT-23 dataset(lighter version)
Omitting the preprocessing I am saving the data into a test set and 9 train sets as below:
X_train, X_test, Y_train, Y_test ...
0
votes
0
answers
228
views
How to send extra parameters to server in Federated learning with Flower and Tensorflow?
I want to send extra parameters with model updates to server and then utilize those extra parameters in server for other purposes. I am using Flower and Tensorflow for this project. Before sending ...
0
votes
1
answer
74
views
Why these two loss function are not the same?
This is a loss function of a personalized federated learning framework. When lambda equals 0, all clients train locally. Otherwise they adjust their parameters based on the similarity to the global ...
1
vote
0
answers
53
views
DataLoader Causing RAM Crashes in PyTorch Federated Learning: Solutions?
I'm trying to implement federated learning to forecast solar photovoltaic generation using the LADPU dataset.
After preprocessing the dataset, I partitioned it into segments to simulate a federated ...
1
vote
1
answer
382
views
Why fit_round received failures in flwr framework?
I am using flwr framework to send a random array from client to server and then server will merge the array and sends back to each of the clients.
import numpy as np
import flwr as fl
from flwr.server....
1
vote
0
answers
567
views
i am facing "AttributeError: module 'syft' has no attribute 'VirtualWorker'" for "# Create VirtualWorkers hook = syft.VirtualWorker(hook, id="hook") "
i am facing "AttributeError: module 'syft' has no attribute 'VirtualWorker'" for "# Create VirtualWorkers hook = syft.VirtualWorker(hook, id="hook") "
Create ...
0
votes
1
answer
134
views
make model_averaging exclusive in federated learning using Python Threads
I am creating num_of_clients threads using the following code:
sockets_thread = []
no_of_client = 1
all_data = b""
while True:
try:
for i in range(no_of_client):
...
0
votes
0
answers
101
views
Could not connect to the docker container
I have a federated server (flower framework) running in a docker container in the raspberry pi device in the same network as the client (My laptop). The client is not able to establish a connection ...
0
votes
0
answers
62
views
Pytorch: Calculating the loss with respect to alpha, which is a nn.Paramter
I am trying to implement the following algorithm
. In step 18, the gradient of the loss with respect to alpha is being computed and when i try to access this .grad atribute for alpha, I get None, ...
0
votes
1
answer
125
views
Is there an library to get weights of each local model every round of Federated Learning?
In federated learning, I want to get weights of each local model every round, then I will cluster local clients based on their weights, but I can just use training_process.get_model_weights(...
0
votes
1
answer
257
views
Cannot install shfl in python
I am trying to use shfl python library. When I import shfl, I get the error ModuleNotFoundError: No module named 'shfl', and apparently I cannot install it.
I have used three following commands and ...
0
votes
1
answer
418
views
Differential Privacy error in PyTorch using Opacus PrivacyEngine - how to troubleshoot?
The problem of the given code is:
line 25, in <module> privacy_engine = PrivacyEngine(model, batch_size=64,
sample_size=60000, alphas=range(2,32), noise_multiplier=1.3, max_grad_norm=1.0)
...
-1
votes
1
answer
103
views
How Federated Learning would help to centralise Hospitals and clinical data cohorts (databases)? Especially Electronic Health Records datasets
What are the libraries we can use for federated learning process?
what are the data encryption techniques used to protect datasets?
I studied some articles and blogs but in health sector it's ...
0
votes
1
answer
236
views
Resolved: Model parameters not loading when simulating a federated learning Semantic Segmentation task using Flower and Pytorch
I'm working on federating a UNET semantic segmentation workflow using flower and Pytorch. As of right now I can load the data and run a centralized training but once I try to federate it I see that ...
1
vote
1
answer
842
views
How do I solve the error which I get during training the clients in flower framework for federated learning?
I am trying to implement Federated Learning using Flower framework in python. I get the following error when I start the process.Snapshot of the error
Here is what I tried,
NUM_CLIENTS = 10
#function ...
0
votes
1
answer
225
views
Federated Learning implementation code shows a RuntimeError: all elements of input should be between 0 and 1
`
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader, Dataset
import numpy as np
from sklearn.datasets import load_breast_cancer
from sklearn....
0
votes
1
answer
164
views
Federated learning with Differential Privacy - Bad test performance
I've been playing for some time with FL + DP for my thesis.
I am using TFF in case someone is wondering.
I load my data as:
train_data = tff.simulation.datasets.ClientData.from_clients_and_fn(
...
1
vote
1
answer
2k
views
ERROR: Could not find a version that satisfies the requirement torchvision~=0.5.0 (from syft)
Last week iam working with syft==0.2.9 and it was working great!
but this week when i tried to install syft==0.2.9 i have this error
"ERROR: Could not find a version that satisfies the ...
1
vote
0
answers
146
views
why is api calls from the pysyft library causing a ModuleNotFoundError?
I am trying to work on a federated learning project and I am just at the beginning. I tried to import a class called "BaseDataset" from the pysyft library as shown in the following.
import ...
1
vote
0
answers
248
views
ImportError: sys.meta_path is None, Python is likely shutting down; OverflowError: timeout doesn't fit into C timeval; Exception in thread Thread-1
I got a series of error messages, the last one being the one mentioned first in the title, while I was trying to run this Github repo on my local machine. I need that project as a boilerplate for my ...
1
vote
0
answers
269
views
Sending PyTorch model weights over network in a compressed manner
I have a PyTorch model that I am trying to integrate federated learning for. In order to do this, I need to send the model weights back and forth between a server and a client. When I get the size of ...
0
votes
2
answers
249
views
Is there a way to upload a deep learning model to a PostgreSQL database?
I have deep learning models (tensorflow in hdf5 format), which I want to upload to a PostgreSQL database.
A single model may be up to 500 MBs, and the models need to be updated and uploaded/downloaded ...
0
votes
1
answer
169
views
Local dataset in Federated learning: client side, is the local update performed on a different subset of the local dataset each round?
I was wondering if in a Federated Learning approach I need to split the local dataset in a number of batches equal to the number of communication rounds.
Otherwise I need to update locally on the ...
0
votes
0
answers
55
views
Transferring models between two PCs via PostgresSQL database
I have two PCs that want to share tensorflow models "hdf5 format" in a federated learning manner via a PostgresSQL database.
The models will be trained locally on both machines, and then ...
0
votes
0
answers
62
views
How to resolve "module has no attribute 'entropy_decode_index' error in ubuntu for TFF?
I got "module '0b1a516c7ccf3157373118bcf0f434168745c8a4' has no attribute 'entropy_decode_index' error after a clean intall of tensorflow federated (TFF) on Ubuntu 22.04. System: AMD 6900HS, ...
0
votes
1
answer
807
views
Flower running the server and clients on different machines
I use Flower API for federated learning applications. Is there any way to run the server and clients on different machines for a real-world benchmark?
0
votes
0
answers
157
views
Cannot install and import tensorflow_federated in colab
I want to try a simple federated learning example in python. For it, I need to import tensorflow_federated package.
import tensorflow_federated as tff
Here is the stack trace
TypeError ...
3
votes
1
answer
6k
views
AttributeError: 'Model' object has no attribute '_backward_hooks'
Trying to implement the reaserch paper:
https://ieeexplore.ieee.org/document/9479786/
Training a Monotone Network with architechture:
class Model(nn.Module):
def __init__(self, q, s):
self....
0
votes
1
answer
236
views
Federated learning weighted aggregation
I would like to add different weights to clients in Federated learning, so in the aggregation stage, each client has a different impact on the global model.
For example:
Client_1 has 2X impact
...
0
votes
0
answers
166
views
Adaptive top-k selection in machine learning
In federated/ distributed learning, the server will send initially a global model to clients, and each client will train the model locally and then select the top k values, and send only these values ...
1
vote
1
answer
295
views
Noise addition to weights using Opacus in a Federated Learning setting
I am planning to use Opacus to implement differential privacy in my federated learning model but I have a very basic doubt that I would love to have cleared before that.
So as far as my understanding ...
3
votes
2
answers
782
views
AttributeError: module 'syft' has no attribute 'FederatedDataLoader'
I have just started using pysyft to implement federated-learning. While following one of the tutorials, I got stuck on an error:
Code which I have used:
import torch
import torch.nn as nn
import ...
0
votes
1
answer
245
views
Federated learning
I have two kinds of covid 19 datasets as two clients (the first one ST Scan images and the second is XRays images) and I use federated learning approch.
The question is can I use those dataset as two ...
1
vote
1
answer
215
views
TypeError: Expected keras.losses.Loss, found function
I want to build a TFF model for speech recognition systems. For this, I use the CNN-GRU model architecture with a CTC loss function. but I got error when I wanted to build_federated_averaging_process ...
1
vote
0
answers
305
views
How to build a federated system with CSV dataset with SparkNL library?
I am very interested in federated systems and i was trying one of the pre trained multilingual models such as this notebook Multi_Lingual_Training_and_models.
I was looking for any tutorials using TFF ...
0
votes
1
answer
344
views
I'm getting an **NumPyClient.fit did not return a tuple with 3 elements.** error when I run client.py file. What could be the problem? [closed]
I am using the Flower code example to try POC of Federated Learning but I keep getting the error below when I run the client.py file:
INFO flower 2022-07-04 15:27:37,301 | connection.py:102 | Opened ...
2
votes
0
answers
229
views
In FedAvg what is the client optimizer?
In federated averaging, does the client optimizer have to be 'SGD' only?
In this paper ADAPTIVE FEDERATED OPTIMIZATION it states "One such method is FEDAVG (McMahan et al., 2017), in which ...