[Inference API] Add Alibaba Cloud AI Search Model support to Inference API#111181
[Inference API] Add Alibaba Cloud AI Search Model support to Inference API#111181davidkyle merged 19 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/search-inference-team (Team:Search - Inference) |
|
Pinging @elastic/ent-search-eng (Team:SearchOrg) |
* main: (39 commits) Update README.asciidoc (elastic#111244) ESQL: INLINESTATS (elastic#109583) ESQL: Document a little of `DataType` (elastic#111250) Relax assertions in segment level field stats (elastic#111243) LogsDB data generator - support nested object field (elastic#111206) Validate `Authorization` header in Azure test fixture (elastic#111242) Fixing HistoryStoreTests.testPut() and testStoreWithHideSecrets() (elastic#111246) [ESQL] Remove Named Expcted Types map from testing infrastructure (elastic#111213) Change visibility of createWriter to allow tests from a different package to override it (elastic#111234) [ES|QL] Remove EsqlDataTypes (elastic#111089) Mute org.elasticsearch.repositories.azure.AzureBlobContainerRetriesTests testReadNonexistentBlobThrowsNoSuchFileException elastic#111233 Abstract codec lookup by name, to make CodecService extensible (elastic#111007) Add HTTPS support to `AzureHttpFixture` (elastic#111228) Unmuting tests related to free_context action being processed in ESSingleNodeTestCase (elastic#111224) Upgrade Azure SDK (elastic#111225) Collapse transport versions for 8.14.0 (elastic#111199) Make sure contender uses logs templates (elastic#111183) unmute HistogramPercentileAggregationTests.testBoxplotHistogram (elastic#111223) Refactor Quality Assurance test infrastructure (elastic#111195) Mute org.elasticsearch.xpack.restart.FullClusterRestartIT testDisableFieldNameField {cluster=UPGRADED} elastic#111222 ... # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
* upstream/main: (105 commits) Removing the use of watcher stats from WatchAcTests (elastic#111435) Mute org.elasticsearch.xpack.restart.FullClusterRestartIT testSingleDoc {cluster=UPGRADED} elastic#111434 Make `EnrichPolicyRunner` more properly async (elastic#111321) Mute org.elasticsearch.xpack.restart.FullClusterRestartIT testSingleDoc {cluster=OLD} elastic#111430 Mute org.elasticsearch.xpack.esql.expression.function.aggregate.ValuesTests testGroupingAggregate {TestCase=<long unicode KEYWORDs>} elastic#111428 Mute org.elasticsearch.xpack.esql.expression.function.aggregate.ValuesTests testGroupingAggregate {TestCase=<long unicode TEXTs>} elastic#111429 Mute org.elasticsearch.xpack.repositories.metering.azure.AzureRepositoriesMeteringIT org.elasticsearch.xpack.repositories.metering.azure.AzureRepositoriesMeteringIT elastic#111307 Update semantic_text field to support indexing numeric and boolean data types (elastic#111284) Mute org.elasticsearch.repositories.blobstore.testkit.AzureSnapshotRepoTestKitIT testRepositoryAnalysis elastic#111280 Ensure vector similarity correctly limits inner_hits returned for nested kNN (elastic#111363) Fix LogsIndexModeFullClusterRestartIT (elastic#111362) Remove 4096 bool query max limit from docs (elastic#111421) Fix score count validation in reranker response (elastic#111212) Integrate data generator in LogsDB mode challenge test (elastic#111303) ESQL: Add COUNT and COUNT_DISTINCT aggregation tests (elastic#111409) [Service Account] Add AutoOps account (elastic#111316) [ML] Fix failing test DetectionRulesTests.testEqualsAndHashcode (elastic#111351) [ML] Create and inject APM Inference Metrics (elastic#111293) [DOCS] Additional reranking docs updates (elastic#111350) Mute org.elasticsearch.repositories.azure.RepositoryAzureClientYamlTestSuiteIT org.elasticsearch.repositories.azure.RepositoryAzureClientYamlTestSuiteIT elastic#111345 ... # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
* upstream/main: (132 commits) Fix compile after several merges Update docs with new behavior on skip conditions (elastic#111640) Skip on any instance of node or version features being present (elastic#111268) Skip on any node capability being present (elastic#111585) [DOCS] Publishes Anthropic inference service docs. (elastic#111619) Introduce `ChunkedZipResponse` (elastic#109820) [Gradle] fix esql compile cacheability (elastic#111651) Mute org.elasticsearch.datastreams.logsdb.qa.StandardVersusLogsIndexModeChallengeRestIT testTermsQuery elastic#111666 Mute org.elasticsearch.datastreams.logsdb.qa.StandardVersusLogsIndexModeChallengeRestIT testMatchAllQuery elastic#111664 Mute org.elasticsearch.xpack.esql.analysis.VerifierTests testMatchCommand elastic#111661 Mute org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests testMatchCommandWithMultipleMatches {default} elastic#111660 Mute org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests testMatchCommand {default} elastic#111659 Mute org.elasticsearch.xpack.esql.optimizer.LocalPhysicalPlanOptimizerTests testMatchCommandWithWhereClause {default} elastic#111658 LogsDB qa tests - add specific matcher for source (elastic#111568) ESQL: Move `randomLiteral` (elastic#111647) [ESQL] Clean up UNSUPPORTED type blocks (elastic#111648) ESQL: Remove the `NESTED` DataType (elastic#111495) ESQL: Move more out of esql-core (elastic#111604) Improve MvPSeriesWeightedSum edge case and add more tests (elastic#111552) Add link to flood-stage watermark exception message (elastic#111315) ... # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
|
After this backend PR has been merged, we need to add alibaba to inference endpoints view with proper icon and display fields in the front-end. This is an example PR for Amazon Bedrock. Thank you. |
Ok, I will try to add alibaba to inference endpoints view PR. Thank you! |
davidkyle
left a comment
There was a problem hiding this comment.
This looks really good thank you!
I don't see any problems but this is a large PR so I'd like to review the changes 1 more time and test the inference against an Alibaba AI model myself.
|
@weizijun I resolved the conflict in |
* upstream/main: (22 commits) Prune changelogs after 8.15.0 release Bump versions after 8.15.0 release EIS integration (elastic#111154) Skip LOOKUP/INLINESTATS cases unless on snapshot (elastic#111755) Always enforce strict role validation (elastic#111056) Mute org.elasticsearch.xpack.esql.analysis.VerifierTests testUnsupportedAndMultiTypedFields elastic#111753 [ML] Force time shift integration test (elastic#111620) ESQL: Add tests for sort, where with unsupported type (elastic#111737) [ML] Force time shift documentation (elastic#111668) Fix remote cluster credential secure settings reload (elastic#111535) ESQL: Fix for overzealous validation in case of invalid mapped fields (elastic#111475) Pass allow security manager flag in gradle test policy setup plugin (elastic#111725) Rename streamContent/Separator to bulkContent/Separator (elastic#111716) Mute org.elasticsearch.tdigest.ComparisonTests testSparseGaussianDistribution elastic#111721 Remove 8.14 from branches.json Only emit product origin in deprecation log if present (elastic#111683) Forward port release notes for v8.15.0 (elastic#111714) [ES|QL] Combine Disjunctive CIDRMatch (elastic#111501) ESQL: Remove qualifier from attrs (elastic#110581) Force using the last centroid during merging (elastic#111644) ... # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java # x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/InferenceNamedWriteablesProvider.java
davidkyle
left a comment
There was a problem hiding this comment.
Fantastic I was able to create text embeddings, sparse embeddings and rerank documents in Alibaba with this change.
The comments I've left are all related to the configuration and are suggestions to improve the validation. Otherwise the PR is good Thank You ❤️
* upstream/main: (91 commits) Mute org.elasticsearch.xpack.test.rest.XPackRestIT org.elasticsearch.xpack.test.rest.XPackRestIT elastic#111944 Add audit_unenrolled_* attributes to fleet-agents template (elastic#111909) Fix windows memory locking (elastic#111866) Update OAuth2 OIDC SDK (elastic#108799) Adds a warning about manually mounting snapshots managed by ILM (elastic#111883) Update geoip fixture files and utility methods (elastic#111913) Updated Function Score Query Test with Explain Fixes for 8.15.1 (elastic#111929) Mute org.elasticsearch.xpack.sql.qa.security.JdbcCsvSpecIT org.elasticsearch.xpack.sql.qa.security.JdbcCsvSpecIT elastic#111923 [ESQL] date nanos binary comparisons (elastic#111908) [DOCS] Documents output_field behavior after multiple inference runs (elastic#111875) Add additional BlobCacheMetrics, expose BlobCacheMetrics via SharedBlobCacheService (elastic#111730) Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT elastic#111923 Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {agg-ordering.testHistogramDateTimeWithCountAndOrder_2} elastic#111919 Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {date.testDateParseHaving} elastic#111921 Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {agg-ordering.testHistogramDateTimeWithCountAndOrder_1} elastic#111918 Mute org.elasticsearch.xpack.sql.qa.multi_cluster_with_security.JdbcCsvSpecIT test {datetime.testDateTimeParseHaving} elastic#111922 Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT elastic#111923 Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT test {agg-ordering.testHistogramDateTimeWithCountAndOrder_1} elastic#111918 Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT test {datetime.testDateTimeParseHaving} elastic#111922 Mute org.elasticsearch.xpack.sql.qa.single_node.JdbcCsvSpecIT test {date.testDateParseHaving} elastic#111921 ... # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
* upstream/main: Fail `indexDocs()` on rejection (elastic#111962) Move repo analyzer to its own package (elastic#111963) Add generated evaluators for DateNanos conversion functions (elastic#111961) Clean the last traces from global retention in templates (elastic#111669) Fix known issue docs for elastic#111866 (elastic#111956) x-pack/plugin/otel: introduce x-pack-otel plugin (elastic#111091) Improve reaction to blob store corruptions (elastic#111954) Introduce `StreamingXContentResponse` (elastic#111933) Revert "Add 8.15.0 known issue for memory locking in Windows (elastic#111949)" Test get-snapshots API with missing details (elastic#111903) Add 8.15.0 known issue for memory locking in Windows (elastic#111949) # Conflicts: # server/src/main/java/org/elasticsearch/TransportVersions.java
|
Thanks @weizijun this is great to have another reranker, sparse embeddings and a text embedding service added. I've asked one of the Elasticsearch writers to create the documentation for this change. |
Thanks @davidkyle , What can I do to help with document writing? |
|
@weizijun is there any chance you'd want to add a notebook into https://github.com/elastic/elasticsearch-labs/tree/main/notebooks/integrations to show a few examples? We can use that for a blog post that we can write together too. there's a few tutorials we can also add Alibaba code examples to : https://www.elastic.co/guide/en/elasticsearch/reference/master/semantic-search-semantic-text.html or https://www.elastic.co/guide/en/elasticsearch/reference/master/semantic-search-inference.html depending on the use case. cc @szabosteve |
|
@elasticmachine test this please |
OK, Let me see, and I will add some examples. |
|
@elasticmachine test this please |
|
@elasticmachine test this please |
|
Thanks to @davidkyle for merging this PR. I will write a PR document for our inference service. |
…e API (elastic#111181) Add Alibaba Cloud AI Search Model support to Inference API. Supports the text_embedding, sparse_embedding and rerank tasks. Requires an Alibaba Cloud Account with Alibaba Cloud Opensearch access and an api key used to access Alibaba Cloud AI Search Model.
… and filtering of inference endpoints (#190783) Summary Adds Alibaba AI Search support to the #186206 (relevance/inference_endpoints) management list view. The Elasticsearch PR is: elastic/elasticsearch#111181 I'm not very familiar with kibana. I made this PR from #188670. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
… and filtering of inference endpoints (elastic#190783) Summary Adds Alibaba AI Search support to the elastic#186206 (relevance/inference_endpoints) management list view. The Elasticsearch PR is: elastic/elasticsearch#111181 I'm not very familiar with kibana. I made this PR from elastic#188670. --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com> Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> (cherry picked from commit 12205d5)
…search and filtering of inference endpoints (#190783) (#194597) # Backport This will backport the following commits from `main` to `8.x`: - [[Inference Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering of inference endpoints (#190783)](#190783) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"weizijun","email":"weizijun1989@gmail.com"},"sourceCommit":{"committedDate":"2024-10-01T14:40:18Z","message":"[Inference Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering of inference endpoints (#190783)\n\nSummary\r\nAdds Alibaba AI Search support to the\r\nhttps://github.com//pull/186206\r\n(relevance/inference_endpoints) management list view.\r\n\r\nThe Elasticsearch PR is:\r\nhttps://github.com/elastic/elasticsearch/pull/111181\r\n\r\nI'm not very familiar with kibana. I made this PR from\r\nhttps://github.com//pull/188670.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Dima Arnautov <arnautov.dima@gmail.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"12205d51c5a6ff02737d4312de1ec598f7732608","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:enhancement","💝community","v9.0.0","v8.16.0","backport:version"],"title":"[Inference Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering of inference endpoints","number":190783,"url":"https://github.com/elastic/kibana/pull/190783","mergeCommit":{"message":"[Inference Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering of inference endpoints (#190783)\n\nSummary\r\nAdds Alibaba AI Search support to the\r\nhttps://github.com//pull/186206\r\n(relevance/inference_endpoints) management list view.\r\n\r\nThe Elasticsearch PR is:\r\nhttps://github.com/elastic/elasticsearch/pull/111181\r\n\r\nI'm not very familiar with kibana. I made this PR from\r\nhttps://github.com//pull/188670.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Dima Arnautov <arnautov.dima@gmail.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"12205d51c5a6ff02737d4312de1ec598f7732608"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/190783","number":190783,"mergeCommit":{"message":"[Inference Endpoints View] Adds Alibaba AI Search to Deletion, search and filtering of inference endpoints (#190783)\n\nSummary\r\nAdds Alibaba AI Search support to the\r\nhttps://github.com//pull/186206\r\n(relevance/inference_endpoints) management list view.\r\n\r\nThe Elasticsearch PR is:\r\nhttps://github.com/elastic/elasticsearch/pull/111181\r\n\r\nI'm not very familiar with kibana. I made this PR from\r\nhttps://github.com//pull/188670.\r\n\r\n---------\r\n\r\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\r\nCo-authored-by: Dima Arnautov <arnautov.dima@gmail.com>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"12205d51c5a6ff02737d4312de1ec598f7732608"}},{"branch":"8.x","label":"v8.16.0","branchLabelMappingKey":"^v8.16.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: weizijun <weizijun1989@gmail.com>
Add Alibaba Cloud AI Search Model support to Inference API.
Prerequisites to Model Creation
An Alibaba Cloud Account with Alibaba Cloud Opensearch access
An api key used to access Alibaba Cloud AI Search Model
Inference Model Creation:
Support task_type
We have now added support for these task_types:
We also support other task_types, such as completion, document analyze, document split, image analyze, query analyze.
Here is the document: https://help.aliyun.com/zh/open-search/search-platform/product-overview/introduction-to-search-platform
Testing
Creating the inference endpoint for Alibaba Cloud AI Search
Performing text_embedding inference: