Skip to content

[HWORKS-2849] Fix broken SDK examples found by post-refactor doc audit#603

Merged
robzor92 merged 1 commit into
mainfrom
HWORKS-2849-docs-example-fixes
Jun 10, 2026
Merged

[HWORKS-2849] Fix broken SDK examples found by post-refactor doc audit#603
robzor92 merged 1 commit into
mainfrom
HWORKS-2849-docs-example-fixes

Conversation

@robzor92

Copy link
Copy Markdown
Collaborator

Summary

While auditing every published code example against the post-PEP-8 SDK surface (hopsworks-api #997/#999), two pre-existing broken examples surfaced:

  • model_schema.md: from hsml.utils.model_schema import ModelSchema and from hsml.utils.schema import Schema — neither path exists in the SDK (hsml/utils/ only contains internal schema helpers and does not export these). Correct paths: hsml.model_schema / hsml.schema, which is what every other doc page already uses.
  • repository_actions.md: git_repo = git_api.commit("Test commit")commit() is a GitRepo method, not GitApi.

The rest of the docs verified clean: ~150 example calls and 97 unique receiver methods checked against the SDK source.

🤖 Generated with Claude Code

- model_schema.md: hsml.utils.model_schema / hsml.utils.schema import
  paths do not exist in the SDK (Schema/ModelSchema live at
  hsml.schema / hsml.model_schema).
- repository_actions.md: commit() is a GitRepo method, not GitApi.

Both are pre-existing doc bugs surfaced while auditing all published
examples against the privatized SDK surface.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes two broken Python SDK documentation snippets in the Hopsworks docs site by updating imports/method calls to match the post-refactor SDK API surface.

Changes:

  • Corrected GitRepo.commit() example to call commit() on the GitRepo instance (not on GitApi).
  • Fixed ModelSchema/Schema imports to use hsml.model_schema and hsml.schema instead of non-existent hsml.utils.* paths.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/user_guides/projects/git/repository_actions.md Fixes the commit example to call commit() on git_repo.
docs/user_guides/mlops/registry/model_schema.md Updates SDK import paths for ModelSchema and Schema to the correct modules.

@robzor92 robzor92 merged commit 5a8ee3e into main Jun 10, 2026
2 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.

3 participants