[Fix][NSA] Fixed a bug in pytest parameter passing in test_deepseek_nsa_cmp_fwd.#171
[Fix][NSA] Fixed a bug in pytest parameter passing in test_deepseek_nsa_cmp_fwd.#171michaelwithu merged 20 commits intotile-ai:mainfrom
test_deepseek_nsa_cmp_fwd.#171Conversation
Summary of ChangesHello @michaelwithu, 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 resolves a Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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.
Code Review
This pull request fixes a bug where pytest internal variables were passed to a class constructor, causing a TypeError. The fix correctly uses inspect.signature to gather only the explicit function arguments. I've suggested a small simplification to make the code cleaner and the comments more accurate, as the current implementation has a redundant check.
1. Refactor the current testing framework using the pytest framework; 2. Remove profile testing in ci.yml, retaining only unit tests; 3. Fix the precision thresholds for some test cases; 4. Other minor bug fixes. 5. '@py_assert1' in `test_deepseek_nsa_cmp_fwd.py` will be fixed in #171
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request addresses a bug where pytest-injected variables were causing a TypeError during benchmark initialization. The fix correctly uses inspect.signature to filter arguments, which is a robust solution. The change is well-implemented and resolves the issue described. I have one minor suggestion to improve maintainability by dynamically referencing the test function, avoiding a hardcoded name.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request fixes a bug where pytest-injected variables were being passed to a class constructor, causing a TypeError. The fix correctly filters for only the intended function parameters. While the fix is correct, I've suggested an alternative implementation that is more explicit and readable by avoiding the use of inspect.stack(), which can be fragile and have performance implications. This change also makes the new inspect import unnecessary.
Description
The error TypeError: NSACmpFwdVarlenBenchmark.init() got an unexpected keyword argument '@py_assert1' occurs because:
Type of Change
Checklist
pre-commit run --all-filesand fixed all linting issues.