-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. |
// const definitions | ||
const ( | ||
// ArtifactTypeModel defines the artifact type for AI model. | ||
ArtifactTypeModel = "MODEL" |
There was a problem hiding this comment.
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" |
MODEL
to something like CNAI
, Harbor can possibly support multiple ML models in future
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
afe1655
to
40ac4e3
Compare
// const definitions | ||
const ( | ||
// ArtifactTypeModel defines the artifact type for AI model. | ||
ArtifactTypeModel = "MODEL" |
There was a problem hiding this comment.
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
Signed-off-by: chlins <[email protected]>
40ac4e3
to
162737a
Compare
Thank you for contributing to Harbor!
Comprehensive Summary of your change
Issue being fixed
Fixes #21229
Please indicate you've done the following: