Skip to content

Commit

Permalink
[Minor] Add judge args option (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
niboshi authored Jan 23, 2025
1 parent 982c34b commit a897a2c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import json

import torch
import torch.distributed as dist

Expand Down Expand Up @@ -133,6 +135,7 @@ def parse_args():
# API Kwargs, Apply to API VLMs and Judge API LLMs
parser.add_argument('--api_nproc', type=int, default=4, help='Parallel API calling')
parser.add_argument('--retry', type=int, default=None, help='retry numbers for API VLMs')
parser.add_argument('--judge-args', type=str, default=None, help='Judge arguments in JSON format')
# Explicitly Set the Judge Model
parser.add_argument('--judge', type=str, default=None)
# Logging Utils
Expand Down Expand Up @@ -310,7 +313,8 @@ def main():
judge_kwargs = {
'nproc': args.api_nproc,
'verbose': args.verbose,
'retry': args.retry if args.retry is not None else 3
'retry': args.retry if args.retry is not None else 3,
**(json.loads(args.judge_args) if args.judge_args else {}),
}

if args.retry is not None:
Expand Down

0 comments on commit a897a2c

Please sign in to comment.