1. DeepChem: preserve graph ownership through a batch
Start with graph batching. A local edge index is meaningful only inside its graph. When several graphs share a batch, both endpoints must be translated using the cumulative number of preceding nodes. The historical DeepChem repair in pull request #3291 corrects an offset that used only the previous graph’s size.
The investigation follows a complete round trip: pack graphs, recover selected graphs through node and edge boundaries, then repack a reordered selection that may contain duplicates or empty graphs. Keep node features, edge features, connectivity and graph ownership aligned. Selection and round-trip outputs are teaching extensions that expose the consequences of the original offset defect.
- Draw local node indices beside physical batch positions for at least three unequal graphs.
- Track node and edge boundaries independently through empty graphs.
- Check that reordering and duplicate selection preserve each graph’s own features and edge order.
2. PyTorch-Ignite: restore every sufficient statistic
A streaming mutual-information metric combines accumulated class probabilities, observation entropy and the number of observations. Saving only a subclass’s probability accumulator loses inherited state. Ignite pull request #3857 repairs that omission: a fresh destination lacks enough state to compute, while an updated destination can mix incompatible old and restored statistics.
Trace named metrics and saved checkpoints through updates, fresh and dirty restoration, resets and repeated computation. Saved snapshots must remain independent of later updates, and resumed evaluation must agree with an uninterrupted observation stream. The exercise supplies small probability-weight rows instead of logits and tensors; its empty-state and rounding policies are explicit.
- List every state field needed by the derived formula.
- Compare fresh restoration, dirty restoration and uninterrupted continuation.
- Verify that repeated reads and later mutations cannot change a saved checkpoint.
3. PyTorch: restore nested state to the live owner
Optimizer restoration must connect saved parameter identifiers to the live parameter groups before interpreting nested state. PyTorch pull request #3658 addresses restoration of tensor state to its owning parameter’s dtype and device. The exercise follows that ownership map through dictionaries and lists while preserving metadata that has no parameter owner.
Use differently ordered identifiers and several live owner descriptors, then mutate restored state and restore again. The saved checkpoint must remain reusable. This is a structural model: dtype and device are explicit metadata, with no actual precision conversion, accelerator allocation or optimizer training step. The historical repair is scoped to the documented mechanism; it is not a claim that every related optimizer loading issue was resolved.
- Write the saved-slot to live-parameter map before walking nested values.
- Distinguish tensor descriptors from ordinary nested metadata.
- Test unrelated owners, global state and checkpoint isolation after a restored value changes.
4. PyTorch: distinguish logical positions from shared storage
A strided view can map several logical positions to the same physical storage address. Gradients from overlapping output positions must accumulate at that address. When input positions also alias, returning the same total to every alias overcounts the contribution; the storage gradient must account for the input multiplicity before gathering results in logical input order.
This lesson isolates the overlapping-view backward mechanism documented in PyTorch pull request #8721, which was a partial historical repair. Track shapes, strides and nonzero offsets explicitly. Combine output overlap, input overlap and both at once, then protect noncontiguous views, unused storage locations and empty dimensions. The exercise’s bounded address geometry is a reduction of the upstream autograd implementation.
- Enumerate each logical position’s storage address.
- Accumulate repeated output contributions before accounting for repeated input addresses.
- Compare a storage-address table with the final row-major logical gradient.
5. Make a hard investigation reviewable
For each lesson, keep a small failing input, a state or address table, a focused regression and a minimal repair. Explain which invariant fails first and how it produces the observed output. Protect ordinary inputs as well as the combined edge case that exposes the bug.
After acceptance, compare your reasoning with the linked historical patch. For an actual contribution, read the current project instructions and reproduce a current problem on a supported checkout. PyTorch’s contribution guide describes its issue and pull-request workflow; Ignite and DeepChem have their own setup and review conventions. These historical fixes are learning material, and future GSoC participation must be checked separately.
- Show the first invalid state and the downstream symptom.
- Name the framework context removed by the teaching reduction.
- Record focused checks and relevant resource limits.
- Link a current issue when preparing an upstream contribution.
Further reading
Start with primary reports and documentation. Community discussions are discovery leads, not evidence on their own.
- DeepChem: cumulative graph batching repair #3291
- PyTorch-Ignite: inherited checkpoint state repair #3857
- PyTorch: optimizer state restoration repair #3658
- PyTorch: closed optimizer restoration report #2830
- PyTorch: overlapping strided-view backward repair #8721
- PyTorch: autograd mechanics and saved tensor context
- PyTorch: contribution and issue workflow
- PyTorch-Ignite: contribution instructions
- DeepChem: contribution instructions
- NumFOCUS: 2026 ideas including PyTorch-Ignite