Skip to content

[Docs] Fix runnable examples in English Hub guides - #5297

Open
Wauplin wants to merge 1 commit into
mainfrom
Wauplin/look-at-changes-4db4e688
Open

Wauplin wants to merge 1 commit into
mainfrom
Wauplin/look-at-changes-4db4e688

Conversation

@Wauplin

@Wauplin Wauplin commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Narrower re-open of #5223: English docs only (17 files under docs/source/en/), no translations, and the advanced task scheduler / ZipScheduler examples are left untouched. No library code changes.

  • CLI: hf repos settings docs use --private / --public flags instead of --private true|false.
  • Fix snippets that fail with the current API: create_repo(...).repo_id, exist_ok, library_name, space_sleep_time as int, try_to_load_from_cache arguments, list_collections(sort="lastModified"), api.list_models / api.list_datasets variable names.
  • Inference guide: continuation prompts (...) in multi-line examples, chat_completion instead of text_to_image(...) placeholders; await asyncio.gather(...) in the Inference Endpoints guide.
  • Integrations guide: fix __init__ signatures, nn.Linear args and indentation in the mixin examples.
  • Fix HfFileSystem bucket path and CSV newline example, internal doc links, StrictDataclassClassValidationError name, and the Spaces template/SDK sentence (SDK is inferred from the template).

Applied from the #5223 diff with a 3-way merge (manage-spaces.md had diverged on main). The full docs build was not rerun.

🤖 Generated with Claude Code


Note

Low Risk
Documentation-only changes to English guides; no runtime or API behavior is modified.

Overview
Updates 17 English docs under docs/source/en/ so copy-paste examples match the current CLI and Python API—no library code changes.

CLI and API accuracy: Documents hf repos settings with --private / --public flags (not --private true|false). Snippets now use correct parameter names and types: create_repo(...).repo_id, exist_ok, library_name on model cards, space_sleep_time as int, required args for try_to_load_from_cache, list_collections(sort="lastModified"), and api.list_models / api.list_datasets instead of wrong variable names.

Guides polish: Inference examples use REPL ... continuations and chat_completion where placeholders wrongly used text_to_image; Inference Endpoints batch examples add await asyncio.gather. Integrations mixin samples fix nn.Linear, __init__, and _from_pretrained indentation. HfFileSystem bucket path output and CSV newline are corrected; Spaces docs clarify SDK inference from templates; broken internal links and StrictDataclassClassValidationError naming are fixed.

Reviewed by Cursor Bugbot for commit 37d2a46. Bugbot is set up for automated code reviews on this repo. Configure here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@Wauplin Wauplin left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✔️ (a lot of oversight / dummy typos)

@bot-ci-comment

bot-ci-comment Bot commented Nov 3, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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