[go: nahoru, domu]

Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
wy65701436 committed Jul 3, 2024
1 parent b843527 commit 2a5ce21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/controller/artifact/processor/hf/hf.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ import (
// const definitions
const (
ArtifactTypeHF = "AIArtifact"
mediaType = "application/vnd.goharbor.huggingface.v1"
MediaType = "application/vnd.goharbor.huggingface.v1"
)

func init() {
pc := &processor{}
pc.ManifestProcessor = base.NewManifestProcessor()
if err := ps.Register(pc, mediaType); err != nil {
log.Errorf("failed to register processor for media type %s: %v", mediaType, err)
if err := ps.Register(pc, MediaType); err != nil {
log.Errorf("failed to register processor for media type %s: %v", MediaType, err)
return
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/controller/replication/transfer/huggingface/transfer.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ func (t *transfer) composeOCI(ctx context.Context, fs *file.Store, files []strin
}

// 2. Pack the files and tag the packed manifest
artifactType := "application/vnd.goharbor.huggingface.artifact"
artifactType := hf.MediaType
orasOpts := oras.PackManifestOptions{
Layers: fileDescriptors,
ConfigDescriptor: &v1.Descriptor{
MediaType: hf.ArtifactTypeHF,
MediaType: hf.MediaType,
},
ManifestAnnotations: map[string]string{
"type": "hugging-face-object",
Expand Down

0 comments on commit 2a5ce21

Please sign in to comment.