Skip to content

Commit e861dc3

Browse files
Address PR feedback (N1, N2, and GraderPipeline nit): change SystemEvaluator default name to system_evaluator, restore deleted blank line in Cloud Run entrypoint, and rename add_code_grader to add_system_grader
1 parent 5b2538c commit e861dc3

8 files changed

Lines changed: 1345 additions & 1246 deletions

File tree

SDK.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@ pipeline = (
588588
},
589589
threshold=0.6,
590590
))
591-
.add_code_grader(SystemEvaluator.latency(threshold_ms=5000), weight=0.2)
592-
.add_code_grader(SystemEvaluator.cost_per_session(max_cost_usd=0.50), weight=0.1)
591+
.add_system_grader(SystemEvaluator.latency(threshold_ms=5000), weight=0.2)
592+
.add_system_grader(SystemEvaluator.cost_per_session(max_cost_usd=0.50), weight=0.1)
593593
.add_llm_grader(LLMAsJudge.correctness(threshold=0.7), weight=0.7)
594594
)
595595

@@ -618,8 +618,8 @@ from bigquery_agent_analytics import BinaryStrategy
618618

619619
pipeline = (
620620
GraderPipeline(BinaryStrategy())
621-
.add_code_grader(SystemEvaluator.latency(threshold_ms=3000))
622-
.add_code_grader(SystemEvaluator.error_rate(max_error_rate=0.05))
621+
.add_system_grader(SystemEvaluator.latency(threshold_ms=3000))
622+
.add_system_grader(SystemEvaluator.error_rate(max_error_rate=0.05))
623623
.add_llm_grader(LLMAsJudge.hallucination(threshold=0.8))
624624
)
625625

@@ -649,7 +649,7 @@ def business_rules_grader(context):
649649

650650
pipeline = (
651651
GraderPipeline(BinaryStrategy())
652-
.add_code_grader(SystemEvaluator.latency())
652+
.add_system_grader(SystemEvaluator.latency())
653653
.add_custom_grader("business_rules", business_rules_grader)
654654
)
655655
```

deploy/streaming_evaluation/main.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from flask import Flask
2020
from flask import jsonify
2121
from flask import request
22+
2223
from worker import handle_scheduled_run
2324

2425
app = Flask(__name__)

0 commit comments

Comments
 (0)