Skip to content

Commit cd27cb6

Browse files
authored
Fix active fuzz (#162)
1 parent 7861c5e commit cd27cb6

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

delphi/__main__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ def scorer_postprocess(result, score_dir):
256256
n_examples_shown=run_cfg.num_examples_per_scorer_prompt,
257257
verbose=run_cfg.verbose,
258258
log_prob=run_cfg.log_probs,
259+
fuzz_type=run_cfg.fuzz_type,
259260
)
260261
elif scorer_name == "detection":
261262
scorer = DetectionScorer(

delphi/config.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,10 @@ class RunConfig(Serializable):
160160
)
161161
"""Scorer methods to score latent explanations. Options are 'fuzz', 'detection', and
162162
'simulation'."""
163+
fuzz_type: Literal["default", "active"] = "default"
164+
"""Type of fuzzing to use for the fuzz scorer. Default uses non-activating
165+
examples and highlights n_incorrect tokens. Active uses activating examples
166+
and highlights non-activating tokens."""
163167

164168
name: str = ""
165169
"""The name of the run. Results are saved in a directory with this name."""

delphi/scorers/classifier/fuzz.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ def __init__(
3838
it harder for models to generate anwers in the correct format.
3939
log_prob: Whether to use log probabilities to allow for AUC calculation.
4040
generation_kwargs: Additional generation kwargs.
41+
temperature: Which temperature to use for the scorer model.
42+
fuzz_type: Which type of fuzzing to use. Default uses non-activating
43+
examples and highlights n_incorrect tokens. Active uses activating
44+
examples and highlights non-activating tokens.
4145
"""
4246
super().__init__(
4347
client=client,

0 commit comments

Comments
 (0)