Skip to content

Commit 2212709

Browse files
authored
feat: migrate modelpack and support build the model as reasoning model (#237)
Signed-off-by: chlins <[email protected]>
1 parent 6e94312 commit 2212709

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+268
-203
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ jobs:
7878
run: |
7979
go build \
8080
-tags "static system_libgit2 enable_libgit2" \
81-
-ldflags "-X github.com/CloudNativeAI/modctl/pkg/version.GitVersion=${{ github.ref_name }} \
82-
-X github.com/CloudNativeAI/modctl/pkg/version.GitCommit=$(git rev-parse --short HEAD) \
83-
-X github.com/CloudNativeAI/modctl/pkg/version.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
81+
-ldflags "-X github.com/modelpack/modctl/pkg/version.GitVersion=${{ github.ref_name }} \
82+
-X github.com/modelpack/modctl/pkg/version.GitCommit=$(git rev-parse --short HEAD) \
83+
-X github.com/modelpack/modctl/pkg/version.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
8484
-extldflags '-static'" \
8585
-o modctl \
8686
main.go
@@ -95,9 +95,9 @@ jobs:
9595
run: |
9696
go build \
9797
-tags "static system_libgit2 enable_libgit2" \
98-
-ldflags "-X github.com/CloudNativeAI/modctl/pkg/version.GitVersion=${{ github.ref_name }} \
99-
-X github.com/CloudNativeAI/modctl/pkg/version.GitCommit=$(git rev-parse --short HEAD) \
100-
-X github.com/CloudNativeAI/modctl/pkg/version.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
98+
-ldflags "-X github.com/modelpack/modctl/pkg/version.GitVersion=${{ github.ref_name }} \
99+
-X github.com/modelpack/modctl/pkg/version.GitCommit=$(git rev-parse --short HEAD) \
100+
-X github.com/modelpack/modctl/pkg/version.BuildTime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" \
101101
-o modctl \
102102
main.go
103103

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ formatters:
4646
sections:
4747
- standard
4848
- default
49-
- prefix(github.com/CloudNativeAI/modctl)
49+
- prefix(github.com/modelpack/modctl)
5050
exclusions:
5151
generated: lax
5252
paths:

.mockery.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ outpkg: "{{.PackageName}}"
44
mockname: "{{.InterfaceName}}"
55
filename: "{{.InterfaceName | snakecase}}.go"
66
packages:
7-
github.com/CloudNativeAI/modctl/pkg/backend:
7+
github.com/modelpack/modctl/pkg/backend:
88
interfaces:
99
Backend:
1010
config:
1111
dir: test/mocks/backend
12-
github.com/CloudNativeAI/modctl/pkg/storage:
12+
github.com/modelpack/modctl/pkg/storage:
1313
interfaces:
1414
Storage:
1515
config:
1616
dir: test/mocks/storage
17-
github.com/CloudNativeAI/modctl/pkg/modelfile:
17+
github.com/modelpack/modctl/pkg/modelfile:
1818
interfaces:
1919
Modelfile:
2020
config:
2121
dir: test/mocks/modelfile
22-
github.com/CloudNativeAI/modctl/pkg/backend/build:
22+
github.com/modelpack/modctl/pkg/backend/build:
2323
interfaces:
2424
Builder:
2525
config:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# modctl
22

3-
[![CI](https://github.com/CloudNativeAI/modctl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/CloudNativeAI/modctl/actions/workflows/ci.yml)
4-
[![GoDoc](https://godoc.org/github.com/CloudNativeAI/modctl?status.svg)](https://godoc.org/github.com/CloudNativeAI/modctl)
3+
[![CI](https://github.com/modelpack/modctl/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/modelpack/modctl/actions/workflows/ci.yml)
4+
[![GoDoc](https://godoc.org/github.com/modelpack/modctl?status.svg)](https://godoc.org/github.com/modelpack/modctl)
55

6-
Modctl is a user-friendly CLI tool for managing OCI model artifacts, which are bundled based on [Model Spec](https://github.com/CloudNativeAI/model-spec).
6+
Modctl is a user-friendly CLI tool for managing OCI model artifacts, which are bundled based on [Model Spec](https://github.com/modelpack/model-spec).
77
It offers commands such as `build`, `pull`, `push`, and more, making it easy for users to convert their AI models into OCI artifacts.
88

99
## Documentation

build/package/docs/modctl.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,5 @@ Flags:
3333
.EE
3434
.SH BUGS
3535
See GitHub Issues: \c
36-
.UR https://github.com/CloudNativeAI/modctl/issues
36+
.UR https://github.com/modelpack/modctl/issues
3737
.UE \c

build/package/docs/modctl.1.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ Flags:
3434

3535
# BUGS
3636

37-
See GitHub Issues: <https://github.com/CloudNativeAI/modctl/issues>
37+
See GitHub Issues: <https://github.com/modelpack/modctl/issues>

cmd/attach.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ import (
2323
"github.com/spf13/cobra"
2424
"github.com/spf13/viper"
2525

26-
"github.com/CloudNativeAI/modctl/pkg/backend"
27-
"github.com/CloudNativeAI/modctl/pkg/config"
26+
"github.com/modelpack/modctl/pkg/backend"
27+
"github.com/modelpack/modctl/pkg/config"
2828
)
2929

3030
var attachConfig = config.NewAttach()

cmd/build.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
"context"
2121
"fmt"
2222

23-
"github.com/CloudNativeAI/modctl/pkg/backend"
24-
"github.com/CloudNativeAI/modctl/pkg/config"
25-
2623
"github.com/spf13/cobra"
2724
"github.com/spf13/viper"
25+
26+
"github.com/modelpack/modctl/pkg/backend"
27+
"github.com/modelpack/modctl/pkg/config"
2828
)
2929

3030
var buildConfig = config.NewBuild()
@@ -61,6 +61,7 @@ func init() {
6161
flags.StringVar(&buildConfig.SourceRevision, "source-revision", "", "source revision")
6262
// TODO: set the raw flag to true by default in future.
6363
flags.BoolVar(&buildConfig.Raw, "raw", false, "turning on this flag will build model artifact layers in raw format")
64+
flags.BoolVar(&buildConfig.Reasoning, "reasoning", false, "turning on this flag will mark this model as reasoning model in the config")
6465

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

cmd/extract.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
"context"
2121
"fmt"
2222

23-
"github.com/CloudNativeAI/modctl/pkg/backend"
24-
"github.com/CloudNativeAI/modctl/pkg/config"
25-
2623
"github.com/spf13/cobra"
2724
"github.com/spf13/viper"
25+
26+
"github.com/modelpack/modctl/pkg/backend"
27+
"github.com/modelpack/modctl/pkg/config"
2828
)
2929

3030
var extractConfig = config.NewExtract()

cmd/fetch.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ import (
2020
"context"
2121
"fmt"
2222

23-
"github.com/CloudNativeAI/modctl/pkg/backend"
24-
"github.com/CloudNativeAI/modctl/pkg/config"
25-
2623
"github.com/spf13/cobra"
2724
"github.com/spf13/viper"
25+
26+
"github.com/modelpack/modctl/pkg/backend"
27+
"github.com/modelpack/modctl/pkg/config"
2828
)
2929

3030
var fetchConfig = config.NewFetch()

0 commit comments

Comments
 (0)