Skip to content

Commit 2a65ea5

Browse files
authored
Merge branch 'main' into pre-commit-ci-update-config
2 parents 04d33d6 + d3bb355 commit 2a65ea5

File tree

17 files changed

+1368
-29
lines changed

17 files changed

+1368
-29
lines changed

conftest.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,22 @@ def pytest_addoption(parser: Parser) -> None:
205205
action="store_true",
206206
)
207207

208+
# KServe health check options
209+
kserve_health_group = parser.getgroup(name="KServe Health")
210+
kserve_health_group.addoption(
211+
"--skip-kserve-health-check",
212+
help="Skip KServe component health check",
213+
action="store_true",
214+
)
215+
216+
# LLMD health check options
217+
llmd_health_group = parser.getgroup(name="LLMD Health")
218+
llmd_health_group.addoption(
219+
"--skip-llmd-health-check",
220+
help="Skip LLMD infrastructure dependency health check",
221+
action="store_true",
222+
)
223+
208224
# HuggingFace options
209225
hf_group.addoption("--hf-access-token", default=os.environ.get("HF_ACCESS_TOKEN"), help="HF access token")
210226
# Model Registry options

tests/fixtures/inference.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
KServeDeploymentType,
2222
LLMdInferenceSimConfig,
2323
RuntimeTemplates,
24+
Timeout,
2425
VLLMGPUConfig,
2526
)
2627
from utilities.inference_utils import create_isvc
@@ -197,7 +198,7 @@ def llm_d_inference_sim_isvc(
197198
deployment_mode=KServeDeploymentType.RAW_DEPLOYMENT,
198199
model_format=LLMdInferenceSimConfig.name,
199200
runtime=llm_d_inference_sim_serving_runtime.name,
200-
wait_for_predictor_pods=True,
201+
wait_for_predictor_pods=False,
201202
min_replicas=1,
202203
max_replicas=1,
203204
resources={
@@ -206,6 +207,12 @@ def llm_d_inference_sim_isvc(
206207
},
207208
teardown=teardown_resources,
208209
) as isvc:
210+
deployment = Deployment(
211+
client=admin_client,
212+
name=f"{isvc.name}-predictor",
213+
namespace=model_namespace.name,
214+
)
215+
deployment.wait_for_replicas(timeout=Timeout.TIMEOUT_2MIN)
209216
yield isvc
210217

211218

@@ -326,3 +333,33 @@ def get_vllm_chat_config(namespace: str) -> dict[str, Any]:
326333
"port": VLLMGPUConfig.port,
327334
}
328335
}
336+
337+
338+
@pytest.fixture(scope="class")
339+
def patched_dsc_garak_kfp(admin_client) -> Generator[DataScienceCluster]:
340+
"""Configure the DataScienceCluster for Garak and KFP (Kubeflow Pipelines) testing.
341+
342+
This fixture patches the DataScienceCluster to enable:
343+
- KServe in Headed mode (using Service port instead of Pod port)
344+
- AI Pipelines component in Managed state
345+
- MLflow operator in Managed state
346+
347+
Waits for the DSC to be ready before yielding.
348+
"""
349+
350+
dsc = get_data_science_cluster(client=admin_client)
351+
with ResourceEditor(
352+
patches={
353+
dsc: {
354+
"spec": {
355+
"components": {
356+
"kserve": {"rawDeploymentServiceConfig": "Headed"},
357+
"aipipelines": {"managementState": "Managed"},
358+
"mlflowoperator": {"managementState": "Managed"},
359+
}
360+
}
361+
}
362+
}
363+
):
364+
wait_for_dsc_status_ready(dsc_resource=dsc)
365+
yield dsc

0 commit comments

Comments
 (0)