Skip to content

Commit

Permalink
Merge branch 'ayushmishra/batch-score-oss' of https://github.com/Azur…
Browse files Browse the repository at this point in the history
…e/azureml-assets into ayushmishra/batch-score-oss
  • Loading branch information
novaturient95 committed Sep 18, 2024
2 parents d2aa8db + d1ad19e commit b3b8542
Show file tree
Hide file tree
Showing 26 changed files with 40 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from enum import Enum
from typing import Dict, List, Optional, Union

from azure.identity import DefaultAzureCredential, get_bearer_token_provider
from azureml.contrib.services.aml_request import AMLRequest, rawhttp
from azureml.contrib.services.aml_response import AMLResponse
from db_copilot.contract.memory_core import MemoryItem
Expand Down Expand Up @@ -69,22 +68,12 @@ def init():
)
else:
logging.info("using managed identity access Azure OpenAI")
try:
token_provider = get_bearer_token_provider(
DefaultAzureCredential(), "https://cognitiveservices.azure.com/.default"
)
logging.info("Successfully obtained token")
except Exception as e:
logging.error(f"Failed to obtain token: {e}")
raise Exception(f"Failed to obtain token: {e}")
embedding_aoai_connection = AzureOpenAIConnection(
token_provider=token_provider,
api_base=secret_manager.get("embedding-aoai-api-base"),
api_type="azure",
api_version="2023-03-15-preview",
)
chat_aoai_connection = AzureOpenAIConnection(
token_provider=token_provider,
api_base=secret_manager.get("chat-aoai-api-base"),
api_type="azure",
api_version="2023-03-15-preview",
Expand Down Expand Up @@ -303,7 +292,7 @@ def _get_db_provider(request_body: RequestBody, session_id: str):
return db_copilot
else:
return AMLResponse(
"No db_copilot is available. Please specify Session id or datasotre_uri or db_name is required",
"No db_copilot is available. Please specify Session id or datastore_uri or db_name is required",
400,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ RUN apt-get update \
python3.10 \
libpython3.10-minimal \
libpython3.10-stdlib \
curl=7.81.0-1ubuntu1.17 \
libcurl4=7.81.0-1ubuntu1.17 \
curl \
libcurl4 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ azureml-acft-accelerator=={{latest-pypi-version}}
azureml-acft-common-components[image]~={{latest-pypi-version}}
azureml-acft-image-components=={{latest-pypi-version}}
azureml-core=={{latest-pypi-version}}
azure-ai-ml==1.16.1
azure-ai-ml==1.19.0
requests
datasets==2.19.0
transformers==4.39.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ azureml-acft-accelerator=={{latest-pypi-version}}
azureml-acft-common-components[image]~={{latest-pypi-version}}
azureml-acft-image-components=={{latest-pypi-version}}
azureml-core=={{latest-pypi-version}}
azure-ai-ml==1.16.1
azure-ai-ml==1.19.0
requests
datasets==2.15.0
transformers==4.38.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ azureml-acft-accelerator=={{latest-pypi-version}}
azureml-acft-common-components[image]~={{latest-pypi-version}}
azureml-acft-image-components=={{latest-pypi-version}}
azureml-core=={{latest-pypi-version}}
azure-ai-ml==1.18.0
azure-ai-ml==1.19.0
requests>=2.31.0
datasets==2.15.0
transformers==4.36.2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
azureml-acft-common-components~={{latest-pypi-version}}
azure-ai-ml==1.16.1
azure-ai-ml==1.19.0
mldesigner
mlflow
azureml-mlflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN pip install azureml-metrics==0.0.33
# Vulnerability fix
RUN pip install datasets==2.15.0
RUN pip install pyarrow==14.0.1
RUN pip install cryptography==42.0.5
RUN pip install cryptography>=43.0.1
RUN pip install gunicorn==22.0.0
RUN pip install onnxruntime==1.17.3
RUN pip install onnx==1.16.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: pipeline
name: automl_hts_inference
display_name: AutoML Hierarchical Timeseries Forecasting - Inference
description: Enables inference for hts components.
version: 0.0.5
version: 0.0.6
is_deterministic: false

inputs:
Expand Down Expand Up @@ -74,7 +74,7 @@ outputs:
jobs:
automl_hts_inference_setup:
type: command
component: azureml:automl_hts_inference_setup_step:0.0.5
component: azureml:automl_hts_inference_setup_step:0.0.6
inputs:
raw_Data: ${{parent.inputs.raw_data}}
enable_event_logger: True
Expand All @@ -97,7 +97,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_hts_model_inference:
type: parallel
component: azureml:automl_hts_prs_inference_step:0.0.5
component: azureml:automl_hts_prs_inference_step:0.0.6
inputs:
partitioned_data: ${{parent.jobs.automl_hts_inference_setup.outputs.processed_data}}
metadata: ${{parent.jobs.automl_hts_inference_setup.outputs.metadata}}
Expand All @@ -121,7 +121,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_hts_inference_collect_step:
type: command
component: azureml:automl_hts_inference_collect_step:0.0.5
component: azureml:automl_hts_inference_collect_step:0.0.6
inputs:
setup_metadata: ${{parent.jobs.automl_hts_inference_setup.outputs.metadata}}
input_metadata: ${{parent.jobs.automl_hts_model_inference.outputs.output_metadata}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_hts_inference_collect_step
version: 0.0.5
version: 0.0.6
display_name: AutoML HTS - Inference Collect
type: command

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_hts_inference_setup_step
version: 0.0.5
version: 0.0.6
display_name: AutoML HTS - Inference Setup
type: command

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json
type: parallel
version: 0.0.5
version: 0.0.6

name: automl_hts_prs_inference_step
display_name: AutoML HTS - Inference Step
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/parallelComponent.schema.json
type: parallel
version: 0.0.5
version: 0.0.6

name: automl_hts_data_aggregation_step
display_name: AutoML HTS - Training Data Aggregation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/parallelComponent.schema.json
type: parallel
version: 0.0.5
version: 0.0.6

name: automl_hts_automl_training_step
display_name: AutoML HTS - AutoML Training
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: pipeline
name: automl_hts_training
display_name: AutoML Hierarchical Timeseries Forecasting - Training
description: Enables AutoML Training for hts components.
version: 0.0.5
version: 0.0.6
is_deterministic: false

inputs:
Expand Down Expand Up @@ -40,7 +40,7 @@ outputs:
jobs:
automl_hts_train_setup_step:
type: command
component: azureml:automl_hts_training_setup_step:0.0.5
component: azureml:automl_hts_training_setup_step:0.0.6
inputs:
raw_Data: ${{parent.inputs.raw_data}}
automl_config: ${{parent.inputs.automl_config}}
Expand All @@ -56,7 +56,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_hts_data_aggregation_step:
type: parallel
component: azureml:automl_hts_data_aggregation_step:0.0.5
component: azureml:automl_hts_data_aggregation_step:0.0.6
inputs:
partitioned_data: ${{parent.jobs.automl_hts_train_setup_step.outputs.processed_data}}
metadata: ${{parent.jobs.automl_hts_train_setup_step.outputs.metadata}}
Expand All @@ -80,7 +80,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_hts_automl_training_step:
type: parallel
component: azureml:automl_hts_automl_training_step:0.0.5
component: azureml:automl_hts_automl_training_step:0.0.6
inputs:
aggregated_data: ${{parent.jobs.automl_hts_data_aggregation_step.outputs.aggregated_data}}
data_agg_metadata: ${{parent.jobs.automl_hts_data_aggregation_step.outputs.output_metadata}}
Expand All @@ -104,7 +104,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_hts_train_collect_step:
type: command
component: azureml:automl_hts_training_collect_step:0.0.5
component: azureml:automl_hts_training_collect_step:0.0.6
inputs:
setup_metadata: ${{parent.jobs.automl_hts_train_setup_step.outputs.metadata}}
input_metadata: ${{parent.jobs.automl_hts_automl_training_step.outputs.output_metadata}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_hts_training_collect_step
version: 0.0.5
version: 0.0.6
display_name: AutoML HTS - Collection Training Results
type: command

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_hts_training_setup_step
version: 0.0.5
version: 0.0.6
display_name: AutoML HTS - Training Setup
type: command

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/parallelComponent.schema.js

name: automl_many_models_training_step
display_name: AutoML Many Models - AutoML Training
version: 0.0.5
version: 0.0.6
is_deterministic: false

type: parallel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: pipeline
name: automl_many_models_training
display_name: AutoML - Many Models Training
description: Enables AutoML many models training.
version: 0.0.5
version: 0.0.6
is_deterministic: false

inputs:
Expand Down Expand Up @@ -44,7 +44,7 @@ outputs:
jobs:
automl_many_models_training_setup_step:
type: command
component: azureml:automl_many_models_training_setup_step:0.0.5
component: azureml:automl_many_models_training_setup_step:0.0.6
inputs:
raw_Data: ${{parent.inputs.raw_data}}
automl_config: ${{parent.inputs.automl_config}}
Expand All @@ -61,7 +61,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_many_models_training_step:
type: parallel
component: azureml:automl_many_models_training_step:0.0.5
component: azureml:automl_many_models_training_step:0.0.6
inputs:
partitioned_data: ${{parent.jobs.automl_many_models_training_setup_step.outputs.processed_data}}
metadata: ${{parent.jobs.automl_many_models_training_setup_step.outputs.metadata}}
Expand All @@ -84,7 +84,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_many_models_training_collect_step:
type: command
component: azureml:automl_many_models_training_collection_step:0.0.5
component: azureml:automl_many_models_training_collection_step:0.0.6
inputs:
setup_metadata: ${{parent.jobs.automl_many_models_training_setup_step.outputs.metadata}}
input_metadata: ${{parent.jobs.automl_many_models_training_step.outputs.output_metadata}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_many_models_training_collection_step
version: 0.0.5
version: 0.0.6
display_name: AutoML Many Models - Collection Training Results
is_deterministic: false
type: command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_many_models_training_setup_step
version: 0.0.5
version: 0.0.6
display_name: AutoML Many Models - Training Setup Step
is_deterministic: false
type: command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: automl_tabular_data_partitioning
type: spark
display_name: AutoML - Tabular Data Partitioning
description: Enables dataset partitioning for AutoML many models and hierarchical timeseries solution accelerators using spark.
version: 0.0.5
version: 0.0.6
is_deterministic: false

code: ../../src/spark_partition/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type: pipeline
name: automl_many_models_inference
display_name: AutoML Many Models - Inference
description: Inference components for AutoML many model.
version: 0.0.5
version: 0.0.6
is_deterministic: false

inputs:
Expand Down Expand Up @@ -93,7 +93,7 @@ outputs:
jobs:
automl_many_models_inference_setup_step:
type: command
component: azureml:automl_many_models_inference_setup_step:0.0.5
component: azureml:automl_many_models_inference_setup_step:0.0.6
inputs:
raw_Data: ${{parent.inputs.raw_data}}
enable_event_logger: True
Expand All @@ -120,7 +120,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_many_models_inferencing_step:
type: parallel
component: azureml:automl_many_models_inference_step:0.0.5
component: azureml:automl_many_models_inference_step:0.0.6
inputs:
partitioned_data: ${{parent.jobs.automl_many_models_inference_setup_step.outputs.processed_data}}
metadata: ${{parent.jobs.automl_many_models_inference_setup_step.outputs.metadata}}
Expand All @@ -145,7 +145,7 @@ jobs:
compute: ${{parent.inputs.compute_name}}
automl_many_models_inference_collect_step:
type: command
component: azureml:automl_many_models_inference_collect_step:0.0.5
component: azureml:automl_many_models_inference_collect_step:0.0.6
inputs:
setup_metadata: ${{parent.jobs.automl_many_models_inference_setup_step.outputs.metadata}}
input_metadata: ${{parent.jobs.automl_many_models_inferencing_step.outputs.output_metadata}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_many_models_inference_collect_step
version: 0.0.5
version: 0.0.6
display_name: AutoML Many Models - Collection Inference Results
is_deterministic: false
type: command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/pipelineJob.schema.json

name: automl_many_models_inference_step
display_name: AutoML Many Models - Inference Step
version: 0.0.5
version: 0.0.6
is_deterministic: false

type: parallel
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json
name: automl_many_models_inference_setup_step
version: 0.0.5
version: 0.0.6
display_name: AutoML Many Models - Inference Setup Step
is_deterministic: false
type: command
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ $schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.jso
name: automl_forecasting_inference
display_name: AutoML Forecasting Inference
description: Inference component for AutoML Forecasting.
version: 0.0.8
version: 0.0.9
type: command

inputs:
Expand Down

0 comments on commit b3b8542

Please sign in to comment.