Skip to content

refactor: Remove unused variables and arguments in model generation scripts - #8720

Merged
yinggeh merged 1 commit into
mainfrom
yinggeh/tri-895-remove-unused-variables-and-arguments-in-serverqacommon
Apr 1, 2026
Merged

refactor: Remove unused variables and arguments in model generation scripts#8720
yinggeh merged 1 commit into
mainfrom
yinggeh/tri-895-remove-unused-variables-and-arguments-in-serverqacommon

Conversation

@yinggeh

@yinggeh yinggeh commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

What does the PR do?

Remove unused variables and arguments in model generation scripts

Checklist

  • PR title reflects the change and is of format <commit_type>: <Title>
  • Changes are described in the pull request.
  • Related issues are referenced.
  • Populated github labels field
  • Added test plan and verified test passes.
  • Verified that the PR passes existing CI.
  • Verified copyright is correct on all changed files.
  • Added succinct git squash message before merging ref.
  • All template sections are filled out.
  • Optional: Additional screenshots for behavior/output changes with before/after.

Commit Type:

Check the conventional commit type
box here and add the label to the github PR.

  • refactor

Related PRs:

Where should the reviewer start?

Test plan:

  • CI Pipeline ID:
    47441300

Caveats:

Background

Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)

  • closes GitHub issue: #xxx

@yinggeh yinggeh self-assigned this Apr 1, 2026
@yinggeh
yinggeh requested a review from Copilot April 1, 2026 09:34
@yinggeh yinggeh added the PR: refactor A code change that neither fixes a bug nor adds a feature label Apr 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the QA inference tests and model-generation scripts by removing unused parameters/variables and aligning validation helper signatures, reducing noise and potential lint issues across the QA tooling.

Changes:

  • Simplifies test_util validation helpers by removing unused shape parameters for ensemble validation and making TRT/ONNX shape parameters optional (unused).
  • Updates multiple QA tests and model-generation scripts to stop passing unused shape/model_version/create_savedmodel parameters.
  • Removes unused exception bindings in except OSError blocks and updates copyright headers to 2026.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated no comments.

Show a summary per file
File Description
qa/L0_storage_swiftstack/infer_test.py Stops passing unused shape args to validation helpers; updates copyright year.
qa/L0_infer/infer_test.py Stops passing unused shape args to validation helpers; updates copyright year.
qa/L0_infer_zero/infer_zero_test.py Updates ensemble validation call to new signature; updates copyright year.
qa/L0_infer_variable/infer_variable_test.py Stops passing unused shape args to validation helpers; updates copyright year.
qa/L0_infer_reshape/infer_reshape_test.py Stops passing unused shape args to validation helpers; updates copyright year.
qa/common/test_util.py Refactors validation helper signatures (drop ensemble shapes; optional unused TRT/ONNX shapes; simplify OpenVINO).
qa/common/infer_test.py Stops passing unused shape args to validation helpers; updates copyright year.
qa/common/gen_qa_trt_plugin_models.py Removes unused args (shapes to validation, unused exception var, unused model_version param in config helper).
qa/common/gen_qa_trt_format_models.py Removes unused exception var and avoids passing unused shape args to validation.
qa/common/gen_qa_trt_data_dependent_shape.py Removes unused exception var; updates copyright year.
qa/common/gen_qa_torchtrt_models.py Removes unused exception var; updates copyright year.
qa/common/gen_qa_sequence_models.py Removes unused shape args to validation and drops unused model_version from config helpers.
qa/common/gen_qa_reshape_models.py Removes unused args (validation shapes, model_version in config helpers) and unused exception var.
qa/common/gen_qa_ragged_models.py Drops unused model_version from config helpers and removes unused exception var.
qa/common/gen_qa_ort_scalar_models.py Removes unused exception var; updates copyright year.
qa/common/gen_qa_models.py Stops passing unused shape args to validation; removes unused exception var; drops unused model_version from some config helper call sites.
qa/common/gen_qa_implicit_models.py Removes unused args (validation shapes, model_version in config helpers) and unused exception var.
qa/common/gen_qa_identity_models.py Removes deprecated/unused create_savedmodel plumbing and unused args in validation/config helpers.
qa/common/gen_qa_dyna_sequence_models.py Removes unused args (validation shapes, model_version in config helpers) and unused exception var.
qa/common/gen_qa_dyna_sequence_implicit_models.py Removes unused args (validation shapes, model_version in config helpers) and unused exception var.
qa/common/gen_qa_custom_ops_models.py Drops unused model_version in config helpers and removes unused exception var.
qa/common/gen_ensemble_model_utils.py Removes unused exception var in directory creation helpers; updates copyright year.

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

@whoisj whoisj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, but I do have a question with regards to no longer passing input_shape around.

Was this argument just ignored everywhere?

Comment thread qa/L0_infer_reshape/infer_reshape_test.py
@yinggeh
yinggeh merged commit e0f0ae8 into main Apr 1, 2026
7 checks passed
@yinggeh
yinggeh deleted the yinggeh/tri-895-remove-unused-variables-and-arguments-in-serverqacommon branch April 1, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: refactor A code change that neither fixes a bug nor adds a feature

Development

Successfully merging this pull request may close these issues.

4 participants