huggingface / huggingface/candle

Suggestion to make docs (/candle/training/simplified.html) work better with copy/paste, and fix grammar.

Open
#1,357 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
21k
Forks
1.8k
Avg merge
16h 42m
Merged PRs (30d)
25

Description

A few changes would make the "Candle Documentation" code at [/candle/training/simplified.html](https://huggingface.github.io/candle/training/simplified.html) work more simply if copy/pasted into a new `main.rs` file.

1. Add `use` statements with `// ANCHOR: book_training_simplified0`
2. Move `// ANCHOR: book_training_simplified3` below `#[tokio::test]` to exclude it from copy.
3. Change function name from `simplified()` to `main()`.
4. Add comment to remove `async`.

If there is a better way than reminding user to remove `async` that would be great.

Since this is not a perfect solution I have pushed changes to my repo for consideration instead of sending a PR.
Compare here:
https://github.com/huggingface/candle/compare/main...danielclough:candle:change_docs_1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with candle/training/simplified.html and compare it with the referenced change_docs_1 branch. Review the code around book_training_simplified0 and book_training_simplified3, then verify that the documented snippet can be copied into main.rs with the requested imports, function name, anchor placement, and async guidance, while correcting the grammar.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.