[Refactor] Benchmark Phase 1: extract utils and datasets from bench_serving#19077
Conversation
Summary of ChangesHello @Ratish1, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request undertakes a significant refactoring effort for the benchmarking infrastructure. The primary goal is to improve the organization and maintainability of the codebase by separating concerns. Core utility functions and all dataset-specific logic, previously intertwined within Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the benchmark serving logic by extracting utilities and dataset loaders into a dedicated python/sglang/benchmark/ package. This is a positive step towards better code organization and modularity. My feedback focuses on improving type hint accuracy and removing minor redundancies in the newly added modules to ensure better maintainability and compatibility with static analysis tools.
|
The first step should only contain splitting the old |
Co-authored-by: Xuchun Shang <107600043+xucsh@users.noreply.github.com>
00f0c5d to
a2d1b48
Compare
|
/tag-and-rerun-ci |
|
Merge this PR as all stage-a and stage-b tests passed. (unrelated piecewise cudagraph test failure) |
…erving (sgl-project#19077) Co-authored-by: Xuchun Shang <107600043+xucsh@users.noreply.github.com>
…erving (sgl-project#19077) Co-authored-by: Xuchun Shang <107600043+xucsh@users.noreply.github.com>
Motivation
This PR implements Phase 1 of issue #10177 by extracting benchmark utility and dataset logic from `python/sglang/bench_serving.py `into a new package structure under `python/sglang/benchmark/`.Modifications
python/sglang/benchmark/utils.pyfor benchmark utility helpers.python/sglang/benchmark/datasets/with dataset-specific modules:common.pysharegpt.pyrandom.pycustom.pyopenai_dataset.pyimage.pymmmu.pymooncake.pygenerated_shared_prefix.py__init__.pywith loader mapping andget_dataset(...).python/sglang/bench_serving.pyto import/re-export moved variables and remove moved implementations.Accuracy Tests
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci