forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TransportBulkAction uses the inference service directly
- Loading branch information
Showing
30 changed files
with
381 additions
and
376 deletions.
There are no files selected for viewing
222 changes: 147 additions & 75 deletions
222
server/src/main/java/org/elasticsearch/action/bulk/TransportBulkAction.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 0 additions & 47 deletions
47
server/src/main/java/org/elasticsearch/inference/InferenceProvider.java
This file was deleted.
Oops, something went wrong.
42 changes: 42 additions & 0 deletions
42
server/src/main/java/org/elasticsearch/inference/ModelRegistry.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
package org.elasticsearch.inference; | ||
|
||
import org.elasticsearch.action.ActionListener; | ||
|
||
import java.util.List; | ||
import java.util.Map; | ||
|
||
public abstract class ModelRegistry { | ||
public record ModelConfigMap(Map<String, Object> config, Map<String, Object> secrets) {} | ||
|
||
/** | ||
* Semi parsed model where model id, task type and service | ||
* are known but the settings are not parsed. | ||
*/ | ||
public record UnparsedModel( | ||
String modelId, | ||
TaskType taskType, | ||
String service, | ||
Map<String, Object> settings, | ||
Map<String, Object> secrets | ||
) {} | ||
|
||
public abstract void getModelWithSecrets(String modelId, ActionListener<UnparsedModel> listener); | ||
|
||
public abstract void getModel(String modelId, ActionListener<UnparsedModel> listener); | ||
|
||
public abstract void getModelsByTaskType(TaskType taskType, ActionListener<List<UnparsedModel>> listener); | ||
|
||
public abstract void storeModel(Model model, ActionListener<Boolean> listener); | ||
|
||
public abstract void deleteModel(String modelId, ActionListener<Boolean> listener); | ||
|
||
public abstract void getAllModels(ActionListener<List<UnparsedModel>> listener); | ||
} |
10 changes: 9 additions & 1 deletion
10
...k/inference/common/SimilarityMeasure.java → ...icsearch/inference/SimilarityMeasure.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
server/src/main/java/org/elasticsearch/plugins/InferenceProviderPlugin.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.