Skip to content

Commit b05de39

Browse files
committed
peer reiview nits
1 parent 87696ad commit b05de39

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

modules/guardrails-configuring-the-hugging-face-detector-serving-runtime.adoc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ ifdef::context[:parent-context: {context}]
99

1010
To use link:https://huggingface.co/docs/transformers/model_doc/auto#transformers.AutoModelForSequenceClassification[Hugging Face] `AutoModelsForSequenceClassification` as detectors within the Guardrails Orchestrator, you need to first configure a Hugging Face serving runtime.
1111

12-
The link:https://github.com/opendatahub-io/odh-model-controller/blob/incubating/config/runtimes/hf-detector-template.yaml[guardrails-detector-huggingface-runtime] is a KServe serving runtime for Hugging Face predictive text models. This
13-
allows models such as the link:https://huggingface.co/ibm-granite/granite-guardian-hap-38m[ibm-granite/granite-guardian-hap-38m] to be used within the TrustyAI Guardrails ecosystem.
12+
The link:https://github.com/opendatahub-io/odh-model-controller/blob/incubating/config/runtimes/hf-detector-template.yaml[guardrails-detector-huggingface-runtime] is a KServe serving runtime for Hugging Face predictive text models. This allows models such as the link:https://huggingface.co/ibm-granite/granite-guardian-hap-38m[ibm-granite/granite-guardian-hap-38m] to be used within the TrustyAI Guardrails ecosystem.
1413

1514
.Example custom serving runtime
1615

@@ -58,9 +57,7 @@ spec:
5857
protocol: TCP
5958
----
6059

61-
The above serving runtime example matches the default template used with {productname-long}, and should suffice
62-
for the majority of use-cases. The main relevant configuration parameter is the `SAFE_LABELS` environment variable. This specifies which prediction label or labels from the `AutoModelForSequenceClassification` constitute a "safe" response and therefore should not trigger guardrailing. For example, if `[0, 1]` is specified as `SAFE_LABELS`
63-
for a four-class model, a predicted label of `0` or `1` is considered "safe", while a predicted label of `2` or `3` triggers guardrailing. The default value is `[0]`.
60+
The above serving runtime example matches the default template used with {productname-long}, and should suffice for the majority of use-cases. The main relevant configuration parameter is the `SAFE_LABELS` environment variable. This specifies which prediction label or labels from the `AutoModelForSequenceClassification` constitute a "safe" response and therefore should not trigger guardrailing. For example, if `[0, 1]` is specified as `SAFE_LABELS` for a four-class model, a predicted label of `0` or `1` is considered "safe", while a predicted label of `2` or `3` triggers guardrailing. The default value is `[0]`.
6461

6562
== Guardrails Detector Hugging Face serving runtime configuration values
6663

modules/guardrails-orchestrator-detectors.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ The Guardrails framework provides a set of “built-in” detectors out-of-the-b
4848
`custom`::
4949
_Developer preview_
5050
* Custom detectors defined via a `custom_detectors.py` file.
51-
51+
+
5252
The detector algorithm can be chosen with `detector_params`, by first choosing the top-level taxonomy (e.g., `regex` or `file_type`) and then providing a list of the desired algorithms from within
53-
that category. In the following example, both the `credit-card` and `email` algorithms are run against the provided message.:
53+
that category. In the following example, both the `credit-card` and `email` algorithms are run against the provided message:
5454

5555
[source,json]
5656
----

0 commit comments

Comments
 (0)