Skip to content

Commit cc598c3

Browse files
committed
Fix config parameter for evaluation scripts.
1 parent 423b63d commit cc598c3

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

nemoguardrails/eval/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Guardrails Evaluation
22

3-
For an up-to-date overview about the evaluation tools and experiments for the different types of rails supported by NeMo Guardrails, consult [this page](./../../docs/evaluation/README.md).
3+
For an up-to-date overview about the evaluation tools and experiments for the different types of rails supported by NeMo Guardrails, check out [this page](./../../docs/evaluation/README.md).

nemoguardrails/eval/cli/evaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def topical(
8989
typer.echo(f"Starting the evaluation for app: {config[0]}...")
9090

9191
topical_eval = TopicalRailsEvaluation(
92-
config_path=config[0],
92+
config=config[0],
9393
verbose=verbose,
9494
test_set_percentage=test_percentage,
9595
max_samples_per_intent=max_samples_intent,

nemoguardrails/eval/evaluate_factcheck.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class FactCheckEvaluation:
3636

3737
def __init__(
3838
self,
39-
config_path: str,
39+
config: str,
4040
dataset_path: str = "data/factchecking/sample.json",
4141
num_samples: int = 50,
4242
create_negatives: bool = True,
@@ -55,7 +55,7 @@ def __init__(
5555
- write_outputs: whether to write the predictions to file
5656
"""
5757

58-
self.config_path = config_path
58+
self.config_path = config
5959
self.dataset_path = dataset_path
6060
self.rails_config = RailsConfig.from_path(self.config_path)
6161
self.rails = LLMRails(self.rails_config)

nemoguardrails/eval/evaluate_hallucination.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class HallucinationRailsEvaluation:
3535

3636
def __init__(
3737
self,
38-
config_path: str,
38+
config: str,
3939
dataset_path: str = "data/hallucination/sample.txt",
4040
num_samples: int = 50,
4141
output_dir: str = "outputs/hallucination",
@@ -52,7 +52,7 @@ def __init__(
5252
- write_outputs: whether to write the predictions to file
5353
"""
5454

55-
self.config_path = config_path
55+
self.config_path = config
5656
self.dataset_path = dataset_path
5757
self.rails_config = RailsConfig.from_path(self.config_path)
5858
self.rails = LLMRails(self.rails_config)

nemoguardrails/eval/evaluate_moderation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class ModerationRailsEvaluation:
3232

3333
def __init__(
3434
self,
35-
config_path: str,
35+
config: str,
3636
dataset_path: str = "nemoguardrails/nemoguardrails/eval/data/moderation/harmful.txt",
3737
num_samples: int = 50,
3838
check_input: bool = True,
@@ -54,7 +54,7 @@ def __init__(
5454
- split: whether the dataset is harmful or helpful
5555
"""
5656

57-
self.config_path = config_path
57+
self.config_path = config
5858
self.dataset_path = dataset_path
5959
self.rails_config = RailsConfig.from_path(self.config_path)
6060
self.rails = LLMRails(self.rails_config)

nemoguardrails/eval/evaluate_topical.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _print_evaluation_results(
135135

136136
def __init__(
137137
self,
138-
config_path: str,
138+
config: str,
139139
verbose: Optional[bool] = False,
140140
test_set_percentage: Optional[float] = 0.3,
141141
max_tests_per_intent: Optional[int] = 3,
@@ -162,7 +162,7 @@ def __init__(
162162
- random_seed: Random seed used by the evaluation.
163163
- output_dir: Output directory for predictions.
164164
"""
165-
self.config_path = config_path
165+
self.config_path = config
166166
self.verbose = verbose
167167
self.test_set_percentage = test_set_percentage
168168
self.max_tests_per_intent = max_tests_per_intent

0 commit comments

Comments
 (0)