View in #questions on Slack
@Luca_Corbucci: Hi, I am trying to use FederatedDataset and IidPartitioner with a dataset that is not on the Hugginface hub. Is this possible? I’d like to load the dataset from a csv and then split it using the partitioner. Thanks!
@Manjil: I think you can make use of this function. https://github.com/adap/flower/blob/main/examples/embedded-devices/embeddedexample/task.py#L44
OR
You can push your dataset into Hugging Face, as flwr is easy to work with the Hugging Face dataset.
@Luca_Corbucci: Hi, thanks for the reply, yes in the end I found that I can use the FederatedDataset with a csv loaded from disk using
fds = FederatedDataset(
dataset=“csv”,
partitioners={“train”: partitioner},
data_files={“train”: “my_file.csv”},
)
@Chong_Shen: Good that you solved it @Luca_Corbucci! For future reference, here’s the guide for using Flower Datasets with a your local datasets: https://flower.ai/docs/datasets/how-to-use-with-local-data.html