cache_model_1: save client training partitions as standalone lists, not Subset (each client's data.pt holds the full training set)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- machine-learning
Hướng nghiên cứu
Bắt đầu tại cache_model_1/prepare_training_data.py, ở dòng Subset(full_train, indices[start:end]) và lời gọi torch.save ngay bên dưới, sau đó so sánh với mẫu danh sách cặp trong cid_services/distribute_mnist.py quanh các dòng 115-117. Chuyển bước chia và lưu ra khỏi main() vào một hàm nhận một tập dữ liệu tổng hợp, và kiểm tra rằng đường dẫn DataLoader trong client.py vẫn tải được tệp. Việc được coi là hoàn tất khi một bài kiểm thử với 10 ví dụ sentinel và 3 tài khoản cho thấy mỗi tệp chỉ chứa các ví dụ của riêng nó, không có thuộc tính .dataset, và số lượng giống như trước.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 4
- Fork
- 7
- Merge trung bình
- 5 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 43
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của InfiniteZeroFoundation/DevNet
-
Update the 25 translated organisation READMEs to match the English versionCó thể đã có người làm @mrCabez đã nhận 15 ngày trước. Đang mởgood first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
InfiniteZeroFoundation/DevNet#277 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Validator income: separate protocol (i.e., network) fees from DIN issuance, stop calling both "rewards", and keep DIN for stakingCó thể đã có người làm @umermjd11 đã nhận hôm nay. Đang mởenhancement
InfiniteZeroFoundation/DevNet#340 · 3 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Make reference auditors honor `audit_scoring_policy` in the manifestCó thể đã có người làm @0xzoz đã nhận 1 ngày trước. Đang mởApproved
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 54/100
InfiniteZeroFoundation/DevNet#330 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Serialize only assigned audit examples, not the full parent datasetCó thể đã có người làm @0xzoz đã nhận 1 ngày trước. Đang mởApproved
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
InfiniteZeroFoundation/DevNet#329 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Remove plaintext audit dataset keys from model-owner CLI outputCó thể đã có người làm @0xzoz đã nhận 1 ngày trước. Đang mởApproved
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 58/100
InfiniteZeroFoundation/DevNet#328 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InfiniteZeroFoundation/DevNet
Issue tương tự
-
Email validation accepts a trailing newlineCó thể đã có người làm @marcello-pichini đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Contributing instructionsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dbt-labs/spark-utils#51 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
vendrabuck/HERD#1419 ·
Maintainer thường phản hồi trong vòng 1 ngày