Skip to content

Add submission checker compatibility mode#79

Draft
anandhu-eng wants to merge 8 commits intomainfrom
feature/submission_checker_compatibility
Draft

Add submission checker compatibility mode#79
anandhu-eng wants to merge 8 commits intomainfrom
feature/submission_checker_compatibility

Conversation

@anandhu-eng
Copy link
Copy Markdown
Contributor

@anandhu-eng anandhu-eng commented Dec 25, 2025

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor/cleanup

Related issues

Testing

  • Tests added/updated
  • All tests pass locally
  • Manual testing completed

Checklist

  • Code follows project style
  • Pre-commit hooks pass
  • Documentation updated (if needed)

Copilot AI review requested due to automatic review settings December 25, 2025 12:49
@anandhu-eng anandhu-eng requested a review from a team as a code owner December 25, 2025 12:49
@github-actions
Copy link
Copy Markdown

github-actions bot commented Dec 25, 2025

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello @anandhu-eng, 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 introduces a new feature that enhances compatibility with external submission checkers, particularly for MLPerf benchmarks. It allows the system to automatically generate a user.conf file from the benchmark's runtime settings, translating internal configuration parameters into a standardized format required by submission tools. This streamlines the process of submitting benchmark results by ensuring that necessary configuration details are correctly formatted and available.

Highlights

  • New CLI Argument: A new command-line argument, --ensure-submission-checker-compatibility, has been added to enable a compatibility mode for the submission checker. This argument is a boolean flag.
  • Submission Checker Utility: A new utility function, generate_user_conf_submission_checker, was introduced. This function converts the internal runtime_settings.json into a user.conf file, mapping specific keys to MLPerf LoadGen compatible names.
  • Key Mapping Constants: A new file src/inference_endpoint/config/constants.py was created to define ENDPOINTS_TO_LOADGEN_KEY_MAPPING. This dictionary facilitates the conversion of internal configuration keys to their corresponding MLPerf LoadGen keys for submission checker compatibility.
  • Benchmark Configuration Update: The BenchmarkConfig schema now includes a new field ensure_submission_checker_compatibility, which defaults to True, controlling whether the user.conf file is generated.
  • Comprehensive Unit Tests: Extensive unit tests have been added for the generate_user_conf_submission_checker function, covering successful generation, handling missing or empty settings, and ensuring correct key mapping and overwriting behavior.

🧠 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.

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
Copy Markdown

@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 PR introduces a compatibility mode for a submission checker, which generates a user.conf file from the benchmark's runtime settings. The changes include a new CLI flag, a configuration option, a utility function for the conversion, and comprehensive tests. My review highlights a bug where the new CLI flag is not correctly used, an issue with overly broad exception handling that could hide errors, and a suggestion to reconsider the default setting for the new compatibility mode to ensure a better user experience. The feature is otherwise well-implemented with good test coverage.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds submission checker compatibility mode to enable MLPerf loadgen compatibility by generating a user.conf file from runtime settings. The feature is enabled by default and converts endpoints-specific configuration keys to MLPerf loadgen format.

  • Introduces key mapping from endpoints runtime settings to MLPerf loadgen keys via a new constants module
  • Adds configuration flag ensure_submission_checker_compatibility (default: True) to control the feature
  • Implements user.conf generation that transforms runtime_settings.json into MLPerf-compatible format

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/inference_endpoint/config/constants.py New file defining mapping between endpoints keys and MLPerf loadgen keys
src/inference_endpoint/config/schema.py Adds ensure_submission_checker_compatibility boolean field (default: True) to BenchmarkConfig
src/inference_endpoint/cli.py Adds CLI argument --ensure-submission-checker-compatibility flag
src/inference_endpoint/commands/utils.py Implements generate_user_conf_submission_checker() function to create user.conf from runtime_settings.json
src/inference_endpoint/commands/benchmark.py Integrates user.conf generation after benchmark execution when compatibility mode is enabled
tests/unit/commands/test_utils.py Adds comprehensive test suite covering success, error, and edge cases for user.conf generation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tanvi-mlcommons tanvi-mlcommons marked this pull request as ready for review January 8, 2026 02:29
@arekay-nv
Copy link
Copy Markdown
Collaborator

@tanvi-mlcommons @anandhu-eng is this ready to review - there are some changes requested.

@anandhu-eng
Copy link
Copy Markdown
Contributor Author

Hi @arekay-nv , the comments is addressed in latest PR. I think its good to go for a review. I will retest the outputs with latest changes this week.

Copy link
Copy Markdown
Collaborator

@nv-alicheng nv-alicheng left a comment

Choose a reason for hiding this comment

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

Approving - Looks fine, if it is functional it should be good to merge. We will revisit in either next phase or when we get around to fleshing out the CLI with Typer

@anandhu-eng anandhu-eng marked this pull request as draft March 16, 2026 02:32
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.

6 participants