cache_model_1: save client training partitions as standalone lists, not Subset (each client's data.pt holds the full training set)
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- machine-learning
Direzione di ricerca
Inizia da cache_model_1/prepare_training_data.py alla riga Subset(full_train, indices[start:end]) e alla chiamata torch.save subito sotto, poi confronta con il pattern a lista di coppie in cid_services/distribute_mnist.py intorno alle righe 115-117. Sposta il passaggio di suddivisione e salvataggio fuori da main() in una funzione che riceve un dataset sintetico, e verifica che il percorso DataLoader in client.py carichi ancora il file. È completato quando un test con 10 esempi sentinella e 3 account mostra che ogni file contiene solo i propri esempi, senza attributo .dataset e con gli stessi conteggi di prima.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 4
- Fork
- 7
- Merge medio
- 5g 15h
- PR unite (30g)
- 43
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di InfiniteZeroFoundation/DevNet
-
Update the 25 translated organisation READMEs to match the English versionForse già presa @mrCabez l’ha presa 15 giorni fa. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
InfiniteZeroFoundation/DevNet#277 · 3 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Validator income: separate protocol (i.e., network) fees from DIN issuance, stop calling both "rewards", and keep DIN for stakingForse già presa @umermjd11 l’ha presa oggi. Apertaenhancement
InfiniteZeroFoundation/DevNet#340 · 3 assegnatari ·
I maintainer di solito rispondono entro 1 giorno
-
Make reference auditors honor `audit_scoring_policy` in the manifestForse già presa @0xzoz l’ha presa 1 giorno fa. ApertaApproved
Difficoltà 4/5 3-5 giorni Idoneità per principianti 54/100
InfiniteZeroFoundation/DevNet#330 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Serialize only assigned audit examples, not the full parent datasetForse già presa @0xzoz l’ha presa 1 giorno fa. ApertaApproved
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
InfiniteZeroFoundation/DevNet#329 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Remove plaintext audit dataset keys from model-owner CLI outputForse già presa @0xzoz l’ha presa 1 giorno fa. ApertaApproved
Difficoltà 4/5 3-5 giorni Idoneità per principianti 58/100
InfiniteZeroFoundation/DevNet#328 · 5 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di InfiniteZeroFoundation/DevNet
Issue simili
-
Contributing instructionsAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
pydantic/pydantic-ai#13444 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
-
changelog investigate
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
ramnes/notion-sdk-py#502 ·