Skip to content

Conversation

@huydhn
Copy link
Contributor

@huydhn huydhn commented Nov 13, 2024

I'm trying to make this benchmark results available on OSS benchmark database, so that people can query it from outside. The first step is to also record the results in the JSON format compatible with the database schema defined in pytorch/test-infra#5839.

Existing CSV files remain unchanged.

Testing

The JSON results are uploaded as artifacts to S3 https://github.com/pytorch/pytorch/actions/runs/11809725848/job/32901411180#step:26:13, for example https://gha-artifacts.s3.amazonaws.com/pytorch/pytorch/11809725848/1/artifact/test-jsons-test-pr_time_benchmarks-1-1-linux.g4dn.metal.nvidia.gpu_32901411180.zip

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 13, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/140493

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit d361a76 with merge base 4acd56e (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@huydhn
Copy link
Contributor Author

huydhn commented Nov 13, 2024

@pytorchbot drci

@huydhn huydhn marked this pull request as ready for review November 13, 2024 04:52
@huydhn huydhn requested a review from a team as a code owner November 14, 2024 06:15
@huydhn
Copy link
Contributor Author

huydhn commented Nov 14, 2024

@pytorchbot drci

@huydhn
Copy link
Contributor Author

huydhn commented Nov 14, 2024

huydhn added a commit to pytorch/test-infra that referenced this pull request Nov 15, 2024
To ease the process of gathering the benchmark metadata before uploading
the the database, I'm adding a script
`.github/scripts/benchmarks/gather_metadata.py` to gather this
information and pass it to the upload script. From
#5839, the benchmark metadata
includes the following required fields:

```
-- Metadata
`timestamp` UInt64,
`schema_version` String DEFAULT 'v3',
`name` String,
-- About the change
`repo` String DEFAULT 'pytorch/pytorch',
`head_branch` String,
`head_sha` String,
`workflow_id` UInt64,
`run_attempt` UInt32,
`job_id` UInt64,
-- The raw records on S3
`s3_path` String,
```

I'm going to test this out with PT2 compiler instruction count benchmark
at pytorch/pytorch#140493

### Testing


https://github.com/pytorch/test-infra/actions/runs/11831746632/job/32967412160?pr=5918#step:5:105
gathers the metadata and upload the benchmark results correctly

Also, an actual upload at
https://github.com/pytorch/pytorch/actions/runs/11831781500/job/33006545698#step:24:138
@huydhn
Copy link
Contributor Author

huydhn commented Nov 19, 2024

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased upload-pr_time_benchmarks onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout upload-pr_time_benchmarks && git pull --rebase)

@pytorchmergebot pytorchmergebot force-pushed the upload-pr_time_benchmarks branch from 5216bd0 to 91eed3d Compare November 19, 2024 18:23
opt_m(self.input)

def _write_to_json(self, output_dir: str):
records = []
Copy link
Contributor

Choose a reason for hiding this comment

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

def properties() {
device = None
is_dynmao = None
type = None
backend = None
}

device: str,
backend: str = "",
mode: str = "",
dynamic=False,
Copy link
Contributor

Choose a reason for hiding this comment

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

can we default it to None? since if user does not pass we do not know its not dynamic.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, let's default this and fullgraph to None

backend: str = "",
mode: str = "",
dynamic=False,
fullgraph=False,
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

dynamic=False,
fullgraph=False,
):
self._model_type = model_type
Copy link
Contributor

Choose a reason for hiding this comment

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

_model_type, mmhmm shall we rename it to catagory_name maybe
or group_name?

we do not always benchmark models it can be confusing.

Copy link
Contributor Author

@huydhn huydhn Nov 19, 2024

Choose a reason for hiding this comment

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

Yeah, i'm looking for a better name for this variable. category_name sounds like a good choice

self._backend = backend
self._mode = mode # Training or inference
self._dynamic = dynamic
self._fullgraph = fullgraph
Copy link
Contributor

Choose a reason for hiding this comment

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

I do not think we need the _fullgraph? we do not have benchmarks that run with and without fullgraph modes.
i also do not think it would be interesting to filter on this

self._force_shape_pad = force_shape_pad

super().__init__(
model_type=ModuleClass.__name__,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe just used "basic_modules" for the group_name?

N = 100

def __init__(self):
super().__init__(model_type="sum_floordiv", device="cpu")
Copy link
Contributor

Choose a reason for hiding this comment

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

i think backend=export for this?

@huydhn
Copy link
Contributor Author

huydhn commented Nov 20, 2024

@pytorchbot revert -m 'I think I missed something in the workflow setup as the test is failing in non-test CI jobs' -c weird

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

pytorchmergebot added a commit that referenced this pull request Nov 20, 2024
This reverts commit 783cd9c.

Reverted #140493 on behalf of https://github.com/huydhn due to I think I missed something in the workflow setup as the test is failing in non-test CI jobs ([comment](#140493 (comment)))
@pytorchmergebot
Copy link
Collaborator

@huydhn your PR has been successfully reverted.

@huydhn
Copy link
Contributor Author

huydhn commented Nov 20, 2024

I need to get pytorch/test-infra#5946 review and land before I can reland this one. This is my miss in setting up the upload GHA

huydhn added a commit to pytorch/test-infra that referenced this pull request Nov 20, 2024
@huydhn
Copy link
Contributor Author

huydhn commented Nov 20, 2024

@pytorchbot merge -f 'No need to run trunk jobs, pr_time_benchmark job has passed and pytorch/test-infra#5946 has landed'

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
I'm trying to make this benchmark results available on OSS benchmark database, so that people can query it from outside.  The first step is to also record the results in the JSON format compatible with the database schema defined in pytorch/test-infra#5839.

Existing CSV files remain unchanged.

### Testing

The JSON results are uploaded as artifacts to S3 https://github.com/pytorch/pytorch/actions/runs/11809725848/job/32901411180#step:26:13, for example https://gha-artifacts.s3.amazonaws.com/pytorch/pytorch/11809725848/1/artifact/test-jsons-test-pr_time_benchmarks-1-1-linux.g4dn.metal.nvidia.gpu_32901411180.zip

Pull Request resolved: pytorch#140493
Approved by: https://github.com/laithsakka
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
…)"

This reverts commit 783cd9c.

Reverted pytorch#140493 on behalf of https://github.com/huydhn due to I think I missed something in the workflow setup as the test is failing in non-test CI jobs ([comment](pytorch#140493 (comment)))
pobin6 pushed a commit to pobin6/pytorch that referenced this pull request Dec 5, 2024
I'm trying to make this benchmark results available on OSS benchmark database, so that people can query it from outside.  The first step is to also record the results in the JSON format compatible with the database schema defined in pytorch/test-infra#5839.

Existing CSV files remain unchanged.

### Testing

The JSON results are uploaded as artifacts to S3 https://github.com/pytorch/pytorch/actions/runs/11809725848/job/32901411180#step:26:13, for example https://gha-artifacts.s3.amazonaws.com/pytorch/pytorch/11809725848/1/artifact/test-jsons-test-pr_time_benchmarks-1-1-linux.g4dn.metal.nvidia.gpu_32901411180.zip

Pull Request resolved: pytorch#140493
Approved by: https://github.com/laithsakka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants