Skip to content

Conversation

@JyotinderSingh
Copy link
Collaborator

@JyotinderSingh JyotinderSingh commented Sep 23, 2025

Description of the change

The order of the decorators matters in how internal tooling identifies tests

Checklist

  • I have added all the necessary unit tests for my change.
  • I have verified that my change does not break existing code and works with all backends (TensorFlow, JAX, and PyTorch).
  • My PR is based on the latest changes of the main branch (if unsure, rebase the code).
  • I have followed the Keras Hub Model contribution guidelines in making these changes.
  • I have followed the Keras Hub API design guidelines in making these changes.
  • I have signed the Contributor License Agreement.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @JyotinderSingh, 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 refines the test suite by adjusting the placement of the @pytest.mark.large decorator for a specific test function. This change ensures that the test_quantized_preset_loading_and_saving test is correctly categorized and executed as a 'large' test, which can impact test discovery and execution workflows. The modification is a minor but important adjustment for test suite organization and reliability.

Highlights

  • Decorator Reordering: The @pytest.mark.large decorator has been reordered for the test_quantized_preset_loading_and_saving function within keras_hub/src/models/task_test.py.
  • Correct Decorator Placement: The decorator was moved from above the @parameterized.named_parameters decorator to directly above the test function definition, ensuring proper application of the 'large' mark.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@JyotinderSingh JyotinderSingh changed the title Reorder @pytest.mark.large decorator for [internal] Reorder @pytest.mark.large decorator to fix CI Sep 23, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 correctly reorders the @pytest.mark.large decorator in keras_hub/src/models/task_test.py. By placing @pytest.mark.large after @parameterized.named_parameters, it ensures that the large mark is applied to each test case generated by parameterized, rather than just the test generator function. This change aligns with the best practices for using pytest with the parameterized library and ensures the test is configured correctly. The change is approved.

@JyotinderSingh
Copy link
Collaborator Author

The moonshine failure is unrelated to this change, and can be ignored in this case.

@JyotinderSingh JyotinderSingh merged commit b51b273 into keras-team:master Sep 23, 2025
10 of 11 checks passed
@JyotinderSingh JyotinderSingh deleted the internal-ci-fix branch September 23, 2025 05:55
amitsrivastava78 pushed a commit to amitsrivastava78/keras-hub that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants