@Generated public class ModelRegistryAPI extends Object
The Workspace Model Registry is a centralized model repository and a UI and set of APIs that enable you to manage the full lifecycle of MLflow Models.
Constructor and Description |
---|
ModelRegistryAPI(ApiClient apiClient)
Regular-use constructor
|
ModelRegistryAPI(ModelRegistryService mock)
Constructor for mocks
|
public ModelRegistryAPI(ApiClient apiClient)
public ModelRegistryAPI(ModelRegistryService mock)
public ApproveTransitionRequestResponse approveTransitionRequest(String name, String version, Stage stage, boolean archiveExistingVersions)
public ApproveTransitionRequestResponse approveTransitionRequest(ApproveTransitionRequest request)
Approves a model version stage transition request.
public CreateCommentResponse createComment(String name, String version, String comment)
public CreateCommentResponse createComment(CreateComment request)
Posts a comment on a model version. A comment can be submitted either by a user or programmatically to display relevant information about the model. For example, test results or deployment errors.
public CreateModelResponse createModel(String name)
public CreateModelResponse createModel(CreateModelRequest request)
Creates a new registered model with the name specified in the request body.
Throws `RESOURCE_ALREADY_EXISTS` if a registered model with the given name exists.
public CreateModelVersionResponse createModelVersion(String name, String source)
public CreateModelVersionResponse createModelVersion(CreateModelVersionRequest request)
Creates a model version.
public CreateTransitionRequestResponse createTransitionRequest(String name, String version, Stage stage)
public CreateTransitionRequestResponse createTransitionRequest(CreateTransitionRequest request)
Creates a model version stage transition request.
public CreateWebhookResponse createWebhook(Collection<RegistryWebhookEvent> events)
public CreateWebhookResponse createWebhook(CreateRegistryWebhook request)
**NOTE**: This endpoint is in Public Preview.
Creates a registry webhook.
public void deleteComment(String id)
public void deleteComment(DeleteCommentRequest request)
Deletes a comment on a model version.
public void deleteModel(String name)
public void deleteModel(DeleteModelRequest request)
Deletes a registered model.
public void deleteModelTag(DeleteModelTagRequest request)
Deletes the tag for a registered model.
public void deleteModelVersion(DeleteModelVersionRequest request)
Deletes a model version.
public void deleteModelVersionTag(DeleteModelVersionTagRequest request)
Deletes a model version tag.
public void deleteTransitionRequest(String name, String version, DeleteTransitionRequestStage stage, String creator)
public void deleteTransitionRequest(DeleteTransitionRequestRequest request)
Cancels a model version stage transition request.
public void deleteWebhook(DeleteWebhookRequest request)
**NOTE:** This endpoint is in Public Preview.
Deletes a registry webhook.
public Iterable<ModelVersion> getLatestVersions(String name)
public Iterable<ModelVersion> getLatestVersions(GetLatestVersionsRequest request)
Gets the latest version of a registered model.
public GetModelResponse getModel(String name)
public GetModelResponse getModel(GetModelRequest request)
Get the details of a model. This is a Databricks workspace version of the [MLflow endpoint] that also returns the model's Databricks workspace ID and the permission level of the requesting user on the model.
[MLflow endpoint]: https://www.mlflow.org/docs/latest/rest-api.html#get-registeredmodel
public GetModelVersionResponse getModelVersion(String name, String version)
public GetModelVersionResponse getModelVersion(GetModelVersionRequest request)
Get a model version.
public GetModelVersionDownloadUriResponse getModelVersionDownloadUri(String name, String version)
public GetModelVersionDownloadUriResponse getModelVersionDownloadUri(GetModelVersionDownloadUriRequest request)
Gets a URI to download the model version.
public GetRegisteredModelPermissionLevelsResponse getPermissionLevels(String registeredModelId)
public GetRegisteredModelPermissionLevelsResponse getPermissionLevels(GetRegisteredModelPermissionLevelsRequest request)
Gets the permission levels that a user can have on an object.
public RegisteredModelPermissions getPermissions(String registeredModelId)
public RegisteredModelPermissions getPermissions(GetRegisteredModelPermissionsRequest request)
Gets the permissions of a registered model. Registered models can inherit permissions from their root object.
public Iterable<Model> listModels(ListModelsRequest request)
Lists all available registered models, up to the limit specified in __max_results__.
public Iterable<Activity> listTransitionRequests(String name, String version)
public Iterable<Activity> listTransitionRequests(ListTransitionRequestsRequest request)
Gets a list of all open stage transition requests for the model version.
public Iterable<RegistryWebhook> listWebhooks(ListWebhooksRequest request)
**NOTE:** This endpoint is in Public Preview.
Lists all registry webhooks.
public RejectTransitionRequestResponse rejectTransitionRequest(String name, String version, Stage stage)
public RejectTransitionRequestResponse rejectTransitionRequest(RejectTransitionRequest request)
Rejects a model version stage transition request.
public RenameModelResponse renameModel(String name)
public RenameModelResponse renameModel(RenameModelRequest request)
Renames a registered model.
public Iterable<ModelVersion> searchModelVersions(SearchModelVersionsRequest request)
Searches for specific model versions based on the supplied __filter__.
public Iterable<Model> searchModels(SearchModelsRequest request)
Search for registered models based on the specified __filter__.
public void setModelTag(SetModelTagRequest request)
Sets a tag on a registered model.
public void setModelVersionTag(String name, String version, String key, String value)
public void setModelVersionTag(SetModelVersionTagRequest request)
Sets a model version tag.
public RegisteredModelPermissions setPermissions(String registeredModelId)
public RegisteredModelPermissions setPermissions(RegisteredModelPermissionsRequest request)
Sets permissions on a registered model. Registered models can inherit permissions from their root object.
public TestRegistryWebhookResponse testRegistryWebhook(String id)
public TestRegistryWebhookResponse testRegistryWebhook(TestRegistryWebhookRequest request)
**NOTE:** This endpoint is in Public Preview.
Tests a registry webhook.
public TransitionStageResponse transitionStage(String name, String version, Stage stage, boolean archiveExistingVersions)
public TransitionStageResponse transitionStage(TransitionModelVersionStageDatabricks request)
Transition a model version's stage. This is a Databricks workspace version of the [MLflow endpoint] that also accepts a comment associated with the transition to be recorded.",
[MLflow endpoint]: https://www.mlflow.org/docs/latest/rest-api.html#transition-modelversion-stage
public UpdateCommentResponse updateComment(String id, String comment)
public UpdateCommentResponse updateComment(UpdateComment request)
Post an edit to a comment on a model version.
public void updateModel(String name)
public void updateModel(UpdateModelRequest request)
Updates a registered model.
public void updateModelVersion(UpdateModelVersionRequest request)
Updates the model version.
public RegisteredModelPermissions updatePermissions(String registeredModelId)
public RegisteredModelPermissions updatePermissions(RegisteredModelPermissionsRequest request)
Updates the permissions on a registered model. Registered models can inherit permissions from their root object.
public void updateWebhook(String id)
public void updateWebhook(UpdateRegistryWebhook request)
**NOTE:** This endpoint is in Public Preview.
Updates a registry webhook.
public ModelRegistryService impl()
Copyright © 2024. All rights reserved.