Skip to content

Commit ea10a42

Browse files
committed
Removes the evaluation inference default parameters from the code.
1 parent e5710ba commit ea10a42

File tree

2 files changed

+12
-36
lines changed

2 files changed

+12
-36
lines changed

ads/aqua/config/evaluation/evaluation_service_config.py

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,6 @@
1010

1111
from ads.aqua.config.utils.serializer import Serializable
1212

13-
# Constants
14-
INFERENCE_RPS = 25 # Max RPS for inferencing deployed model.
15-
INFERENCE_TIMEOUT = 120
16-
INFERENCE_MAX_THREADS = 10 # Maximum parallel threads for model inference.
17-
INFERENCE_RETRIES = 3
18-
INFERENCE_BACKOFF_FACTOR = 3
19-
INFERENCE_DELAY = 0
20-
2113

2214
class ModelParamsOverrides(Serializable):
2315
"""Defines overrides for model parameters, including exclusions and additional inclusions."""
@@ -54,13 +46,6 @@ class Config:
5446
class InferenceParams(Serializable):
5547
"""Contains inference-related parameters with defaults."""
5648

57-
inference_rps: Optional[int] = INFERENCE_RPS
58-
inference_timeout: Optional[int] = INFERENCE_TIMEOUT
59-
inference_max_threads: Optional[int] = INFERENCE_MAX_THREADS
60-
inference_retries: Optional[int] = INFERENCE_RETRIES
61-
inference_backoff_factor: Optional[float] = INFERENCE_BACKOFF_FACTOR
62-
inference_delay: Optional[float] = INFERENCE_DELAY
63-
6449
class Config:
6550
extra = "allow"
6651

@@ -224,20 +209,18 @@ def search_shapes(
224209
-------
225210
List[ShapeConfig]: A list of shapes that match the filters.
226211
"""
227-
results = []
228-
for shape in self.shapes:
229-
if (
230-
evaluation_container
231-
and evaluation_container not in shape.filter.evaluation_container
232-
):
233-
continue
212+
return [
213+
shape
214+
for shape in self.shapes
234215
if (
235-
evaluation_target
236-
and evaluation_target not in shape.filter.evaluation_target
237-
):
238-
continue
239-
results.append(shape)
240-
return results
216+
not evaluation_container
217+
or evaluation_container in shape.filter.evaluation_container
218+
)
219+
and (
220+
not evaluation_target
221+
or evaluation_target in shape.filter.evaluation_target
222+
)
223+
]
241224

242225
class Config:
243226
extra = "ignore"

tests/unitary/with_extras/aqua/test_data/config/evaluation_config_with_default_params.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,7 @@
55
},
66
"inference_params": {
77
"containers": [],
8-
"default": {
9-
"inference_backoff_factor": 3,
10-
"inference_delay": 0,
11-
"inference_max_threads": 10,
12-
"inference_retries": 3,
13-
"inference_rps": 25,
14-
"inference_timeout": 120
15-
}
8+
"default": {}
169
},
1710
"kind": "evaluation",
1811
"report_params": {

0 commit comments

Comments
 (0)