SMILELab-FL / FedLab

A flexible Federated Learning Framework based on PyTorch, simplifying your Federated Learning research.
https://fedlab.readthedocs.io
Apache License 2.0
743 stars 127 forks source link

tutorial for training sent140 #341

Closed Young1403 closed 1 year ago

Young1403 commented 1 year ago

Hello, is there a tutorial for training sent140? Change the minist example to sent140, how to change the dataset interface? Hope to get your reply! Thank you~

dunzeng commented 1 year ago

We provide docs of using Leaf here.

Young1403 commented 1 year ago

@Zengdun-cs I replaced the MNIST data interface with Sent140 in the 'examples/standalone-mnist/standalone.py' script, and when I run it, I get the following traceback:

Traceback (most recent call last): File "standalone.py", line 76, in pipeline.main() File "../../fedlab/core/standalone.py", line 40, in main self.trainer.local_process(broadcast, sampled_clients) File "../../fedlab/contrib/algorithm/basic_client.py", line 139, in local_process data_loader = self.dataset.get_dataloader(id, self.batch_size) AttributeError: 'Sent140Dataset' object has no attribute 'get_dataloader'.

How should I handle this? Can you provide a complete example of running Sent140 training? Thank you very much.

Young1403 commented 1 year ago

I have solved it. thanks