Problem: Conveting weights from local to global #2121
-
Hello, The above exception was the direct cause of the following exception: Traceback (most recent call last):
To run the experiment I use the code: nvflare simulator -w /my-workspace/my-workspace/test -n 2 -t 2 NVFlare/jobs/cifar10_fedavg |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
@LeandroDiL this is a bit hard to follow without your codes. |
Beta Was this translation helpful? Give feedback.
-
@YuanTingHsieh ty for your response. I have already tried to run the example and all is working fine locally running the ./run_experiment bash file or with the nvflare simulator. All worked fine even when I tried to run it in 2 embedded devices using the NVFlare provisiong tool. About the code the only thing that is different from the example is the initialize method in the cifar10_learner.py file. Infact I modified it into:
In order to manage numeric data and the transformation before the DataLoader I used a CustomDataset like below: `class CustomDataset(Dataset):
Obviously in order to adapt the model to the new numeric data different from a CIFAR-10 dataset based on image I used the following model: `class CustomModel(nn.Module):
This code lead to a problem switching from global to local weights like described in the previous post. I'm sure the model and the managing of the data is fine since I already managed to make it work on other FL frameworks. Ty in advance! |
Beta Was this translation helpful? Give feedback.
Looks like there is a mismatch between the global model and local model architectures. Did you update the persistor in config_fed_server.json to initialize/load your custom model architecture?