-
Notifications
You must be signed in to change notification settings - Fork 3
Add eval mode support for OpenCompass workflows #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add eval mode support for OpenCompass workflows #975
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary of ChangesHello @dittops, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the OpenCompass workflow by integrating explicit evaluation modes, specifically for generation and perplexity runs. It modifies the core evaluation request and dataset schemas to incorporate these modes and updates the job script generation logic to reflect the chosen mode. This change provides greater control and clarity over evaluation processes, allowing for tailored execution and output management based on whether a generation or perplexity evaluation is being performed. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for distinct evaluation modes, specifically 'generation' (gen) and 'perplexity' (ppl), into the OpenCompass evaluation workflows. The changes are well-implemented through schema updates in evals/schema.py and corresponding logic adjustments in the OpencompassTransformer. The transformer now correctly propagates the evaluation mode to generate mode-specific output paths, command-line flags, and model configurations. My review includes one high-severity suggestion to refine the logic for determining the evaluation mode to ensure consistency when handling backward compatibility with legacy parameters, preventing potential inconsistencies in the evaluation setup.
| eval_mode = dataset.eval_mode or request.eval_mode | ||
| ppl_enabled = eval_mode == EvalMode.PPL or bool( | ||
| request.eval_model_info.extra_args.get("ppl", False) | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current logic for determining if a PPL evaluation is requested can lead to inconsistencies. ppl_enabled can be true due to extra_args, but mode_flag and output_dir will not reflect this as they only depend on eval_mode. This can result in a PPL configuration being generated for a non-PPL run command, and results being saved in a misleadingly named directory.
To ensure consistency, the eval_mode should be the single source of truth. It should be determined first, taking into account backward compatibility with extra_args, and then all other variables (ppl_enabled, mode_flag, output_dir) should be derived from it.
| eval_mode = dataset.eval_mode or request.eval_mode | |
| ppl_enabled = eval_mode == EvalMode.PPL or bool( | |
| request.eval_model_info.extra_args.get("ppl", False) | |
| ) | |
| eval_mode = dataset.eval_mode or request.eval_mode | |
| if dataset.eval_mode is None and request.eval_model_info.extra_args.get("ppl"): | |
| eval_mode = EvalMode.PPL | |
| ppl_enabled = eval_mode == EvalMode.PPL |
Summary
Testing
Codex Task