cache_model_1: save client training partitions as standalone lists, not Subset (each client's data.pt holds the full training set)
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 70/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Bereich
- machine-learning
Rechercherichtung
Beginne in cache_model_1/prepare_training_data.py bei der Zeile Subset(full_train, indices[start:end]) und beim darunterliegenden Aufruf von torch.save, vergleiche dann mit dem Muster der Liste von Paaren in cid_services/distribute_mnist.py um die Zeilen 115-117. Verschiebe den Schritt zum Aufteilen und Speichern aus main() in eine Funktion, die einen synthetischen Datensatz entgegennimmt, und prüfe, ob der DataLoader-Pfad in client.py die Datei weiterhin lädt. Fertig ist es, wenn ein Test mit 10 Sentinel-Beispielen und 3 Konten zeigt, dass jede Datei nur ihre eigenen Beispiele enthält, ohne das Attribut .dataset und mit denselben Anzahlen wie zuvor.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Follow-up from the approval review of issue No. 329, which found this writer and left it out of that PR. Checked against origin/develop @ c871ed1.
Problem
cache_model_1/prepare_training_data.py splits the Fashion-MNIST training set across client accounts by saving a torch.utils.data.Subset for each client:
cache_model_1/prepare_training_data.py:107:subset = Subset(full_train, indices[start:end]):112:torch.save(subset, str(dest))
A Subset keeps a reference to its parent dataset, and torch.save serializes that parent too. So every client's data.pt contains all 60,000 training examples, not just its share. This is the same pattern issue No. 329 fixes for the audit shards.
Training itself is unaffected. cache_model_1/services/client.py:486 loads the file, and :508 iterates a DataLoader over it, which uses only the client's own indices. The problems are that each client's file includes the other clients' partitions, and each file is the size of the full training set.
Severity
This is low. The script is the local setup step from Documentation/public/guides/fashion-mnist-cnn.md (Step 2) and runs on public Fashion-MNIST, so no private data is exposed today. It matters because the script is the example that model owners copy. A real deployment with private client data that followed it would hand every client everyone else's data.
Proposed change
Save each partition as a standalone list of (image, label) pairs instead of a Subset. cid_services/distribute_mnist.py:115-117 already does this for MNIST:
subset_data = [(train_dataset[idx][0], train_dataset[idx][1]) for idx in idxs]
torch.save(subset_data, save_path)
Keep the existing split unchanged: the same contiguous ranges, with the remainder going to the last client. Keep the output path and the printed per-client counts too.
Out of scope
- The audit shards (
cache_model_*/services/modelowner.py:237), which are issue No. 329. - Changing the partitioning scheme (for example to shuffled or non-IID splits).
Acceptance criteria
- A test runs the partitioning on a small synthetic training set with recognizable sentinel examples, for example one with 10 examples and 3 accounts. After
torch.load, each client's file holds exactly its own examples, has no.datasetattribute, and contains no other client's sentinels. - Each client gets the same sample count it gets today, including the remainder going to the last client.
client.py'sDataLoaderpath still loads and iterates the file unchanged.- The test needs no network access. Factor the split-and-save step out of
main()so it can run without downloading Fashion-MNIST.
- Vorherrschende Sprache
- Python
- Sterne
- 4
- Forks
- 7
- Ø Merge
- 5 T. 15 Std.
- Gemergte PRs (30 T.)
- 43
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus InfiniteZeroFoundation/DevNet
-
Update the 25 translated organisation READMEs to match the English versionEvtl. vergeben @mrCabez hat das vor 15 Tagen übernommen. Offengood first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
InfiniteZeroFoundation/DevNet#277 · 3 Kommentare · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
Validator income: separate protocol (i.e., network) fees from DIN issuance, stop calling both "rewards", and keep DIN for stakingEvtl. vergeben @umermjd11 hat das heute übernommen. Offenenhancement
InfiniteZeroFoundation/DevNet#340 · 3 zugewiesene Personen ·
Maintainer antworten meist innerhalb von 1 Tag
-
Make reference auditors honor `audit_scoring_policy` in the manifestEvtl. vergeben @0xzoz hat das vor 2 Tagen übernommen. OffenApproved
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 54/100
InfiniteZeroFoundation/DevNet#330 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Serialize only assigned audit examples, not the full parent datasetEvtl. vergeben @0xzoz hat das vor 2 Tagen übernommen. OffenApproved
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 48/100
InfiniteZeroFoundation/DevNet#329 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Remove plaintext audit dataset keys from model-owner CLI outputEvtl. vergeben @0xzoz hat das vor 2 Tagen übernommen. OffenApproved
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 58/100
InfiniteZeroFoundation/DevNet#328 · 5 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in InfiniteZeroFoundation/DevNet
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
OCA/account-invoicing#2529 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/ci
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textOffenbug imagen skills
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Email validation accepts a trailing newlineEvtl. vergeben @marcello-pichini hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag