Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add the codec support #127

Merged
merged 1 commit into from
Mar 20, 2025
Merged

feat: add the codec support #127

merged 1 commit into from
Mar 20, 2025

Conversation

chlins
Copy link
Contributor

@chlins chlins commented Mar 18, 2025

This pull request introduces significant changes to the modctl package, focusing on replacing the archiver package with a new codec package for encoding and decoding files. Additionally, it updates the model-spec dependency and refactors various functions to integrate the new codec system.

Dependency updates:

  • Updated github.com/CloudNativeAI/model-spec from v0.0.2 to v0.0.3 in go.mod.

Refactoring and integration of codec package:

  • Replaced archiver package with codec package in pkg/backend/build/builder.go. The OutputLayer method signature and the BuildLayer function were updated to use the new codec system for encoding files. [1] [2] [3] [4]
  • Updated OutputLayer method in pkg/backend/build/local.go to use the new codec system.
  • Updated OutputLayer method in pkg/backend/build/remote.go to use the new codec system. [1] [2]
  • Replaced archiver package with codec package in pkg/backend/extract.go and refactored the exportModelArtifact function to use the new codec system for extracting layers. [1] [2]
  • Replaced archiver package with codec package in pkg/backend/pull.go and updated the pullAndExtractFromRemote function to use the new codec system for extracting layers. [1] [2]

Introduction of codec package:

  • Added a new codec package with Codec, RawCodec, and TarCodec implementations for encoding and decoding files. [1] [2] [3]

@chlins chlins force-pushed the feat/support-raw branch 2 times, most recently from c48ae9e to d9f295a Compare March 20, 2025 06:51
@chlins chlins added the enhancement New feature or request label Mar 20, 2025
@chlins chlins force-pushed the feat/support-raw branch from d9f295a to 7dbc935 Compare March 20, 2025 10:28
Copy link
Contributor

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@gaius-qi gaius-qi merged commit 23d3091 into main Mar 20, 2025
5 checks passed
@gaius-qi gaius-qi deleted the feat/support-raw branch March 20, 2025 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants