Skip to content

Conversation

@HDCharles
Copy link
Collaborator

SUMMARY:
adding e2e tests

TEST PLAN:

@HDCharles HDCharles marked this pull request as draft October 22, 2025 14:58
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @HDCharles, 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 primarily focuses on expanding the test coverage for advanced model architectures by introducing new end-to-end tests for Mixture-of-Experts (MoE) models within the vLLM framework. These tests cover various quantization configurations, ensuring broader validation of model performance and stability. Additionally, a minor but important change was made to improve the robustness of a core utility function, allowing it to handle a wider range of model implementations without error.

Highlights

  • New MoE E2E Tests: Added three new end-to-end test configurations for Mixture-of-Experts (MoE) models, specifically targeting the Qwen3-Omni-30B-A3B-Instruct model with NVFP4, FP8_DYNAMIC, and W4A16 quantization schemes.
  • Robustness Improvement: Enhanced the untie_word_embeddings utility function to gracefully handle models that do not implement get_input_embeddings or get_output_embeddings, preventing potential crashes and logging a warning instead.
  • Test Cadence Logic Adjustment: Temporarily commented out the pytest.skip logic in test_vllm.py that previously skipped tests based on a mismatch with the CADENCE environment variable.
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
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.

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.

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 introduces new end-to-end (e2e) tests for MoE (Mixture of Experts) models and includes a modification to the untie_word_embeddings function to handle cases where get_input_embeddings and get_output_embeddings are not implemented. The new tests are defined in YAML configuration files, and the test_vllm.py file is updated to accommodate these new configurations. The untie_word_embeddings function is updated to handle NotImplementedError exceptions.

Comment on lines +62 to +63
# if os.environ.get("CADENCE", "commit") != eval_config.get("cadence"):
# pytest.skip("Skipping test; cadence mismatch")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The code that skips tests based on cadence is commented out. This means that all tests will run regardless of the CADENCE environment variable. If the intention is to temporarily disable this check, consider adding a comment explaining why it's disabled and when it should be re-enabled. If the intention is to remove the check entirely, remove the commented code.

Suggested change
# if os.environ.get("CADENCE", "commit") != eval_config.get("cadence"):
# pytest.skip("Skipping test; cadence mismatch")
# pytest.skip("Skipping test; cadence mismatch")

input_embed = model.get_input_embeddings()
output_embed = model.get_output_embeddings()
except NotImplementedError as e:
logger.warning(f"cannot untie model of type {model.__class__} which doesn't have get_input_embeddings and get_output_embeddings implmented\n{e}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The logging message includes the exception e but it's not very readable. Consider including the model's class name and a simplified error message for better clarity. Also, the word "implmented" is misspelled, it should be "implemented".

Suggested change
logger.warning(f"cannot untie model of type {model.__class__} which doesn't have get_input_embeddings and get_output_embeddings implmented\n{e}")
logger.warning(f"cannot untie model of type {model.__class__.__name__} which doesn't have get_input_embeddings and get_output_embeddings implemented: {type(e).__name__}")

@github-actions
Copy link

👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review.

Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed.

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.

1 participant