Skip to content

Commit dfe2197

Browse files
authored
Exclude the streaming environment variable when creating model deployments. (#1180)
1 parent cbdb2bd commit dfe2197

File tree

9 files changed

+17
-34
lines changed

9 files changed

+17
-34
lines changed

ads/aqua/config/container_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ def from_service_config(
196196
config_keys = {
197197
"MODEL_DEPLOY_PREDICT_ENDPOINT": UNKNOWN,
198198
"MODEL_DEPLOY_HEALTH_ENDPOINT": UNKNOWN,
199-
"MODEL_DEPLOY_ENABLE_STREAMING": UNKNOWN,
200199
"PORT": UNKNOWN,
201200
"HEALTH_CHECK_PORT": UNKNOWN,
202201
"VLLM_USE_V1": UNKNOWN,

tests/unitary/with_extras/aqua/test_data/deployment/aqua_create_deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ spec:
2424
spec:
2525
env:
2626
BASE_MODEL: service_models/model-name/artifact
27-
MODEL_DEPLOY_ENABLE_STREAMING: 'true'
2827
MODEL_DEPLOY_PREDICT_ENDPOINT: /v1/completions
2928
PARAMS: --served-model-name odsc-llm --seed 42 --trust-remote-code --max-model-len 4096
3029
healthCheckPort: 8080

tests/unitary/with_extras/aqua/test_data/deployment/aqua_create_gguf_deployment.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ spec:
2828
env:
2929
BASE_MODEL: service_models/model-name/artifact
3030
BASE_MODEL_FILE: model-name.gguf
31-
MODEL_DEPLOY_ENABLE_STREAMING: 'true'
3231
MODEL_DEPLOY_PREDICT_ENDPOINT: /v1/completions
3332
MODEL_DEPLOY_HEALTH_ENDPOINT: /v1/models
3433
healthCheckPort: 8080

tests/unitary/with_extras/aqua/test_data/ui/container_index.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@
99
{
1010
"MODEL_DEPLOY_HEALTH_ENDPOINT": "/v1/models"
1111
},
12-
{
13-
"MODEL_DEPLOY_ENABLE_STREAMING": "true"
14-
},
1512
{
1613
"PORT": "8080"
1714
},
@@ -33,9 +30,6 @@
3330
{
3431
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions"
3532
},
36-
{
37-
"MODEL_DEPLOY_ENABLE_STREAMING": "true"
38-
},
3933
{
4034
"PORT": "8080"
4135
},
@@ -59,9 +53,6 @@
5953
{
6054
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions"
6155
},
62-
{
63-
"MODEL_DEPLOY_ENABLE_STREAMING": "true"
64-
},
6556
{
6657
"PORT": "8080"
6758
},

tests/unitary/with_extras/aqua/test_deployment.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,6 @@ class TestDataset:
118118
"health_check_port": 8080,
119119
"additional_configurations": {
120120
"HEALTH_CHECK_PORT": "8080",
121-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
122121
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
123122
"PORT": "8080",
124123
"modelFormats": "SAFETENSORS",
@@ -150,7 +149,6 @@ class TestDataset:
150149
{
151150
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
152151
"MODEL_DEPLOY_HEALTH_ENDPOINT": "",
153-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
154152
"PORT": "8080",
155153
"HEALTH_CHECK_PORT": "8080",
156154
}
@@ -202,7 +200,6 @@ class TestDataset:
202200
"environment_configuration_type": "OCIR_CONTAINER",
203201
"environment_variables": {
204202
"BASE_MODEL": "service_models/model-name/artifact",
205-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
206203
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
207204
"PARAMS": "--served-model-name odsc-llm --seed 42",
208205
},
@@ -326,7 +323,6 @@ class TestDataset:
326323
"environment_variables": {
327324
"BASE_MODEL": "service_models/model-name/artifact",
328325
"BASE_MODEL_FILE": "model-name.gguf",
329-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
330326
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
331327
"MODEL_DEPLOY_HEALTH_ENDPOINT": "/v1/models",
332328
},
@@ -451,7 +447,6 @@ class TestDataset:
451447
"model_id": "ocid1.datasciencemodel.oc1.<region>.<OCID>",
452448
"environment_variables": {
453449
"BASE_MODEL": "service_models/model-name/artifact",
454-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
455450
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
456451
"PARAMS": "--served-model-name odsc-llm --seed 42",
457452
},
@@ -531,7 +526,6 @@ class TestDataset:
531526
aqua_deployment_gguf_env_vars = {
532527
"BASE_MODEL": "service_models/model-name/artifact",
533528
"BASE_MODEL_FILE": "model-name.gguf",
534-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
535529
"MODEL_DEPLOY_HEALTH_ENDPOINT": "/v1/models",
536530
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
537531
}

tests/unitary/with_extras/aqua/test_ui.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,17 @@
1515
import pytest
1616
from oci.data_science.models import (
1717
ContainerSummary,
18-
WorkloadConfigurationDetails,
19-
ModelDeployWorkloadConfigurationDetails,
2018
JobRunWorkloadConfigurationDetails,
19+
ModelDeployWorkloadConfigurationDetails,
20+
WorkloadConfigurationDetails,
2121
)
22-
23-
from ads.aqua.app import AquaApp
24-
from ads.aqua.extension.base_handler import AquaAPIhandler
2522
from parameterized import parameterized
2623

2724
import ads.config
25+
from ads.aqua.app import AquaApp
2826
from ads.aqua.common.errors import AquaValueError
2927
from ads.aqua.common.utils import load_config
28+
from ads.aqua.extension.base_handler import AquaAPIhandler
3029
from ads.aqua.ui import AquaUIApp
3130
from tests.unitary.with_extras.aqua.utils import ServiceManagedContainers
3231

@@ -607,7 +606,6 @@ def test_list_containers(self, mock_list_service_containers):
607606
"env_vars": [
608607
{"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions"},
609608
# {"MODEL_DEPLOY_HEALTH_ENDPOINT": ""},
610-
{"MODEL_DEPLOY_ENABLE_STREAMING": "true"},
611609
{"PORT": "8080"},
612610
{"HEALTH_CHECK_PORT": "8080"},
613611
],

tests/unitary/with_extras/aqua/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ class ServiceManagedContainers:
5858
"health_check_port": 8080,
5959
"additional_configurations": {
6060
"HEALTH_CHECK_PORT": "8080",
61-
"MODEL_DEPLOY_ENABLE_STREAMING": "true",
6261
"MODEL_DEPLOY_PREDICT_ENDPOINT": "/v1/completions",
6362
"PORT": "8080",
6463
"modelFormats": "SAFETENSORS",

tests/unitary/with_extras/model/test_model_framework_lightgbm_model.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright (c) 2021, 2023 Oracle and/or its affiliates.
3+
# Copyright (c) 2021, 2025 Oracle and/or its affiliates.
44
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
55

66
"""Unit tests for model frameworks. Includes tests for:
@@ -10,19 +10,22 @@
1010
import base64
1111
import os
1212
import shutil
13+
import sys
14+
import tempfile
1315
from io import BytesIO
1416

1517
import joblib
1618
import lightgbm as lgb
19+
import mock
1720
import numpy as np
1821
import onnx
1922
import onnxruntime as rt
2023
import pandas as pd
21-
import pytest, mock, sys
22-
import tempfile
24+
import pytest
25+
from sklearn.datasets import load_iris, make_regression
26+
2327
from ads.model.framework.lightgbm_model import LightGBMModel
2428
from ads.model.serde.model_serializer import LightGBMOnnxModelSerializer
25-
from sklearn.datasets import load_iris, make_regression
2629

2730
tmp_model_dir = tempfile.mkdtemp()
2831

tests/unitary/with_extras/model/test_model_framework_spark_pipeline_model.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright (c) 2021, 2023 Oracle and/or its affiliates.
3+
# Copyright (c) 2021, 2025 Oracle and/or its affiliates.
44
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
55

66
"""Unit tests for model frameworks. Includes tests for:
@@ -10,16 +10,17 @@
1010
import os
1111
import shutil
1212
import tempfile
13-
import pytest
13+
1414
import numpy as np
15+
import pytest
1516
from packaging import version
16-
from ads.model.framework.spark_model import SparkPipelineModel
17+
from pyspark.ml.classification import LogisticRegression
18+
from pyspark.ml.feature import HashingTF, Tokenizer
1719
from pyspark.ml.linalg import Vectors
1820
from pyspark.ml.pipeline import Pipeline, PipelineModel
1921
from pyspark.sql import SparkSession
20-
from pyspark.ml.classification import LogisticRegression
21-
from pyspark.ml.feature import HashingTF, Tokenizer
2222

23+
from ads.model.framework.spark_model import SparkPipelineModel
2324

2425
spark = SparkSession.builder.appName("Python Spark SQL basic example").getOrCreate()
2526
artifact_dir1 = tempfile.mkdtemp()

0 commit comments

Comments
 (0)