fix: correct additional typos identified in review#18745
Conversation
Fix typos in docstrings and comments identified by Gemini Code Assist during PR apache#18739 review: - python/tvm/ir/base.py: 'assert_strucural_equal' → 'assert_structural_equal' - python/tvm/ir/base.py: 'structrual_equal' → 'structural_equal' - include/tvm/node/structural_hash.h: fix file path in comment - tests/python/tir-base/test_tir_structural_equal_hash.py: 'sequal' → 'struct_equal' for consistency with variable names
Summary of ChangesHello @thecaptain789, 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 addresses several minor textual inconsistencies and typos across the codebase, primarily within docstrings and test files. These changes, identified by an AI code reviewer, aim to improve code clarity and maintain naming conventions, ensuring a more consistent and readable codebase. 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
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 addresses several typos found in comments, docstrings, and test code, which improves the overall quality and consistency of the codebase. The fixes are correct and well-contained. I've added a couple of minor suggestions in the test file to use f-strings for formatting error messages, which would improve readability and align with modern Python practices. Otherwise, the changes look good.
| "Non-commutative {} vs {}, struct_equal0={}, struct_equal1={}".format( | ||
| x, y, struct_equal0, struct_equal1 | ||
| ) |
| "Inconsistent {} vs {}, struct_equal={}, xhash={}, yhash={}".format( | ||
| x, y, struct_equal0, xhash, yhash | ||
| ) |
|
please make the change in the original pr |
Summary
This PR fixes additional typos identified by Gemini Code Assist during the review of PR #18739.
Changes
python/tvm/ir/base.py (line 191):
assert_strucural_equal→assert_structural_equal(in docstring "See Also" section)python/tvm/ir/base.py (line 292):
structrual_equal→structural_equal(in docstring "See Also" section)include/tvm/node/structural_hash.h (line 20): Fixed
\\filecomment path fromstructural_equal.htostructural_hash.h(matching actual filename)tests/python/tir-base/test_tir_structural_equal_hash.py: Changed
sequaltostruct_equalin error messages andget_sequal_mismatchtoget_struct_equal_mismatchfor consistency with the variable names used in the code (struct_equal0,struct_equal1)Context
These typos were identified by the AI code reviewer on our existing PR and are follow-up fixes to keep the codebase consistent.
Typo fix PR - automated detection via AI code review