Skip to content

Commit 8e1d1ff

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 2c0cc90 commit 8e1d1ff

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

tests/fixtures/guardrails.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,14 @@
1313
from ocp_resources.resource import ResourceEditor
1414
from ocp_resources.route import Route
1515

16-
from utilities.constants import HAP_DETECTOR, PROMPT_INJECTION_DETECTOR
17-
from utilities.constants import BUILTIN_DETECTOR_CONFIG, Annotations, Labels, VLLMGPUConfig
16+
from utilities.constants import (
17+
BUILTIN_DETECTOR_CONFIG,
18+
HAP_DETECTOR,
19+
PROMPT_INJECTION_DETECTOR,
20+
Annotations,
21+
Labels,
22+
VLLMGPUConfig,
23+
)
1824
from utilities.guardrails import check_guardrails_health_endpoint
1925

2026
GUARDRAILS_ORCHESTRATOR_NAME: str = "guardrails-orchestrator"

tests/model_explainability/guardrails/constants.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
STANDALONE_DETECTION_ENDPOINT: str = "api/v2/text/detection/content"
1515

1616

17-
1817
@dataclass
1918
class GuardrailsDetectionPrompt:
2019
"""

tests/model_explainability/guardrails/test_guardrails.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,11 @@
2727
from tests.model_explainability.utils import validate_tai_component_images
2828
from utilities.constants import (
2929
BUILTIN_DETECTOR_CONFIG,
30+
HAP_DETECTOR,
3031
LLM_D_CHAT_GENERATION_CONFIG,
32+
PROMPT_INJECTION_DETECTOR,
3133
LLMdInferenceSimConfig,
32-
Timeout, PROMPT_INJECTION_DETECTOR, HAP_DETECTOR,
34+
Timeout,
3335
)
3436
from utilities.plugins.constant import OpenAIEnpoints
3537

tests/model_explainability/guardrails/test_guardrails_gpu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
verify_health_info_response,
2121
)
2222
from utilities.constants import (
23-
VLLMGPUConfig, PROMPT_INJECTION_DETECTOR, HAP_DETECTOR,
23+
HAP_DETECTOR,
24+
PROMPT_INJECTION_DETECTOR,
25+
VLLMGPUConfig,
2426
)
2527
from utilities.plugins.constant import OpenAIEnpoints
2628

utilities/constants.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,5 +519,6 @@ def get_hostname(cls, namespace: str) -> str:
519519
class PodNotFound(Exception):
520520
"""Pod not found"""
521521

522+
522523
PROMPT_INJECTION_DETECTOR: str = "prompt-injection-detector"
523-
HAP_DETECTOR: str = "hap-detector"
524+
HAP_DETECTOR: str = "hap-detector"

0 commit comments

Comments
 (0)