Skip to content

[#5872] feat(client): Add model management Java client API#6003

Merged
jerryshao merged 3 commits intoapache:mainfrom
jerryshao:issue-5872
Dec 31, 2024
Merged

[#5872] feat(client): Add model management Java client API#6003
jerryshao merged 3 commits intoapache:mainfrom
jerryshao:issue-5872

Conversation

@jerryshao
Copy link
Contributor

What changes were proposed in this pull request?

This PR adds the Java client API for model management.

Why are the changes needed?

This is a part of work of model management.

Fix: #5872

Does this PR introduce any user-facing change?

No.

How was this patch tested?

UT added.

@jerryshao jerryshao self-assigned this Dec 26, 2024
@jerryshao
Copy link
Contributor Author

@mchades @yuqi1129 @FANNG1 can you please help to review this PR?

}

@Override
public boolean deleteModel(NameIdentifier ident) {
Copy link
Contributor

Choose a reason for hiding this comment

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

When we have register..., I'm expecting a deregister... rather than a delete....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I refer this from other system's design (https://docs.unitycatalog.io/usage/models/#deleting-registered-models-and-model-versions), I think it is fine and easy to understand.

Preconditions.checkArgument(StringUtils.isNotBlank(name), "name must not be blank");
Preconditions.checkArgument(type != null, "type must not be null");
Preconditions.checkArgument(StringUtils.isNotBlank(provider), "provider must not be blank");
Preconditions.checkArgument(audit != null, "audit must not be null");
Copy link
Contributor

Choose a reason for hiding this comment

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

This sounds like a little bit too strict?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They are all the necessary variables, it cannot work if one is missing.

Copy link
Contributor

@mchades mchades left a comment

Choose a reason for hiding this comment

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

lgtm

@jerryshao jerryshao merged commit 0c516e2 into apache:main Dec 31, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Subtask]Implement the Java client API for model catalog.

3 participants