Skip to content

fix: replace bare NotImplementedError with CLIError for unimplemented test types#230

Merged
viraatc merged 2 commits intomainfrom
feat/viraatc-fix-218
Mar 31, 2026
Merged

fix: replace bare NotImplementedError with CLIError for unimplemented test types#230
viraatc merged 2 commits intomainfrom
feat/viraatc-fix-218

Conversation

@viraatc
Copy link
Copy Markdown
Collaborator

@viraatc viraatc commented Mar 31, 2026

EVAL and SUBMISSION test types raised NotImplementedError with no user-friendly guidance. Now raises CLIError with tracking issue links.

Closes #218

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)

… test types

EVAL and SUBMISSION test types raised NotImplementedError with no
user-friendly guidance. Now raises CLIError with tracking issue links.

Closes #218
@viraatc viraatc requested a review from a team as a code owner March 31, 2026 05:13
Copilot AI review requested due to automatic review settings March 31, 2026 05:13
@github-actions github-actions bot requested review from arekay-nv and nvzhihanj March 31, 2026 05:13
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

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

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 pull request replaces NotImplementedError with a custom CLIError across the codebase, specifically within the create_default_config and eval functions, and includes GitHub issue links in the error messages for tracking. Corresponding unit tests have been updated to reflect these changes. Feedback was provided to update the docstring of create_default_config to ensure it accurately describes the new exception type being raised.

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 improves CLI/user experience for unimplemented benchmark modes by replacing bare NotImplementedError exceptions with CLIError messages that include guidance and tracking issue links.

Changes:

  • Replace NotImplementedError with CLIError for EVAL/SUBMISSION default config generation.
  • Replace NotImplementedError with CLIError for the eval CLI command.
  • Update unit tests to assert CLIError for unimplemented config templates.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
tests/unit/config/test_yaml_loader.py Updates expectations to CLIError when default configs for EVAL/SUBMISSION are requested.
tests/unit/config/test_schema.py Updates schema tests to expect CLIError and to match the updated messages.
src/inference_endpoint/main.py Makes eval command raise CLIError with a tracking issue URL.
src/inference_endpoint/config/schema.py Makes BenchmarkConfig.create_default_config() raise CLIError (with tracking URLs) for EVAL/SUBMISSION.

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

Address review comments: update create_default_config docstring from
NotImplementedError to CLIError, and fix test_eval.py to expect CLIError.
@viraatc viraatc changed the title fix: replace bare NotImplementedError with CLIError for unimplemented… fix: replace bare NotImplementedError with CLIError for unimplemented test types Mar 31, 2026
@viraatc viraatc merged commit ba31d34 into main Mar 31, 2026
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 31, 2026
@viraatc viraatc deleted the feat/viraatc-fix-218 branch April 1, 2026 22:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: EVAL and SUBMISSION test types raise bare NotImplementedError with no user-friendly message

3 participants