Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors test files to use a centralized evaluate_accuracy helper function, replacing multiple instances of simple_evaluate_user_model and simple_evaluate calls. The changes improve code maintainability by consolidating evaluation logic and removing redundant helper functions.
Changes:
- Replaced direct evaluation calls with the
evaluate_accuracyhelper function across test files - Removed duplicate helper functions (
get_accuracy) from multiple test files - Updated import statements to include
evaluate_accuracyfrom the helpers module - Cleaned up unused imports including
re,simple_evaluate, andsimple_evaluate_user_model
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/helpers.py | Added centralized evaluate_accuracy and generate_prompt helper functions |
| test/test_cuda/utils/test_alg_ext.py | Replaced evaluation call with evaluate_accuracy helper |
| test/test_cuda/schemes/test_auto_scheme.py | Updated to use evaluate_accuracy helper |
| test/test_cuda/quantization/test_mxfp_nvfp.py | Replaced evaluation with evaluate_accuracy helper |
| test/test_cuda/quantization/test_mix_bits.py | Updated to use evaluate_accuracy helper |
| test/test_cuda/quantization/test_asym.py | Removed unused imports |
| test/test_cuda/quantization/test_2_3bits.py | Replaced evaluation calls and removed duplicate get_accuracy function |
| test/test_cuda/export/test_gguf.py | Updated to use evaluate_accuracy helper |
| test/test_cuda/export/test_auto_round_format.py | Replaced evaluation calls with evaluate_accuracy helper |
| test/test_cuda/core/test_main_func.py | Updated evaluation calls and removed duplicate get_accuracy function |
| test/test_cuda/backends/test_triton_backend.py | Replaced evaluation calls with evaluate_accuracy helper |
| test/test_cuda/backends/test_torch_backend.py | Updated to use evaluate_accuracy helper |
| test/test_cuda/backends/test_marlin_backend.py | Replaced evaluation calls with evaluate_accuracy helper |
| test/test_cuda/backends/test_exllamav2_backend.py | Updated to use evaluate_accuracy helper |
| test/test_cuda/advanced/test_multiple_card_calib.py | Removed duplicate get_accuracy function |
| test/test_cuda/advanced/test_multiple_card.py | Removed duplicate get_accuracy function and updated evaluation calls |
| test/test_cuda/advanced/test_fp8_input.py | Moved helper functions to centralized location |
| test/test_cpu/quantization/test_mix_bits.py | Updated to use evaluate_accuracy helper |
| test/test_cpu/quantization/test_asym.py | Removed unused imports |
| test/test_cpu/core/test_autoround.py | Replaced evaluation calls with evaluate_accuracy helper |
| test/test_cpu/backends/test_torch_backend.py | Updated to use evaluate_accuracy helper |
| test/test_ark/test_model.py | Replaced evaluation call with evaluate_accuracy helper |
Contributor
Author
|
Let‘s target it to 1.0.0 |
e82e580 to
cb401e5
Compare
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.
Description
Refactor evaluation in tests to use evaluate_accuracy function
Type of Change
Related Issues
Fixes or relates to #
Checklist Before Submitting