adap / flower

Flower: A Friendly Federated Learning Framework
https://flower.ai
Apache License 2.0
4.92k stars 848 forks source link

fix(datasets) Fix pathological partitioner on string labels #4253

Open adam-narozniak opened 6 days ago

adam-narozniak commented 6 days ago

Issue

In "first-deterministic" mode, when the label is a string, an index instead of a true label gets assigned.

Proposal

Adjust the assignment to use an index from the unique labels list. Update tests to tests against string labels.