Skip to content

[fix] Pre-parse data + decouple args#31

Merged
arekay-nv merged 9 commits into
mainfrom
arekay/cleanup_args_handling
Nov 24, 2025
Merged

[fix] Pre-parse data + decouple args#31
arekay-nv merged 9 commits into
mainfrom
arekay/cleanup_args_handling

Conversation

@arekay-nv
Copy link
Copy Markdown
Collaborator

@arekay-nv arekay-nv commented Nov 19, 2025

Fixes the dataloader to pre-parse and decouples the args from benchmark execution.

  • The existing dataloader was parsing the data on-demand which can slow down the hot loop when sending requests. Instead, we want to pre-parse the data and have them sent quickly.
  • Decouples the command line arguments from the benchmark execution. This makes it easier to reproduce executions from a config file since the command line arguments populate a structure which can be directly serialized/deserialized to yaml.

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)

Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
@arekay-nv arekay-nv requested a review from a team as a code owner November 19, 2025 21:30
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Nov 19, 2025

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

@github-actions github-actions Bot requested a review from nvzhihanj November 19, 2025 21:30
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
@arekay-nv arekay-nv marked this pull request as draft November 20, 2025 22:43
@arekay-nv arekay-nv marked this pull request as ready for review November 20, 2025 22:43
@arekay-nv arekay-nv marked this pull request as draft November 21, 2025 15:10
@arekay-nv arekay-nv self-assigned this Nov 21, 2025
@arekay-nv arekay-nv marked this pull request as ready for review November 21, 2025 15:10
@arekay-nv arekay-nv requested a review from Copilot November 22, 2025 03:32
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 fixes the dataloader to pre-parse dataset samples and decouples command-line arguments from benchmark execution logic. The pre-parsing optimization moves data parsing out of the hot loop to improve request throughput, while the argument decoupling enables easier config serialization/deserialization for reproducible benchmark runs.

Key Changes:

  • Pre-parse all dataset samples during load instead of on-demand parsing
  • Store command-line arguments (report_dir, timeout, output, verbose) directly in BenchmarkConfig
  • Remove max_concurrency setting from client configuration across all templates and code

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/inference_endpoint/dataset_manager/dataloader.py Implements pre-parsing by iterating through data during load() and storing parsed results
src/inference_endpoint/commands/benchmark.py Refactors to use config fields instead of args namespace, removes args parameter from _run_benchmark
src/inference_endpoint/config/schema.py Adds output, report_dir, timeout, verbose fields to BenchmarkConfig; removes max_concurrency validation
src/inference_endpoint/load_generator/session.py Renames report_path parameter to report_dir for consistency
src/inference_endpoint/cli.py Renames --report-path CLI argument to --report-dir
tests/unit/commands/test_benchmark.py Removes max_concurrency assertions and adds new config fields to mock args
tests/unit/config/test_yaml_loader.py Skips concurrency validation tests pending refactor
tests/integration/*.py Updates parser functions to access dictionary keys instead of object attributes
tests/conftest.py Simplifies parser to return row directly instead of reconstructing dictionary
Config templates (*.yaml) Removes max_concurrency setting from all template files
Example configs (*.yaml) Removes max_concurrency setting from example configuration files

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

Comment thread src/inference_endpoint/dataset_manager/dataloader.py Outdated
Comment thread src/inference_endpoint/commands/benchmark.py Outdated
Comment thread src/inference_endpoint/dataset_manager/dataloader.py
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 24, 2025 14:57
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

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


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

Comment thread src/inference_endpoint/dataset_manager/dataloader.py Outdated
Comment thread src/inference_endpoint/dataset_manager/dataloader.py
Signed-off-by: Rashid Kaleem <230885705+arekay-nv@users.noreply.github.com>
@arekay-nv arekay-nv merged commit 4b7e8f6 into main Nov 24, 2025
4 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 24, 2025
@arekay-nv arekay-nv deleted the arekay/cleanup_args_handling branch November 24, 2025 15:35
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.

3 participants