cache_model_1: save client training partitions as standalone lists, not Subset (each client's data.pt holds the full training set)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 70/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Área
- machine-learning
Línea de trabajo
Empieza en cache_model_1/prepare_training_data.py en la línea Subset(full_train, indices[start:end]) y la llamada a torch.save debajo de ella, y luego compara con el patrón de lista de pares en cid_services/distribute_mnist.py alrededor de las líneas 115-117. Mueve el paso de dividir y guardar fuera de main() a una función que reciba un dataset sintético, y comprueba que la ruta del DataLoader en client.py sigue cargando el archivo. Está terminado cuando una prueba con 10 ejemplos centinela y 3 cuentas muestre que cada archivo contiene solo sus propios ejemplos, sin atributo .dataset y con los mismos recuentos que antes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 4
- Forks
- 7
- Merge medio
- 5 d 15 h
- PR fusionados (30 d)
- 43
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de InfiniteZeroFoundation/DevNet
-
Update the 25 translated organisation READMEs to match the English versionPosiblemente ocupada @mrCabez la tomó hace 15 días. Abiertogood first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InfiniteZeroFoundation/DevNet#277 · 3 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
Validator income: separate protocol (i.e., network) fees from DIN issuance, stop calling both "rewards", and keep DIN for stakingPosiblemente ocupada @umermjd11 la tomó hoy. Abiertoenhancement
InfiniteZeroFoundation/DevNet#340 · 3 asignados ·
Los mantenedores suelen responder en 1 día
-
Make reference auditors honor `audit_scoring_policy` in the manifestPosiblemente ocupada @0xzoz la tomó hace 1 día. AbiertoApproved
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
InfiniteZeroFoundation/DevNet#330 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Serialize only assigned audit examples, not the full parent datasetPosiblemente ocupada @0xzoz la tomó hace 1 día. AbiertoApproved
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
InfiniteZeroFoundation/DevNet#329 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Remove plaintext audit dataset keys from model-owner CLI outputPosiblemente ocupada @0xzoz la tomó hace 1 día. AbiertoApproved
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
InfiniteZeroFoundation/DevNet#328 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de InfiniteZeroFoundation/DevNet
Issues similares
-
Contributing instructionsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
pydantic/pydantic-ai#13444 ·
Los mantenedores suelen responder en 1 día
-
good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
good first issue help wanted
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
-
changelog investigate
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
ramnes/notion-sdk-py#502 ·