Skip to content

Commit

Permalink
TODO check who is using deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkyle committed Oct 14, 2024
1 parent 34c23dc commit 1b2dd4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ private void doExecuteForked(

var service = serviceRegistry.getService(unparsedModel.service());
if (service.isPresent()) {
if (service.get().isInClusterService()) {
// check for other models using this deployment
} else {
service.get().stop(request.getInferenceEndpointId(), listener);
}
service.get().stop(, listener);
} else {
listener.onFailure(
new ElasticsearchStatusException(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ public void start(Model model, ActionListener<Boolean> finalListener) {
}

@Override
public void stop(String inferenceEntityId, ActionListener<Boolean> listener) {
public void stop(String deploymentId, ActionListener<Boolean> listener) {
// TODO check if other inference endpoints are using this deployment
// // get the model + deployment id and check if configured by deployment id or has a dedicated deployment
var request = new StopTrainedModelDeploymentAction.Request(inferenceEntityId);
request.setForce(true);
client.execute(
Expand Down

0 comments on commit 1b2dd4b

Please sign in to comment.