Skip to content

Commit 3a2c666

Browse files
authored
Introduce build index on cloud (#35375)
* add entities._indexes * cleanup and refactor * cleanup and fix gates * move ignorePath to cspell in root * serverless support * depend on azureml-rag * remove langchain * remove extra constants * cspell * address comments * pylint * remove _createComponent * mypy and pylint * pylint errors * pylint * docstrings * remove notebook * remove dependency on azureml.rag * remove langchain retriever * mypy, pylint and expose configs * extra constants and pylint * run black * address comments * address more comments * mypy & black * pylint * import Input * one last mypy
1 parent cda953c commit 3a2c666

20 files changed

+1892
-8
lines changed

sdk/ml/azure-ai-ml/azure/ai/ml/constants/_common.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,6 +950,24 @@ class AzureDevopsArtifactsType:
950950
ARTIFACT = "artifact"
951951

952952

953+
class DataIndexTypes:
954+
"""DataIndexTypes is an enumeration of values for the types out indexes which can be written to by DataIndex."""
955+
956+
ACS = "acs"
957+
"""Azure Cognitive Search index type."""
958+
PINECONE = "pinecone"
959+
"""Pinecone index type."""
960+
FAISS = "faiss"
961+
"""Faiss index type."""
962+
963+
964+
class IndexInputType:
965+
"""An enumeration of values for the types of input data for an index."""
966+
967+
GIT = "git"
968+
LOCAL = "local"
969+
970+
953971
class ScheduleType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
954972
JOB = "job"
955973
MONITOR = "monitor"

sdk/ml/azure-ai-ml/azure/ai/ml/constants/_component.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ---------------------------------------------------------
22
# Copyright (c) Microsoft Corporation. All rights reserved.
33
# ---------------------------------------------------------
4+
# pylint: disable=line-too-long
45

56
from typing import Dict
67

@@ -62,6 +63,24 @@ class DataTransferBuiltinComponentUri(object):
6263
EXPORT_DATABASE = "azureml://registries/azureml/components/export_data_database/versions/0.0.1"
6364

6465

66+
class LLMRAGComponentUri:
67+
LLM_RAG_CRACK_AND_CHUNK = "azureml://registries/azureml/components/llm_rag_crack_and_chunk/labels/default"
68+
LLM_RAG_GENERATE_EMBEDDINGS = "azureml://registries/azureml/components/llm_rag_generate_embeddings/labels/default"
69+
LLM_RAG_CRACK_AND_CHUNK_AND_EMBED = (
70+
"azureml://registries/azureml/components/llm_rag_crack_and_chunk_and_embed/labels/default"
71+
)
72+
LLM_RAG_UPDATE_ACS_INDEX = "azureml://registries/azureml/components/llm_rag_update_acs_index/labels/default"
73+
LLM_RAG_UPDATE_PINECONE_INDEX = (
74+
"azureml://registries/azureml/components/llm_rag_update_pinecone_index/labels/default"
75+
)
76+
LLM_RAG_CREATE_FAISS_INDEX = "azureml://registries/azureml/components/llm_rag_create_faiss_index/labels/default"
77+
LLM_RAG_REGISTER_MLINDEX_ASSET = (
78+
"azureml://registries/azureml/components/llm_rag_register_mlindex_asset/labels/default"
79+
)
80+
LLM_RAG_VALIDATE_DEPLOYMENTS = "azureml://registries/azureml/components/llm_rag_validate_deployments/labels/default"
81+
LLM_RAG_CREATE_PROMPTFLOW = "azureml://registries/azureml/components/llm_rag_create_promptflow/labels/default"
82+
83+
6584
class ComponentSource:
6685
"""Indicate where the component is constructed."""
6786

sdk/ml/azure-ai-ml/azure/ai/ml/entities/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@
173173
from ._feature_store_entity.data_column import DataColumn
174174
from ._feature_store_entity.data_column_type import DataColumnType
175175
from ._feature_store_entity.feature_store_entity import FeatureStoreEntity
176+
from ._indexes import (
177+
AzureAISearchConfig,
178+
IndexDataSource,
179+
GitSource,
180+
LocalSource,
181+
)
182+
from ._indexes import ModelConfiguration as IndexModelConfiguration
176183
from ._job.command_job import CommandJob
177184
from ._job.compute_configuration import ComputeConfiguration
178185
from ._job.input_port import InputPort
@@ -548,6 +555,11 @@
548555
"AadCredentialConfiguration",
549556
"Index",
550557
"AzureOpenAIDeployment",
558+
"AzureAISearchConfig",
559+
"IndexDataSource",
560+
"GitSource",
561+
"LocalSource",
562+
"IndexModelConfiguration",
551563
]
552564

553565
# Allow importing these types for backwards compatibility
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# ---------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# ---------------------------------------------------------
4+
"""AzureML Retrieval Augmented Generation (RAG) utilities."""
5+
6+
from .input._ai_search_config import AzureAISearchConfig
7+
from .input._index_data_source import IndexDataSource, GitSource, LocalSource
8+
from .model_config import ModelConfiguration
9+
10+
__all__ = [
11+
"ModelConfiguration",
12+
"AzureAISearchConfig",
13+
"IndexDataSource",
14+
"GitSource",
15+
"LocalSource",
16+
]

0 commit comments

Comments
 (0)