Skip to content

[API BASE]Setup cli & python lib for benchmark toolings #6756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: main
Choose a base branch
from

Conversation

yangw-dev
Copy link
Contributor

@yangw-dev yangw-dev commented Jun 12, 2025

Overview

Set up base for cli tools & python lib that can be imported and called for benchmark use cases.

Details

  • Added bash script to auto-generate datamodel for both ts and python, it includes validations

    • generate.sh
    • zod_generate.sh
  • set up base for cli tool using cement, so user can installl and call the cli tool anywhere in their machine

  • ExecuTorch specific (for now):

    • Add shortcut cli & python method to fetch execuBenchmark result from hud api

How to use the cli

See readme

Third Party License Check

All confirmed pre-approved in oss_project_use(meta)
- zod [MIT]
- pydantic[MIT]
- datamodel-code-generator[MIT]
- cement [BSD 3-Clause License]

yangw-dev added 7 commits June 5, 2025 14:38
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Copy link

vercel bot commented Jun 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Updated (UTC)
torchci ⬜️ Ignored (Inspect) Visit Preview Jun 13, 2025 11:18am

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 12, 2025
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev requested a review from huydhn June 12, 2025 18:20
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev changed the title Setupapi [API BASE]Setupapi Jun 12, 2025
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev marked this pull request as ready for review June 12, 2025 18:31
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev changed the title [API BASE]Setupapi [API BASE]Setup cli & python package for benchmark api call Jun 13, 2025
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@yangw-dev yangw-dev requested review from seemethere June 13, 2025 02:19
@yangw-dev yangw-dev changed the title [API BASE]Setup cli & python package for benchmark api call [API BASE]Setup cli & python package for benchmark toolings Jun 13, 2025
@yangw-dev yangw-dev changed the title [API BASE]Setup cli & python package for benchmark toolings [API BASE]Setup cli & python lib for benchmark toolings Jun 13, 2025
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
Signed-off-by: Yang Wang <[email protected]>
@seemethere
Copy link
Member

Maybe I'm missing some context on this, what is this supposed to be doing?

@yangw-dev
Copy link
Contributor Author

yangw-dev commented Jun 13, 2025

Maybe I'm missing some context on this, what is this supposed to be doing?

This basically provide benchmark tools for xfn teams to fetch data, trigger lambda and bisect etc.
I want to have a central place to put all scripts and api client for benchmark users, & use cases.

Wrapped in as cli-tool so they can call it everywhere once it's installed.

In this pr, one use case is, execuTorch currently ask to fetch all data grouped by device so they can analyze how reliable the benchmark result is

@huydhn
Copy link
Contributor

huydhn commented Jun 13, 2025

Let's sync on this as I don't think we want to implement this CLI tool without a proper design. IMO, I don't think we need a cli tool like this for now because of several reasons:

  • There is already an experimental query API for them to get the data https://github.com/pytorch/pytorch/wiki/PyTorch-OSS-benchmark-infra#experimental-query-api, I create this few weeks back to allows people from compiler and vLLM to query their benchmark results. They can do whatever they want with the data. I think we should do the same for ExecuTorch
  • I think we want to avoid having customer-specific logic on benchmark infra side, so having a CLI tool to support ExecuTorch use case seems wrong. It should be a script on ExecuTorch side instead and the grouped by device part should be moved there. Otherwise, this might become another behemoth like TorchBench
  • In addition, other features like triggering lambda or bisecting is too early to implement now because we don't even have them on CI yet

Copy link
Contributor

@huydhn huydhn left a comment

Choose a reason for hiding this comment

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

Let's hold on to this cli tool for further discussion #6756 (comment)

@yangw-dev
Copy link
Contributor Author

kk, sounds good!
This is def just a proposal

@yangw-dev yangw-dev requested a review from huydhn June 17, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants