[GenEval] feat: add multi-gpu in evaluations & tqdm display the progress#22
Open
lxazjk wants to merge 2 commits into
Open
[GenEval] feat: add multi-gpu in evaluations & tqdm display the progress#22lxazjk wants to merge 2 commits into
lxazjk wants to merge 2 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
geneval/evaluation/evaluate_images.py previously evaluated images sequentially on a single GPU, which is slow for large-scale runs and provides limited visibility into progress.
This PR adds a simple, low-intrusion multi-GPU sharding mode to improve throughput and adds progress bars for better UX.
What’s changed
Multi-GPU evaluation via multiprocessing sharding
Collects all (image_path, metadata) tasks first, then splits them across GPUs and runs one process per GPU.
Each worker sets its CUDA device, loads models locally, evaluates its shard, and returns results to the main process for aggregation.
Progress reporting with tqdm Single-GPU mode shows a single overall progress bar.
Multi-GPU mode shows per-GPU worker progress bars.
Stability improvements for spawn + CLIP color classification
Refactors the crop dataset used by CLIP color classification to avoid relying on global variables in DataLoader worker processes.
Adds clip_num_workers option and defaults to 0 when num_gpus > 1 to avoid nested multiprocessing issues.
How to run
Single GPU
Multi GPU