Skip to content

docs: improve onboarding docs and add Debug for Gradients#3

Merged
shinaoka merged 1 commit intomainfrom
fix/onboarding-docs-and-debug
Mar 25, 2026
Merged

docs: improve onboarding docs and add Debug for Gradients#3
shinaoka merged 1 commit intomainfrom
fix/onboarding-docs-and-debug

Conversation

@shinaoka
Copy link
Copy Markdown
Member

Summary

  • Add Getting Started section to README with Cargo.toml dependency lines for both tidu and chainrules (critical onboarding blocker: new users' first build failed)
  • Add conceptual overview to lib.rs explaining the low-level tape/rule/pullback model and the companion chainrules crate
  • Add inline comments to all rustdoc examples explaining record_op's third parameter, pullback() vs pullback_with_seed(), and HVP
  • Implement Debug for Gradients<V> where V::Tangent: Debug (enables idiomatic unwrap_err())

Findings from a simulated new-user onboarding test across all 4 features.

Test plan

  • cargo fmt --all passes
  • cargo clippy --workspace passes (only pre-existing warning)
  • cargo nextest run --release --workspace — 60/60 pass
  • cargo test --doc --release --workspace — 24/24 pass (1 ignored)
  • Coverage thresholds met (5/5 files)

🤖 Generated with Claude Code

- Add Getting Started section to README with Cargo.toml dependency lines
  for both tidu and chainrules (resolves critical onboarding blocker)
- Add conceptual overview to lib.rs explaining the low-level AD model
  and the companion chainrules crate
- Add inline comments to all rustdoc examples explaining record_op's
  third parameter (output_tangent) and pullback vs pullback_with_seed
- Document that pullback() requires scalar loss and pullback_with_seed()
  is needed for non-scalar outputs
- Document record_op parameters and leaf-only gradient storage
- Add HVP conceptual intro explaining forward-over-reverse mode
- Implement Debug for Gradients<V> where V::Tangent: Debug

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@shinaoka shinaoka enabled auto-merge (squash) March 25, 2026 02:26
@shinaoka shinaoka merged commit 4e52e38 into main Mar 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant