refactor: Remove unused variables and arguments in model generation scripts - #8720
Merged
yinggeh merged 1 commit intoApr 1, 2026
Conversation
Contributor
There was a problem hiding this comment.
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_utilvalidation 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 OSErrorblocks 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.
pskiran1
approved these changes
Apr 1, 2026
whoisj
approved these changes
Apr 1, 2026
whoisj
left a comment
Contributor
There was a problem hiding this comment.
LGTM, but I do have a question with regards to no longer passing input_shape around.
Was this argument just ignored everywhere?
yinggeh
deleted the
yinggeh/tri-895-remove-unused-variables-and-arguments-in-serverqacommon
branch
April 1, 2026 20:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does the PR do?
Remove unused variables and arguments in model generation scripts
Checklist
<commit_type>: <Title>Commit Type:
Check the conventional commit type
box here and add the label to the github PR.
Related PRs:
Where should the reviewer start?
Test plan:
47441300
Caveats:
Background
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)