[HWORKS-2849] Fix broken SDK examples found by post-refactor doc audit#603
Merged
Conversation
- 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>
Contributor
There was a problem hiding this comment.
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 callcommit()on theGitRepoinstance (not onGitApi). - Fixed
ModelSchema/Schemaimports to usehsml.model_schemaandhsml.schemainstead of non-existenthsml.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. |
manu-sj
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
While auditing every published code example against the post-PEP-8 SDK surface (hopsworks-api #997/#999), two pre-existing broken examples surfaced:
from hsml.utils.model_schema import ModelSchemaandfrom 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.git_repo = git_api.commit("Test commit")—commit()is aGitRepomethod, notGitApi.The rest of the docs verified clean: ~150 example calls and 97 unique receiver methods checked against the SDK source.
🤖 Generated with Claude Code