Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
export const LEGACY_CUSTOM_INFERENCE_ID = 'obs_ai_assistant_kb_inference';

export const ELSER_ON_ML_NODE_INFERENCE_ID = '.elser-2-elasticsearch';
export const ELSER_IN_EIS_INFERENCE_ID = '.elser-v2-elastic';
export const ELSER_IN_EIS_INFERENCE_ID = '.elser-2-elastic';

export const E5_SMALL_INFERENCE_ID = '.multilingual-e5-small-elasticsearch';
export const E5_LARGE_IN_EIS_INFERENCE_ID = '.multilingual-e5-large-elastic'; // TODO: verify the inference ID once it's created in EIS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,19 @@ const inferenceEndpoints = [
},
},
{
inference_id: '.elser-v2-elastic',
inference_id: '.elser-2-elastic',
Copy link
Contributor

Choose a reason for hiding this comment

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

@timgrein This might create an ordering issue in the inference table. I suspect the CI failures are because of that.

task_type: 'sparse_embedding',
service: 'elastic',
service_settings: {
model_id: 'elser-v2',
model_id: 'elser_model_2',
},
},
{
inference_id: 'custom-inference-id',
task_type: 'sparse_embedding',
service: 'elastic',
service_settings: {
model_id: 'elser-v2',
model_id: 'elser_model_2',
},
},
] as InferenceAPIConfigResponse[];
Expand All @@ -117,8 +117,8 @@ describe('When the tabular page is loaded', () => {
render(<TabularPage inferenceEndpoints={inferenceEndpoints} />);

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

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

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

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

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

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

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

const techPreview = 'TECH PREVIEW';

const rows = screen.getAllByRole('row');
expect(rows[1]).not.toHaveTextContent(techPreview);
expect(rows[2]).toHaveTextContent(techPreview);
expect(rows[1]).toHaveTextContent(techPreview);
Copy link
Contributor

Choose a reason for hiding this comment

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

now rows[2] will not have tech preview

expect(rows[2]).not.toHaveTextContent(techPreview);
expect(rows[3]).not.toHaveTextContent(techPreview);
expect(rows[4]).toHaveTextContent(techPreview);
expect(rows[5]).not.toHaveTextContent(techPreview);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ export const isProviderTechPreview = (provider: InferenceInferenceEndpointInfo)

/*
For rerank task type, model ID starting with '.' indicates tech preview
Special case for 'rainbow-sprinkles' model
Special case for 'rainbow-sprinkles' model and ELSER on EIS
*/
if (
(taskType === 'rerank' && modelId.startsWith('.')) ||
modelId === 'rainbow-sprinkles' ||
(modelId === 'elser-v2' &&
(modelId === 'elser_model_2' &&
inferenceId.startsWith('.') &&
service === ServiceProviderKeys.elastic)
) {
Expand Down