Skip to content

test+docs: validate ModelPack compatibility in Docker Model Runner#744

Open
rishi-jat wants to merge 2 commits intodocker:mainfrom
rishi-jat:test/modelpack-e2e
Open

test+docs: validate ModelPack compatibility in Docker Model Runner#744
rishi-jat wants to merge 2 commits intodocker:mainfrom
rishi-jat:test/modelpack-e2e

Conversation

@rishi-jat
Copy link

Adds an end-to-end test validating the ModelPack compatibility introduced in #516.

The test verifies that a ModelPack OCI artifact can be pulled and handled by Docker Model Runner.

Also adds documentation explaining how to run ModelPack artifacts using Docker Model Runner.

Related issue: modelpack/model-spec#151

Signed-off-by: Rishi Jat <rishijat098@gmail.com>
Copilot AI review requested due to automatic review settings March 13, 2026 08:08
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the pull modelpack artifact test, comparing pulledContent and originalContent via string(...) != string(...) is unnecessary for byte slices; using bytes.Equal(pulledContent, originalContent) avoids extra allocations and handles arbitrary binary content more idiomatically.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the `pull modelpack artifact` test, comparing `pulledContent` and `originalContent` via `string(...) != string(...)` is unnecessary for byte slices; using `bytes.Equal(pulledContent, originalContent)` avoids extra allocations and handles arbitrary binary content more idiomatically.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds documentation and an end-to-end test for ModelPack compatibility. The documentation changes are clear and helpful. The new test case is a good addition, but it uses a workaround that makes it not fully representative of a real-world scenario. I've added a comment with a suggestion to improve the test's accuracy, which will require a corresponding change in the validation logic.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds documentation and an end-to-end distribution test intended to validate pulling/running CNCF ModelPack OCI artifacts with Docker Model Runner.

Changes:

  • Adds a new TestClientPullModel subtest that pushes and pulls a “ModelPack” artifact via the test registry and validates the pulled weights/config.
  • Introduces a test-only modelPackTestArtifact helper to construct an OCI artifact with ModelPack-style layers/config.
  • Adds a README section describing ModelPack media type compatibility and how to pull/run ModelPack artifacts.

Reviewed changes

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

File Description
pkg/distribution/distribution/client_test.go Adds an E2E pull test and helper artifact implementation for ModelPack-like images.
README.md Documents ModelPack compatibility and expected media types for config/weight layers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@rishi-jat
Copy link
Author

/cc @bergwolf
/cc @gorkem
/cc @aftersnow
/cc @chlins

Signed-off-by: Rishi Jat <rishijat098@gmail.com>
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.

2 participants