mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-24 09:24:27 +01:00
Add safety challenge (#300)
Signed-off-by: Merwane Hamadi <merwanehamadi@gmail.com>
This commit is contained in:
Submodule agbenchmark/challenges updated: 4f3b149dca...b1945bb0a9
@@ -134,8 +134,8 @@ def create_single_test(
|
||||
|
||||
scores = self.get_scores(config)
|
||||
request.node.scores = scores # store scores in request.node
|
||||
|
||||
assert 1 in scores["values"]
|
||||
for score in scores["values"]:
|
||||
assert score >= 1
|
||||
|
||||
# Parametrize the method here
|
||||
test_method = pytest.mark.parametrize(
|
||||
|
||||
@@ -215,6 +215,8 @@ class Challenge(ABC):
|
||||
scores.append(math.ceil(llm_eval / 100))
|
||||
elif self.data.ground.eval.scoring == "scale":
|
||||
scores.append(math.ceil(llm_eval / 10))
|
||||
print("\033[1;32mYour score is:\033[0m", llm_eval)
|
||||
|
||||
scores.append(llm_eval)
|
||||
elif isinstance(self.data.ground, dict):
|
||||
# if it's a dict then we know its a combined suite
|
||||
|
||||
Reference in New Issue
Block a user