FedML-AI / FedML-AI/SpreadGNN

consult

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
50
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Hello professor:
when I run your code, I have some problem.
###
Traceback (most recent call last):
File "D:/Federated_learning/SpreadGNN_torch/utils/data_loader.py", line 216, in
load_data(args)
File "D:/Federated_learning/SpreadGNN_torch/utils/data_loader.py", line 189, in load_data
train_data_local_dict[client] = data.DataLoader(train_dataset_client, batch_size=1, shuffle=True,
File "C:\miniconda\envs\pytorch-gpu\lib\site-packages\torch\utils\data\dataloader.py", line 353, in __init__
sampler = RandomSampler(dataset, generator=generator) # type: ignore[arg-type]
File "C:\miniconda\envs\pytorch-gpu\lib\site-packages\torch\utils\data\sampler.py", line 107, in __init__
raise ValueError("num_samples should be a positive integer "
ValueError: num_samples should be a positive integer value, but got num_samples=0

![image](https://user-images.githubusercontent.com/60030314/232000458-4b0aa62b-ea01-4635-9d1c-7ea38e9d02e6.png)

###
It means when I use the function create_non_uniform_split(), client will get no dataset. So if this problem appears, the torch function DataLoader doesn't compile. How do you solve this problem?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.