You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by "thecaptain789 (via GitHub)" <gi...@apache.org> on 2026/02/09 23:27:36 UTC

[PR] fix: correct additional typos identified in review [tvm]

thecaptain789 opened a new pull request, #18745:
URL: https://github.com/apache/tvm/pull/18745

   ## Summary
   
   This PR fixes additional typos identified by Gemini Code Assist during the review of PR #18739.
   
   ## Changes
   
   1. **python/tvm/ir/base.py** (line 191): `assert_strucural_equal` → `assert_structural_equal` (in docstring "See Also" section)
   
   2. **python/tvm/ir/base.py** (line 292): `structrual_equal` → `structural_equal` (in docstring "See Also" section)
   
   3. **include/tvm/node/structural_hash.h** (line 20): Fixed `\\file` comment path from `structural_equal.h` to `structural_hash.h` (matching actual filename)
   
   4. **tests/python/tir-base/test_tir_structural_equal_hash.py**: Changed `sequal` to `struct_equal` in error messages and `get_sequal_mismatch` to `get_struct_equal_mismatch` for 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*


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] fix: correct additional typos identified in review [tvm]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on code in PR #18745:
URL: https://github.com/apache/tvm/pull/18745#discussion_r2785035861


##########
tests/python/tir-base/test_tir_structural_equal_hash.py:
##########
@@ -40,14 +40,14 @@ def consistent_equal(x, y, map_free_vars=False):
     # we can confirm that hash colison doesn't happen for our testcases
     if struct_equal0 != (xhash == yhash):
         raise ValueError(
-            "Inconsistent {} vs {}, sequal={}, xhash={}, yhash={}".format(
+            "Inconsistent {} vs {}, struct_equal={}, xhash={}, yhash={}".format(
                 x, y, struct_equal0, xhash, yhash
             )

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   Similar to the previous suggestion, using an f-string here would make the error message more readable and is consistent with modern Python style.
   
   ```python
               f"Inconsistent {x} vs {y}, struct_equal={struct_equal0}, xhash={xhash}, yhash={yhash}"
   ```



##########
tests/python/tir-base/test_tir_structural_equal_hash.py:
##########
@@ -31,7 +31,7 @@ def consistent_equal(x, y, map_free_vars=False):
 
     if struct_equal0 != struct_equal1:
         raise ValueError(
-            "Non-commutative {} vs {}, sequal0={}, sequal1={}".format(
+            "Non-commutative {} vs {}, struct_equal0={}, struct_equal1={}".format(
                 x, y, struct_equal0, struct_equal1
             )

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   For improved readability and conciseness, consider using an f-string for this error message. F-strings are generally preferred over `.format()` in modern Python.
   
   ```python
               f"Non-commutative {x} vs {y}, struct_equal0={struct_equal0}, struct_equal1={struct_equal1}"
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] fix: correct additional typos identified in review [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen closed pull request #18745: fix: correct additional typos identified in review
URL: https://github.com/apache/tvm/pull/18745


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] fix: correct additional typos identified in review [tvm]

Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #18745:
URL: https://github.com/apache/tvm/pull/18745#issuecomment-3874415383

   ## Summary of Changes
   
   Hello @thecaptain789, I'm Gemini Code Assist[^1]! 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
   
   * **Docstring Typo Correction**: Corrected "assert_strucural_equal" to "assert_structural_equal" and "structrual_equal" to "structural_equal" in `python/tvm/ir/base.py` docstrings.
   * **Header File Path Fix**: Updated the `\file` comment path from `structural_equal.h` to `structural_hash.h` in `include/tvm/node/structural_hash.h` to match the actual filename.
   * **Test File Consistency**: Renamed instances of "sequal" to "struct_equal" in error messages and "get_sequal_mismatch" to "get_struct_equal_mismatch" within `tests/python/tir-base/test_tir_structural_equal_hash.py` for improved consistency.
   
   🧠 **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](https://codeassist.google/code-review/login) to enable Memory in your admin console.**
   
   <details>
   <summary><b>Changelog</b></summary>
   
   * **include/tvm/node/structural_hash.h**
       * Corrected the `\file` comment path to match the actual filename `structural_hash.h`.
   * **python/tvm/ir/base.py**
       * Fixed a typo from `assert_strucural_equal` to `assert_structural_equal` in a docstring.
       * Corrected a typo from `structrual_equal` to `structural_equal` in a docstring.
   * **tests/python/tir-base/test_tir_structural_equal_hash.py**
       * Updated `sequal` to `struct_equal` in error messages for consistency.
       * Renamed `get_sequal_mismatch` to `get_struct_equal_mismatch` to align with variable names.
   </details>
   
   <details>
   <summary><b>Using Gemini Code Assist</b></summary>
   <br>
   
   The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.
   
   <b>Invoking Gemini</b>
   
   You can request assistance from Gemini at any point by creating a comment using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands on the current page.
   
   Feature | Command | Description
   --- | --- | ---
   Code Review | `/gemini review` | Performs a code review for the current pull request in its current state.
   Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state.
   Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments.
   Help | `/gemini help` | Displays a list of available commands.
   
   <b>Customization</b>
   
   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 `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).
   
   <b>Limitations & Feedback</b>
   
   Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: 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](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG).
   
   <b>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](https://cloud.google.com/products/gemini/code-assist).</b>
   </details>
   
   
   [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org


Re: [PR] fix: correct additional typos identified in review [tvm]

Posted by "tqchen (via GitHub)" <gi...@apache.org>.
tqchen commented on PR #18745:
URL: https://github.com/apache/tvm/pull/18745#issuecomment-3874663880

   please make the change in the original pr


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: discuss-archive-unsubscribe@tvm.apache.org
For additional commands, e-mail: discuss-archive-help@tvm.apache.org