Skip to content

Commit

Permalink
Fix unpacking modelkits with references
Browse files Browse the repository at this point in the history
Unpacking parent modelkits relied on the deprecated unpack configuration
(to unpack only models), which was getting ignored.
  • Loading branch information
amisevsk committed Aug 26, 2024
1 parent 937aecd commit 4d208b6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pkg/cmd/unpack/unpack.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,12 @@ func unpackParent(ctx context.Context, ref string, optsIn *unpackOptions, visite
opts := *optsIn
opts.modelRef = parentRef
// Unpack only model, ignore code/datasets
opts.unpackConf.unpackKitfile = false
opts.unpackConf.unpackCode = false
opts.unpackConf.unpackDatasets = false
modelFilter, err := parseFilter("model")
if err != nil {
// Shouldn't happen, ever
return fmt.Errorf("failed to parse filter for parent modelkit: %w", err)
}
opts.filterConfs = []filterConf{*modelFilter}

return runUnpackRecursive(ctx, &opts, append(visitedRefs, ref))
}
Expand Down

0 comments on commit 4d208b6

Please sign in to comment.