Skip to content

Commit

Permalink
ref: replace if-else chain with dict lookup for response computation
Browse files Browse the repository at this point in the history
  • Loading branch information
iw4p committed Apr 23, 2024
1 parent 9b864b8 commit 4fc17ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CybersecurityBenchmarks/benchmark/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,11 @@ def main(

materialized_llms_under_test = []
if not args.use_precomputed_responses:
materialized_llms_under_test = llms_under_test or [
default_llm_creator(specification) for specification in args.llm_under_test
]
if len(materialized_llms_under_test) == 0:
if not args.llm_under_test:
raise ValueError("No LLMs were specified.")
materialized_llms_under_test = llms_under_test or [
default_llm_creator(specification) for specification in args.llm_under_test
]

stat_response_path = Path(args.stat_path) if args.stat_path else None
judge_response_path = (
Expand Down

0 comments on commit 4fc17ce

Please sign in to comment.