Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement the AI model processor #21663

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chlins
Copy link
Member

@chlins chlins commented Feb 24, 2025

Thank you for contributing to Harbor!

Comprehensive Summary of your change

Issue being fixed

Fixes #21229

Please indicate you've done the following:

  • Well Written Title and Summary of the PR
  • Label the PR as needed. "release-note/ignore-for-release, release-note/new-feature, release-note/update, release-note/enhancement, release-note/community, release-note/breaking-change, release-note/docs, release-note/infra, release-note/deprecation"
  • Accepted the DCO. Commits without the DCO will delay acceptance.
  • Made sure tests are passing and test coverage is added if needed.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed in website repository.

@chlins chlins added release-note/new-feature New Harbor Feature target/2.13.0 issues that are targeting v2.13.0 labels Feb 24, 2025
@chlins chlins requested a review from a team as a code owner February 24, 2025 07:08
Copy link

codecov bot commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 46.38%. Comparing base (c8c11b4) to head (162737a).
Report is 394 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #21663      +/-   ##
==========================================
+ Coverage   45.36%   46.38%   +1.01%     
==========================================
  Files         244      249       +5     
  Lines       13333    14047     +714     
  Branches     2719     2897     +178     
==========================================
+ Hits         6049     6516     +467     
- Misses       6983     7187     +204     
- Partials      301      344      +43     
Flag Coverage Δ
unittests 46.38% <ø> (+1.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 493 files with indirect coverage changes

@chlins chlins mentioned this pull request Feb 24, 2025
// const definitions
const (
// ArtifactTypeModel defines the artifact type for AI model.
ArtifactTypeModel = "MODEL"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also have this here

ArtifactTypeCNAI = "MODEL"
and I feel like we should consider changing MODEL to something like CNAI, Harbor can possibly support multiple ML models in future

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree each artifact type should have a unique name in this cas it should be CNAI

@@ -48,6 +48,15 @@ type Artifact struct {
References []*Reference `json:"references"` // child artifacts referenced by the parent artifact if the artifact is an index
}

// ResolveArtifactType returns the artifact type of the artifact, prefer ArtifactType, use MediaType if ArtifactType is empty.
func (a *Artifact) ResolveArtifactType() string {
Copy link

@s3rj1k s3rj1k Feb 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am pretty-sure that this change is not necessary and can be avoided to reduce scope of PR to only adding artifact processor, but let's see what code-owners have to say.

// const definitions
const (
// ArtifactTypeModel defines the artifact type for AI model.
ArtifactTypeModel = "MODEL"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree each artifact type should have a unique name in this cas it should be CNAI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-note/new-feature New Harbor Feature target/2.13.0 issues that are targeting v2.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implementation for AI model artifact processor
6 participants