cache_model_1: save client training partitions as standalone lists, not Subset (each client's data.pt holds the full training set)
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 70/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Domaine
- machine-learning
Piste de recherche
Commence dans cache_model_1/prepare_training_data.py à la ligne Subset(full_train, indices[start:end]) et à l'appel torch.save juste en dessous, puis compare avec le motif de liste de paires dans cid_services/distribute_mnist.py autour des lignes 115-117. Sors l'étape de découpage et de sauvegarde de main() pour la placer dans une fonction qui prend un jeu de données synthétique, et vérifie que le chemin DataLoader de client.py charge toujours le fichier. C'est terminé lorsqu'un test avec 10 exemples sentinelles et 3 comptes montre que chaque fichier ne contient que ses propres exemples, sans attribut .dataset et avec les mêmes effectifs qu'auparavant.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 4
- Forks
- 7
- Merge moyen
- 5 j 15 h
- PR mergées (30 j)
- 43
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de InfiniteZeroFoundation/DevNet
-
Update the 25 translated organisation READMEs to match the English versionPeut-être pris @mrCabez l’a pris il y a 15 jours. Ouvertegood first issue help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
InfiniteZeroFoundation/DevNet#277 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
Validator income: separate protocol (i.e., network) fees from DIN issuance, stop calling both "rewards", and keep DIN for stakingPeut-être pris @umermjd11 l’a pris aujourd’hui. Ouverteenhancement
InfiniteZeroFoundation/DevNet#340 · 3 personnes assignées ·
Les mainteneurs répondent en général sous 1 jour
-
Make reference auditors honor `audit_scoring_policy` in the manifestPeut-être pris @0xzoz l’a pris il y a 2 jours. OuverteApproved
Difficulté 4/5 3-5 jours Accessibilité débutants 54/100
InfiniteZeroFoundation/DevNet#330 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Serialize only assigned audit examples, not the full parent datasetPeut-être pris @0xzoz l’a pris il y a 2 jours. OuverteApproved
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
InfiniteZeroFoundation/DevNet#329 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Remove plaintext audit dataset keys from model-owner CLI outputPeut-être pris @0xzoz l’a pris il y a 2 jours. OuverteApproved
Difficulté 4/5 3-5 jours Accessibilité débutants 58/100
InfiniteZeroFoundation/DevNet#328 · 5 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de InfiniteZeroFoundation/DevNet
Issues similaires
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
OCA/account-invoicing#2529 ·
Les mainteneurs répondent en général sous 1 jour
-
area/ci
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
ImageGen generate-batch aborts valid JSONL jobs containing a Unicode line separator in poster textOuvertebug imagen skills
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Email validation accepts a trailing newlinePeut-être pris @marcello-pichini l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour