adamnarozniak
commited on
Commit
•
a3ee264
1
Parent(s):
81e0d93
Update Direct Use
Browse files
README.md
CHANGED
@@ -40,16 +40,24 @@ This dataset is intended to be used in Federated Learning settings.
|
|
40 |
A pair of a character and a play denotes a unique user in the federation.
|
41 |
|
42 |
### Direct Use
|
|
|
43 |
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
|
54 |
## Dataset Structure
|
55 |
|
@@ -128,4 +136,4 @@ When working on the LEAF benchmark, please cite the original paper. If you're us
|
|
128 |
|
129 |
## Dataset Card Contact
|
130 |
|
131 |
-
In case of any doubts, please contact Flower Labs.
|
|
|
40 |
A pair of a character and a play denotes a unique user in the federation.
|
41 |
|
42 |
### Direct Use
|
43 |
+
This dataset is designed to be used in FL settings. We recommend using [Flower Dataset](https://flower.ai/docs/datasets/) (flwr-datasets) and [Flower](https://flower.ai/docs/framework/) (flwr).
|
44 |
|
45 |
+
To partition the dataset, do the following.
|
46 |
+
1. Install the package.
|
47 |
+
```bash
|
48 |
+
pip install flwr-datasets
|
49 |
+
```
|
50 |
+
2. Use the HF Dataset under the hood in Flower Datasets.
|
51 |
+
```python
|
52 |
+
from flwr_datasets import FederatedDataset
|
53 |
+
from flwr_datasets.partitioner import NaturalIdPartitioner
|
54 |
+
|
55 |
+
fds = FederatedDataset(
|
56 |
+
dataset="flwrlabs/shakespeare",
|
57 |
+
partitioners={"train": NaturalIdPartitioner(partition_by="character_id")}
|
58 |
+
)
|
59 |
+
partition = fds.load_partition(node_id=0)
|
60 |
+
```
|
61 |
|
62 |
## Dataset Structure
|
63 |
|
|
|
136 |
|
137 |
## Dataset Card Contact
|
138 |
|
139 |
+
In case of any doubts, please contact [Flower Labs](https://flower.ai/).
|