# How to use multiple datasets to train heterogeneous clients?

**URL:** <https://discuss.flower.ai/t/how-to-use-multiple-datasets-to-train-heterogeneous-clients/1177>\
**Category:** Flower Help - Intermediate\
**Tags:** flower, datasets\
**Created:** [December 31, 2025, 9:52am UTC](https://discuss.flower.ai/t/how-to-use-multiple-datasets-to-train-heterogeneous-clients/1177 "2025-12-31T09:52:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rakeshpaul](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rakeshpaul](https://discuss.flower.ai/u/rakeshpaul)\
**Post date:** [December 31, 2025, 9:52am UTC](https://discuss.flower.ai/t/how-to-use-multiple-datasets-to-train-heterogeneous-clients/1177/1 "2025-12-31T09:52:17Z")

</div>

Hi,

So I have multiple datasets with me, and I want to train each client on a particular dataset. For example, if I have 10 datasets, I would have 10 clients, and each client would be trained on a specific dataset. I am unable to figure this out. The examples given in the documentation are unable to answer this question of mine. I see that the flower itself divides the dataset and sends that to the client. This is okay in an experimental setting, but in a daily production use case, each client would have its own dataset.

---

<div class="post-metadata">

**Author:** ![mohammad](https://dub1.discourse-cdn.com/flex013/user_avatar/discuss.flower.ai/mohammad/32/35_2.png) [@mohammad](https://discuss.flower.ai/u/mohammad)\
**Post date:** [December 31, 2025, 10:25am UTC](https://discuss.flower.ai/t/how-to-use-multiple-datasets-to-train-heterogeneous-clients/1177/2 "2025-12-31T10:25:18Z")

</div>

Hi @rakeshpaul,  
Thanks for the question. It depends on whether you’re using Flower in simulation or production. In production, each client is a separate process/device and **l** oads its own local dataset e.g. via a local path, DB, or env var etc.  
In simulation, all clients run on one machine, so you simulate “local datasets” by using `cid` to map each client ID to a different dataset.

---

<div class="post-metadata">

**Author:** ![rakeshpaul](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rakeshpaul](https://discuss.flower.ai/u/rakeshpaul)\
**Post date:** [January 16, 2026, 6:45am UTC](https://discuss.flower.ai/t/how-to-use-multiple-datasets-to-train-heterogeneous-clients/1177/3 "2026-01-16T06:45:46Z")

</div>

Hi @mohammad,

Thanks for your reply. I’m testing it out on my own system, so it’s a local simulation. I understand that I need each client to run on a different terminal, and the server would use the local port of the machine.

How should I be running it then?

```auto
flwr run . --run-config dataset/path/for/specific/client

```

Should it be like the command shown above? Would this create issues on the server side? Or do we have to run it in some other commands?
