Skip to content

Commit

Permalink
chore(controller): fix predeploy and private create parent path (#408)
Browse files Browse the repository at this point in the history
Because

- missing parent path in predeploy and private model create request

This commit

- add `parent` param
  • Loading branch information
heiruwu authored Aug 28, 2023
1 parent 6e94cb1 commit 19f31b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/model/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
grpc_zap "github.com/grpc-ecosystem/go-grpc-middleware/logging/zap"

"github.com/instill-ai/model-backend/config"
"github.com/instill-ai/model-backend/pkg/constant"
"github.com/instill-ai/model-backend/pkg/logger"
"github.com/instill-ai/model-backend/pkg/utils"

Expand Down Expand Up @@ -135,6 +136,7 @@ func main() {
Configuration: configuration,
Visibility: modelPB.Model_VISIBILITY_PUBLIC,
},
Parent: "users/" + constant.DefaultUserID,
})
if err != nil {
logger.Info(fmt.Sprintf("Created model err: %v", err))
Expand Down
2 changes: 2 additions & 0 deletions pkg/handler/private_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/instill-ai/model-backend/config"
"github.com/instill-ai/model-backend/internal/resource"
"github.com/instill-ai/model-backend/pkg/constant"
"github.com/instill-ai/model-backend/pkg/datamodel"
"github.com/instill-ai/model-backend/pkg/service"
"github.com/instill-ai/model-backend/pkg/triton"
Expand Down Expand Up @@ -134,6 +135,7 @@ func (h *PrivateHandler) DeployModelAdmin(ctx context.Context, req *modelPB.Depl

createReq := &modelPB.CreateUserModelRequest{
Model: pbModel,
Parent: "users/" + constant.DefaultUserID,
}

var resp *modelPB.CreateUserModelResponse
Expand Down

0 comments on commit 19f31b6

Please sign in to comment.