GameplayQA Script Arguments

May 22, 2026 ยท View on GitHub

All scripts are intended to run from the repository root as uv run <script>.py.

Output Convention

Default outputs use stable paths so later steps can locate the latest run automatically:

  • Raw benchmark results: results/raw/<split>/<model>.jsonl
  • Judged benchmark results: results/judged/<split>/<model>_judged.jsonl
  • Raw ablation results: results/ablation/<split>/<ablation>_<model>.jsonl
  • Evaluation reports: results/evaluation/<split>/evaluation_results.*
  • Plots: results/plots/<split>/

Use --timestamped on benchmark scripts only when you intentionally want an archival run file.

download_data.py

Downloads the GameplayQA dataset from Hugging Face.

ArgumentDefaultDescription
-d, --destinationdataLocal dataset folder.

process_data.py

Crops question videos and extracts reusable frame caches in one preprocessing step.

ArgumentDefaultDescription
--splitqaDataset split: qa or generalization.
--csvsplit CSVOverride the question CSV path.
--data-dirdataDownloaded dataset directory containing annotation/.
--video-dirdata/question_videos/<split>Output directory for cropped question clips.
--frames-dirdata/question_video_frames/<split>Output directory for extracted frame caches.
--max-frames32Maximum frames per cropped video.
--workers4Parallel workers for frame extraction.
--forceoffRebuild both cropped videos and frame caches.
--force-cropoffOverwrite existing cropped videos.
--force-framesoffRe-extract existing frame folders.
--skip-cropoffSkip the cropping phase.
--skip-framesoffSkip frame extraction.
--limitallProcess only the first N questions.

crop_question_video.py

Lower-level command for cropping only.

ArgumentDefaultDescription
--splitqaDataset split: qa or generalization.
--csvsplit CSVOverride question CSV path.
--data-dirdataDownloaded dataset directory.
--output-dirdata/question_videos/<split>Directory for cropped clips.
--forceoffOverwrite existing cropped clips.
--limitallProcess only the first N questions.

extract_video_frames.py

Lower-level command for frame cache extraction only.

ArgumentDefaultDescription
--splitqaDataset split: qa or generalization.
--csvsplit CSVOverride question CSV path.
--video-dirdata/question_videos/<split>Directory containing cropped videos.
--output-dirdata/question_video_frames/<split>Directory for frame caches.
--max-frames32Maximum frames per cropped video.
--workers4Parallel extraction workers.
--forceoffRe-extract existing frame folders.
--limitallProcess only the first N videos.

run_benchmark.py

Runs a multimodal model on the selected GameplayQA split.

ArgumentDefaultDescription
--listoffList available model keys.
--model, -mgemini-3-flashModel key from the registry.
--splitqaDataset split: qa or generalization.
--csv, -csplit CSVOverride question CSV path.
--video-dir, -vdata/question_videos/<split>Directory with cropped videos.
--frames-dir, -fdata/question_video_frames/<split>Directory with extracted frames for frame-based models. Ignored by video-native models.
--output, -oresults/raw/<split>/<model>.jsonlOutput JSONL path.
--timestampedoffAppend YYYYMMDD_HHMMSS to the default output filename.
--workers, -w5Parallel API workers.
--limit, -nallBenchmark only the first N questions.
--resume, -roffResume an output JSONL. Use --resume alone for the default stable output, or pass a path.
--seed13Deterministic answer-option shuffle seed.
--judgeoffRun judging automatically after the benchmark finishes.
--judge-model, -jgpt-5-miniOpenAI model used for automatic judging.
--judge-workers5Parallel workers for automatic judging.
--judge-outputautomaticJudged JSONL output path for --judge.

llm_as_a_judge.py

Extracts the selected option from raw model responses and marks correctness.

ArgumentDefaultDescription
inputautomaticRaw benchmark JSONL. If omitted, resolved from --split, --model, and optional --ablation.
--model, -mgemini-3-flashModel key used for automatic input/output paths.
--splitqaDataset split used for automatic paths.
--ablationnoneJudge an ablation result: no_video, random_single_frame, or shuffled_frames.
--output, -oautomaticJudged JSONL path.
--judge-model, -jgpt-5-miniOpenAI model used as the judge.
--workers, -w5Parallel judge workers.
--limit, -nallJudge only the first N raw results.

evaluate_results.py

Aggregates judged result files into JSON, CSV, and Markdown reports.

ArgumentDefaultDescription
resultsautomaticJudged JSONL file(s). If omitted, discovers all results/judged/<split>/*.jsonl.
--model, -mall discoveredEvaluate one model's default judged result.
--splitqaDataset split metadata and discovery folder.
--csvsplit CSVQuestion CSV metadata path. May be repeated.
--output-jsonresults/evaluation/<split>/evaluation_results.jsonEvaluation JSON output.
--output-csvresults/evaluation/<split>/evaluation_results.csvEvaluation CSV output.
--output-mdresults/evaluation/<split>/evaluation_results.mdMarkdown report output.

plot_results.py

Generates PNG plots from an evaluation JSON file.

ArgumentDefaultDescription
--splitqaDataset split for default input/output paths.
--input, -iresults/evaluation/<split>/evaluation_results.jsonEvaluation JSON path.
--output-dir, -oresults/plots/<split>Plot output directory.

ablation_benchmark.py

Runs an ablation benchmark.

ArgumentDefaultDescription
--listoffList available ablation types.
--list-modelsoffList available model keys.
--ablation, -ano_videoOne of no_video, random_single_frame, shuffled_frames.
--model, -mgpt-5-miniModel key from the registry.
--splitqaDataset split: qa or generalization.
--csv, -csplit CSVOverride question CSV path.
--video-dir, -vdata/question_videos/<split>Directory with cropped videos.
--frames-dir, -fdata/question_video_frames/<split>Directory with extracted frames.
--output, -oresults/ablation/<split>/<ablation>_<model>.jsonlOutput JSONL path.
--timestampedoffAppend YYYYMMDD_HHMMSS to the default output filename.
--workers, -w5Parallel API workers.
--limit, -nallBenchmark only the first N questions.
--resume, -roffResume an output JSONL. Use --resume alone for the default stable output, or pass a path.
--seed13Random seed for deterministic option shuffle and frame ablations.

evaluate_ablation.py

Alias for evaluate_results.py. Pass judged ablation files explicitly, or let it discover judged JSONL files under results/judged/<split>/.