Datasets:
adamnarozniak
commited on
Commit
•
8c77eda
1
Parent(s):
982234a
Update README.md
Browse files
README.md
CHANGED
@@ -107,11 +107,11 @@ pip install flwr-datasets[audio]
|
|
107 |
2. Use the HF Dataset under the hood in Flower Datasets.
|
108 |
```python
|
109 |
from flwr_datasets import FederatedDataset
|
110 |
-
from flwr_datasets.partitioner import
|
111 |
|
112 |
fds = FederatedDataset(
|
113 |
dataset="flwrlabs/ambient-acoustic-context",
|
114 |
-
partitioners={"train":
|
115 |
)
|
116 |
partition = fds.load_partition(partition_id=0)
|
117 |
```
|
|
|
107 |
2. Use the HF Dataset under the hood in Flower Datasets.
|
108 |
```python
|
109 |
from flwr_datasets import FederatedDataset
|
110 |
+
from flwr_datasets.partitioner import NaturalIdPartitioner
|
111 |
|
112 |
fds = FederatedDataset(
|
113 |
dataset="flwrlabs/ambient-acoustic-context",
|
114 |
+
partitioners={"train": NaturalIdPartitioner(partition_by="speaker_id")}
|
115 |
)
|
116 |
partition = fds.load_partition(partition_id=0)
|
117 |
```
|