File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,7 +235,28 @@ def orchestrator_config_gpu(
235235 teardown_resources : bool ,
236236 pytestconfig : pytest .Config ,
237237) -> Generator [ConfigMap , Any , Any ]:
238-
238+ """
239+ Fixture for creating and managing the Guardrails Orchestrator ConfigMap.
240+
241+ This fixture dynamically generates the orchestrator configuration used in tests,
242+ including detector setup and OpenAI/vLLM integration. It supports both built-in
243+ detectors and external HuggingFace-based detectors depending on test parameters.
244+
245+ Args:
246+ request: Pytest request object used to access parametrization
247+ admin_client: Kubernetes client for resource management
248+ model_namespace: Namespace where resources are deployed
249+ teardown_resources: Whether to clean up resources after test execution
250+ pytestconfig: Pytest configuration (used for post-upgrade handling)
251+
252+ Returns:
253+ Generator[ConfigMap, Any, Any]: ConfigMap containing orchestrator configuration
254+
255+ Behavior:
256+ - Reuses existing ConfigMap in post-upgrade scenarios
257+ - Uses built-in detectors if `use_builtin_detectors` is set
258+ - Otherwise configures external detectors (e.g., prompt injection, HAP)
259+ """
239260 if pytestconfig .option .post_upgrade :
240261 cm = ConfigMap (
241262 client = admin_client ,
You can’t perform that action at this time.
0 commit comments