Skip to content

Commit 720b444

Browse files
timgreinkertal
authored andcommitted
Rename ELSER defaults (elastic#225852)
1 parent 2c97cbe commit 720b444

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

x-pack/platform/plugins/shared/observability_ai_assistant/common/preconfigured_inference_ids.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
export const LEGACY_CUSTOM_INFERENCE_ID = 'obs_ai_assistant_kb_inference';
99

1010
export const ELSER_ON_ML_NODE_INFERENCE_ID = '.elser-2-elasticsearch';
11-
export const ELSER_IN_EIS_INFERENCE_ID = '.elser-v2-elastic';
11+
export const ELSER_IN_EIS_INFERENCE_ID = '.elser-2-elastic';
1212

1313
export const E5_SMALL_INFERENCE_ID = '.multilingual-e5-small-elasticsearch';
1414
export const E5_LARGE_IN_EIS_INFERENCE_ID = '.multilingual-e5-large-elastic'; // TODO: verify the inference ID once it's created in EIS

x-pack/solutions/search/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,19 @@ const inferenceEndpoints = [
8989
},
9090
},
9191
{
92-
inference_id: '.elser-v2-elastic',
92+
inference_id: '.elser-2-elastic',
9393
task_type: 'sparse_embedding',
9494
service: 'elastic',
9595
service_settings: {
96-
model_id: 'elser-v2',
96+
model_id: 'elser_model_2',
9797
},
9898
},
9999
{
100100
inference_id: 'custom-inference-id',
101101
task_type: 'sparse_embedding',
102102
service: 'elastic',
103103
service_settings: {
104-
model_id: 'elser-v2',
104+
model_id: 'elser_model_2',
105105
},
106106
},
107107
] as InferenceAPIConfigResponse[];
@@ -117,8 +117,8 @@ describe('When the tabular page is loaded', () => {
117117
render(<TabularPage inferenceEndpoints={inferenceEndpoints} />);
118118

119119
const rows = screen.getAllByRole('row');
120-
expect(rows[1]).toHaveTextContent('.elser-2-elasticsearch');
121-
expect(rows[2]).toHaveTextContent('.elser-v2-elastic');
120+
expect(rows[1]).toHaveTextContent('.elser-2-elastic');
121+
expect(rows[2]).toHaveTextContent('.elser-2-elasticsearch');
122122
expect(rows[3]).toHaveTextContent('.multilingual-e5-small-elasticsearch');
123123
expect(rows[4]).toHaveTextContent('.sparkles');
124124
expect(rows[5]).toHaveTextContent('custom-inference-id');
@@ -132,11 +132,11 @@ describe('When the tabular page is loaded', () => {
132132
render(<TabularPage inferenceEndpoints={inferenceEndpoints} />);
133133

134134
const rows = screen.getAllByRole('row');
135-
expect(rows[1]).toHaveTextContent('Elasticsearch');
136-
expect(rows[1]).toHaveTextContent('.elser_model_2');
135+
expect(rows[1]).toHaveTextContent('Elastic');
136+
expect(rows[1]).toHaveTextContent('.elser-2-elastic');
137137

138-
expect(rows[2]).toHaveTextContent('Elastic');
139-
expect(rows[2]).toHaveTextContent('.elser-v2-elastic');
138+
expect(rows[2]).toHaveTextContent('Elasticsearch');
139+
expect(rows[2]).toHaveTextContent('.elser_model_2');
140140

141141
expect(rows[3]).toHaveTextContent('Elasticsearch');
142142
expect(rows[3]).toHaveTextContent('.multilingual-e5-small');
@@ -145,7 +145,7 @@ describe('When the tabular page is loaded', () => {
145145
expect(rows[4]).toHaveTextContent('rainbow-sprinkles');
146146

147147
expect(rows[5]).toHaveTextContent('Elastic');
148-
expect(rows[5]).toHaveTextContent('elser-v2');
148+
expect(rows[5]).toHaveTextContent('elser_model_2');
149149

150150
expect(rows[6]).toHaveTextContent('Elasticsearch');
151151
expect(rows[6]).toHaveTextContent('.rerank-v1');
@@ -201,14 +201,14 @@ describe('When the tabular page is loaded', () => {
201201
expect(rows[9]).not.toHaveTextContent(preconfigured);
202202
});
203203

204-
it('should show tech preview badge only for reranker-v1 model, rainbow-sprinkles, and preconfigured elser-v2', () => {
204+
it('should show tech preview badge only for reranker-v1 model, rainbow-sprinkles, and preconfigured elser_model_2', () => {
205205
render(<TabularPage inferenceEndpoints={inferenceEndpoints} />);
206206

207207
const techPreview = 'TECH PREVIEW';
208208

209209
const rows = screen.getAllByRole('row');
210-
expect(rows[1]).not.toHaveTextContent(techPreview);
211-
expect(rows[2]).toHaveTextContent(techPreview);
210+
expect(rows[1]).toHaveTextContent(techPreview);
211+
expect(rows[2]).not.toHaveTextContent(techPreview);
212212
expect(rows[3]).not.toHaveTextContent(techPreview);
213213
expect(rows[4]).toHaveTextContent(techPreview);
214214
expect(rows[5]).not.toHaveTextContent(techPreview);

x-pack/solutions/search/plugins/search_inference_endpoints/public/utils/reranker_helper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ export const isProviderTechPreview = (provider: InferenceInferenceEndpointInfo)
2323

2424
/*
2525
For rerank task type, model ID starting with '.' indicates tech preview
26-
Special case for 'rainbow-sprinkles' model
26+
Special case for 'rainbow-sprinkles' model and ELSER on EIS
2727
*/
2828
if (
2929
(taskType === 'rerank' && modelId.startsWith('.')) ||
3030
modelId === 'rainbow-sprinkles' ||
31-
(modelId === 'elser-v2' &&
31+
(modelId === 'elser_model_2' &&
3232
inferenceId.startsWith('.') &&
3333
service === ServiceProviderKeys.elastic)
3434
) {

0 commit comments

Comments
 (0)