Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: CI errors due to ml commons publish with JDK-21 and k-NN rename #835

Merged
merged 6 commits into from
Jul 19, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 4 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17, 21]
java: [21]
os: [ubuntu-latest]

name: Gradle Check Linux
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
Check-neural-search-windows:
strategy:
matrix:
java: [11, 17, 21]
java: [21]
os: [windows-latest]

name: Gradle Check Windows
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17, 21]
java: [21]
os: [ubuntu-latest]

name: Pre-commit Linux
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:
Precommit-neural-search-windows:
strategy:
matrix:
java: [11, 17, 21]
java: [21]
os: [windows-latest]

name: Pre-commit Windows
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
Restart-Upgrade-BWCTests-NeuralSearch:
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]
os: [ubuntu-latest,windows-latest]
bwc_version : ["2.9.0","2.10.0","2.11.0","2.12.0","2.13.0","2.14.0","2.15.0","2.16.0-SNAPSHOT"]
opensearch_version : [ "3.0.0-SNAPSHOT" ]
Expand All @@ -40,7 +40,7 @@ jobs:
Rolling-Upgrade-BWCTests-NeuralSearch:
strategy:
matrix:
java: [ 11, 17, 21 ]
java: [ 21 ]
os: [ubuntu-latest,windows-latest]
bwc_version: [ "2.16.0-SNAPSHOT" ]
opensearch_version: [ "3.0.0-SNAPSHOT" ]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_aggregations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
needs: Get-CI-Image-Tag
strategy:
matrix:
java: [11, 17, 21]
java: [21]
os: [ubuntu-latest]

name: Integ Tests Linux
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
Check-neural-search-windows:
strategy:
matrix:
java: [11, 17, 21]
java: [21]
os: [windows-latest]

name: Integ Tests Windows
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Enable '.' for nested field in text embedding processor ([#811](https://github.com/opensearch-project/neural-search/pull/811))
### Bug Fixes
- Fix for missing HybridQuery results when concurrent segment search is enabled ([#800](https://github.com/opensearch-project/neural-search/pull/800))
- Fix CI for JDK upgrade towards 21 ([#835](https://github.com/opensearch-project/neural-search/pull/835))
### Infrastructure
- Add BWC for batch ingestion ([#769](https://github.com/opensearch-project/neural-search/pull/769))
- Add backward test cases for neural sparse two phase processor ([#777](https://github.com/opensearch-project/neural-search/pull/777))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.opensearch.index.query.QueryBuilders;
import org.opensearch.index.query.QueryShardContext;
import org.opensearch.knn.index.SpaceType;
import org.opensearch.knn.index.VectorDataType;
import org.opensearch.knn.index.mapper.KNNVectorFieldMapper;
import org.opensearch.knn.index.query.KNNQueryBuilder;

Expand Down Expand Up @@ -119,6 +120,7 @@ public void testRewrite_whenRewriteQuery_thenSuccessful() {
when(mockKNNVectorField.getDimension()).thenReturn(4);
when(mockQueryShardContext.fieldMapper(eq(VECTOR_FIELD_NAME))).thenReturn(mockKNNVectorField);
when(mockKNNVectorField.getSpaceType()).thenReturn(SpaceType.L2);
when(mockKNNVectorField.getVectorDataType()).thenReturn(VectorDataType.FLOAT);
KNNQueryBuilder knnQueryBuilder = new KNNQueryBuilder(VECTOR_FIELD_NAME, VECTOR_QUERY, K);
Query knnQuery = knnQueryBuilder.toQuery(mockQueryShardContext);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -867,7 +867,7 @@ protected float computeExpectedScore(
final String queryText
) {
float[] queryVector = runInference(modelId, queryText);
return spaceType.getVectorSimilarityFunction().compare(queryVector, indexVector);
return spaceType.getKnnVectorSimilarityFunction().compare(queryVector, indexVector);
}

protected Map<String, Object> getTaskQueryResponse(final String taskId) throws Exception {
Expand Down
Loading