Skip to content

Commit 7bc9afd

Browse files
Merge branch 'main' into add-hf-support
2 parents f455aed + 6e7d93b commit 7bc9afd

File tree

26 files changed

+717
-271
lines changed

26 files changed

+717
-271
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
23+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
2424
with:
2525
submodules: recursive
2626

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@ jobs:
2828

2929
steps:
3030
- name: Checkout repository
31-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
31+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
3232

3333
- name: Initialize CodeQL
34-
uses: github/codeql-action/init@4e94bd11f71e507f7f87df81788dff88d1dacbfb
34+
uses: github/codeql-action/init@e12f0178983d466f2f6028f5cc7a6d786fd97f4b
3535
with:
3636
languages: ${{ matrix.language }}
3737

3838
- name: Autobuild
39-
uses: github/codeql-action/autobuild@4e94bd11f71e507f7f87df81788dff88d1dacbfb
39+
uses: github/codeql-action/autobuild@e12f0178983d466f2f6028f5cc7a6d786fd97f4b
4040

4141
- name: Perform CodeQL Analysis
42-
uses: github/codeql-action/analyze@4e94bd11f71e507f7f87df81788dff88d1dacbfb
42+
uses: github/codeql-action/analyze@e12f0178983d466f2f6028f5cc7a6d786fd97f4b

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
PACKAGE_DIR: modctl-test-package
3434
steps:
3535
- name: Checkout code
36-
uses: actions/checkout@v5
36+
uses: actions/checkout@v6
3737
with:
3838
submodules: recursive
3939

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
timeout-minutes: 30
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
19+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
2020
with:
2121
fetch-depth: '0'
2222

@@ -39,7 +39,7 @@ jobs:
3939
LIBGIT2_SYS_USE_PKG_CONFIG: "1"
4040

4141
- name: Golangci lint
42-
uses: golangci/golangci-lint-action@v8.0.0
42+
uses: golangci/golangci-lint-action@v9.1.0
4343
with:
4444
version: v2.4
4545
args: --verbose --timeout=10m

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout code
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131
with:
3232
fetch-depth: 0
3333

cmd/attach.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func init() {
5757
flags.BoolVarP(&attachConfig.Force, "force", "f", false, "turning on this flag will force the attach, which will overwrite the layer if it already exists with same filepath")
5858
flags.BoolVar(&attachConfig.Nydusify, "nydusify", false, "[EXPERIMENTAL] nydusify the model artifact")
5959
flags.MarkHidden("nydusify")
60-
flags.BoolVar(&attachConfig.Raw, "raw", false, "turning on this flag will attach model artifact layer in raw format")
60+
flags.BoolVar(&attachConfig.Raw, "raw", true, "turning on this flag will attach model artifact layer in raw format")
6161
flags.BoolVar(&attachConfig.Config, "config", false, "turning on this flag will overwrite model artifact config layer")
6262

6363
if err := viper.BindPFlags(flags); err != nil {

cmd/build.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ func init() {
5959
flags.MarkHidden("nydusify")
6060
flags.StringVar(&buildConfig.SourceURL, "source-url", "", "source URL")
6161
flags.StringVar(&buildConfig.SourceRevision, "source-revision", "", "source revision")
62-
// TODO: set the raw flag to true by default in future.
63-
flags.BoolVar(&buildConfig.Raw, "raw", false, "turning on this flag will build model artifact layers in raw format")
62+
flags.BoolVar(&buildConfig.Raw, "raw", true, "turning on this flag will build model artifact layers in raw format")
6463
flags.BoolVar(&buildConfig.Reasoning, "reasoning", false, "turning on this flag will mark this model as reasoning model in the config")
6564
flags.BoolVar(&buildConfig.NoCreationTime, "no-creation-time", false, "turning on this flag will not set createdAt in the config, which will be helpful for repeated builds")
6665

cmd/modelfile/generate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ func init() {
108108
flags.BoolVar(&generateConfig.Overwrite, "overwrite", false, "overwrite the existing modelfile")
109109
flags.StringVar(&generateConfig.ModelURL, "model-url", "", "download model from a supported provider (full URL or short-form with --provider)")
110110
flags.StringVarP(&generateConfig.Provider, "provider", "p", "", "explicitly specify the provider for short-form URLs (huggingface, modelscope)")
111+
flags.StringArrayVar(&generateConfig.ExcludePatterns, "exclude", []string{}, "specify glob patterns to exclude files/directories (e.g. *.log, checkpoints/*)")
111112

112113
// Mark the ignore-unrecognized-file-types flag as deprecated and hidden
113114
flags.MarkDeprecated("ignore-unrecognized-file-types", "this flag will be removed in the next release")

cmd/upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func init() {
5252
flags.StringVarP(&uploadConfig.Repo, "repo", "", "", "target model artifact repository name")
5353
flags.BoolVarP(&uploadConfig.PlainHTTP, "plain-http", "", false, "turning on this flag will use plain HTTP instead of HTTPS")
5454
flags.BoolVarP(&uploadConfig.Insecure, "insecure", "", false, "turning on this flag will disable TLS verification")
55-
flags.BoolVar(&uploadConfig.Raw, "raw", false, "turning on this flag will upload model artifact layer in raw format")
55+
flags.BoolVar(&uploadConfig.Raw, "raw", true, "turning on this flag will upload model artifact layer in raw format")
5656

5757
if err := viper.BindPFlags(flags); err != nil {
5858
panic(fmt.Errorf("bind cache list flags to viper: %w", err))

docs/getting-started.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Binary
66

77
```shell
8-
$ go install github.com/modelpack/modctl@latest
8+
$ go install github.com/modelpack/modctl@main
99
```
1010

1111
### Build from source
@@ -31,6 +31,14 @@ directory(workspace).
3131
$ modctl modelfile generate .
3232
```
3333

34+
If you want to exclude specific files from the model artifact (such as checkpoint directories),
35+
you can use the `--exclude` option to specify the file path glob pattern.
36+
Note that only basic glob syntax (`*`, `?`, `[]`) is supported; advanced features like `**` for recursive matching are not.
37+
38+
```shell
39+
$ modctl modelfile generate . --exclude 'checkpoint-*'
40+
```
41+
3442
### Build
3543

3644
Build the model artifact you need to prepare a Modelfile describe your expected layout of the model artifact in your model repo.

0 commit comments

Comments
 (0)