cache_model_1: save client training partitions as standalone lists, not Subset (each client's data.pt holds the full training set)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 70/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
調査の方向性
cache_model_1/prepare_training_data.py の Subset(full_train, indices[start:end]) の行と、その下にある torch.save の呼び出しから始め、次に cid_services/distribute_mnist.py の 115〜117 行目付近にあるペアのリストのパターンと比較してください。分割と保存の処理を main() から取り出し、合成データセットを受け取る関数にまとめ、client.py の DataLoader のパスが今もそのファイルを読み込めることを確認してください。10 個のセンチネル例と 3 つのアカウントを使ったテストで、各ファイルが自分の例だけを含み、.dataset 属性がなく、以前と同じ件数であることが示されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 4
- フォーク
- 7
- 平均マージ
- 5日 15時間
- マージ済み PR(30日)
- 43
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InfiniteZeroFoundation/DevNet のほかの issue
-
Update the 25 translated organisation READMEs to match the English version対応中かも @mrCabez が 15 日前に担当しました。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InfiniteZeroFoundation/DevNet#277 · コメント 3 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Validator income: separate protocol (i.e., network) fees from DIN issuance, stop calling both "rewards", and keep DIN for staking対応中かも @umermjd11 が今日担当しました。 オープンenhancement
InfiniteZeroFoundation/DevNet#340 · 担当者 3 名 ·
メンテナーはふだん 1 日以内に返信
-
Make reference auditors honor `audit_scoring_policy` in the manifest対応中かも @0xzoz が 1 日前に担当しました。 オープンApproved
難易度 4/5 3〜5日 初心者へのやさしさ 54/100
InfiniteZeroFoundation/DevNet#330 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Serialize only assigned audit examples, not the full parent dataset対応中かも @0xzoz が 1 日前に担当しました。 オープンApproved
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
InfiniteZeroFoundation/DevNet#329 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
Remove plaintext audit dataset keys from model-owner CLI output対応中かも @0xzoz が 1 日前に担当しました。 オープンApproved
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
InfiniteZeroFoundation/DevNet#328 · コメント 5 件 ·
メンテナーはふだん 1 日以内に返信
InfiniteZeroFoundation/DevNet の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pydantic/pydantic-ai#13444 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
good first issue help wanted
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
changelog investigate
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
ramnes/notion-sdk-py#502 ·