Skip to content

Add custom model path support for unit tests#1917

Merged
baijumeswani merged 3 commits into
microsoft:mainfrom
mpasumarthi-git:mpasumarthi/custom-model-path
Jan 22, 2026
Merged

Add custom model path support for unit tests#1917
baijumeswani merged 3 commits into
microsoft:mainfrom
mpasumarthi-git:mpasumarthi/custom-model-path

Conversation

@mpasumarthi-git
Copy link
Copy Markdown
Contributor

Add support for custom model paths in unit tests via command-line argument

  • Added --model_path argument to unit_tests.exe to specify custom model locations
  • Updated test/main.cpp to parse the custom model path argument
  • Updated test/model_tests.cpp, test/sampling_benchmark.cpp, and test/sampling_tests.cpp to use custom paths for NvTensorRT tests
  • Allows running tests with models in non-default locations

@mpasumarthi-git
Copy link
Copy Markdown
Contributor Author

@anujj Please help review

@mpasumarthi-git mpasumarthi-git force-pushed the mpasumarthi/custom-model-path branch from 6c366c7 to bce7d76 Compare January 6, 2026 09:47
@mpasumarthi-git mpasumarthi-git marked this pull request as ready for review January 7, 2026 06:25
kunal-vaishnavi
kunal-vaishnavi previously approved these changes Jan 8, 2026
Copy link
Copy Markdown
Collaborator

@baijumeswani baijumeswani left a comment

Choose a reason for hiding this comment

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

Is there an external script that is used to call the unit tests that passes in different models to the test? What is the use case of passing in a custom model?

Comment thread test/main.cpp Outdated
Comment thread test/sampling_tests.cpp Outdated
@mpasumarthi-git mpasumarthi-git force-pushed the mpasumarthi/custom-model-path branch from 334c1da to fc5f5ff Compare January 20, 2026 19:10
@mpasumarthi-git
Copy link
Copy Markdown
Contributor Author

Is there an external script that is used to call the unit tests that passes in different models to the test? What is the use case of passing in a custom model?

Our CI deploys models to custom paths, so we need to pass the location at runtime rather than hardcoding paths.

@baijumeswani baijumeswani enabled auto-merge (squash) January 20, 2026 19:17
@baijumeswani baijumeswani merged commit d7f0291 into microsoft:main Jan 22, 2026
15 of 17 checks passed
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.

3 participants