Skip to content

Commit 3a370ee

Browse files
committed
Fix fixture issues / other suggested changes
# Conflicts: # tests/fixtures/inference.py # utilities/constants.py
1 parent 1546283 commit 3a370ee

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,3 +178,4 @@ QWEN.md
178178

179179
# Must-Gather Artifacts
180180
must-gather-collected/
181+
oc.tar

tests/fixtures/guardrails.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ def guardrails_orchestrator(
4848
orchestrator_config = request.getfixturevalue(argname="orchestrator_config")
4949
gorch_kwargs["orchestrator_config"] = orchestrator_config.name
5050

51-
if request.param.get("orchestrator_config_gpu"):
51+
elif request.param.get("orchestrator_config_gpu"):
5252
orchestrator_config = request.getfixturevalue(argname="orchestrator_config_gpu")
5353
gorch_kwargs["orchestrator_config"] = orchestrator_config.name
5454

55-
if request.param.get("orchestrator_config_builtin_gpu"):
55+
elif request.param.get("orchestrator_config_builtin_gpu"):
5656
orchestrator_config = request.getfixturevalue(argname="orchestrator_config_builtin_gpu")
5757
gorch_kwargs["orchestrator_config"] = orchestrator_config.name
5858

tests/model_explainability/guardrails/test_guardrails_gpu.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
indirect=True,
6767
)
6868
@pytest.mark.smoke
69+
@pytest.mark.gpu
6970
@pytest.mark.rawdeployment
7071
@pytest.mark.usefixtures("patched_dsc_kserve_headed", "guardrails_gateway_config")
7172
class TestGuardrailsOrchestratorWithBuiltInDetectors:
@@ -206,8 +207,8 @@ def test_guardrails_builtin_detectors_negative_detection(
206207
class TestGuardrailsOrchestratorHuggingFaceGPU:
207208
"""
208209
These tests verify that the GuardrailsOrchestrator works as expected when using HuggingFace detectors
209-
Steps:/
210-
- Deploy an LLM (Qwen2.5-0.5B-Instruct) using the vLLM SR.
210+
Steps:
211+
- Deploy an LLM (Qwen2.5-3B-Instruct) using the vLLM SR.
211212
- Deploy the GuardrailsOrchestrator.
212213
- Deploy a prompt injection detector using the HuggingFace SR.
213214
- Check that the detector works when we have an unsuitable input.

utilities/constants.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ class LLMdInferenceSimConfig:
497497
"service": {"hostname": f"{LLMdInferenceSimConfig.isvc_name}-predictor", "port": 80}
498498
}
499499

500-
500+
@dataclass
501501
class VLLMGPUConfig:
502502
name: str = "vllm-gpu"
503503
port: int = 80
@@ -509,11 +509,12 @@ class VLLMGPUConfig:
509509
def get_hostname(cls, namespace: str) -> str:
510510
return f"{cls.isvc_name}-predictor.{namespace}.svc.cluster.local"
511511

512-
513512
VLLM_CHAT_GENERATION_CONFIG: dict[str, Any] = {
514-
"service": {"hostname": VLLMGPUConfig.get_hostname("test-guardrails-huggingface"), "port": VLLMGPUConfig.port}
513+
"service": {
514+
"hostname": VLLMGPUConfig.get_hostname("test-guardrails-huggingface"),
515+
"port": VLLMGPUConfig.port
516+
}
515517
}
516518

517-
518519
class PodNotFound(Exception):
519520
"""Pod not found"""

0 commit comments

Comments
 (0)