Skip to content
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

data/benchmarks #422

Closed
wants to merge 25 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
msaroufim committed May 26, 2022
commit 95d48aedd444dfc69b2532be8303a750e9cb9ff8
15 changes: 9 additions & 6 deletions benchmarks/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
# Install dependencies

```
pip3 install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu113
pip3 install --pre torch torchvision torchaudio torchtext --extra-index-url https://download.pytorch.org/whl/nightly/cu113
python setup.py develop
```

# Usage instructions


```
usage: run_benchmark.py [-h] [--dataset DATASET] [--model_name MODEL_NAME] [--batch_size BATCH_SIZE]
[--num_epochs NUM_EPOCHS] [--report_location REPORT_LOCATION]
[--num_workers NUM_WORKERS] [--shuffle] [--dataloaderv DATALOADERV]
usage: run_benchmark.py [-h] [--dataset DATASET] [--model_name MODEL_NAME] [--batch_size BATCH_SIZE] [--device DEVICE] [--num_epochs NUM_EPOCHS]
[--report_location REPORT_LOCATION] [--num_workers NUM_WORKERS] [--shuffle] [--dataloaderv DATALOADERV]
```

## Available metrics
@@ -22,13 +21,17 @@ usage: run_benchmark.py [-h] [--dataset DATASET] [--model_name MODEL_NAME] [--ba
* [x] CPU Load
* [x] GPU Load
* [x] Memory usage
* [x] PyTorch profiler

## Additional profiling

```
pip install scalene
pip install torch-tb-profiler
```
`scalene run_benchmark.py`


`scalene run_benchmark.py`
## Other benchmarks in the wild
* https://github.com/pytorch/kineto/blob/main/tb_plugin/examples/datapipe_example.py
* https://github.com/pytorch/text/tree/main/test/datasets
* https://github.com/pytorch/vision/tree/main/torchvision/prototype/datasets
2 changes: 1 addition & 1 deletion benchmarks/run_benchmark.py
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ def init_fn(worker_id):
def transform(img):
t= transforms.Compose([
transforms.ToPILImage(),
transforms.Resize(size=(96,98)),
transforms.Resize(size=(100,100)),
# transforms.reshape(64,3,7,7),
transforms.ToTensor()]
)