-
Notifications
You must be signed in to change notification settings - Fork 709
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
Fix inconsistent benchmarking throughput/time #221
Conversation
tools/benchmarking/benchmark.py
Outdated
@@ -218,6 +256,8 @@ def sweep(run_config: Union[DictConfig, ListConfig], device: int = 0, seed: int | |||
|
|||
# Run benchmarking for current config | |||
model_metrics = get_single_model_metrics(model_config=model_config, openvino_metrics=convert_openvino) | |||
print(model_config.model.name, model_config.dataset.category) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we want to run benchmark.py
for custom datasets that don't have category
field?
tools/benchmarking/benchmark.py
Outdated
logging.getLogger("pytorch_lightning").setLevel(logging.ERROR) | ||
logging.getLogger("torchmetrics").setLevel(logging.ERROR) | ||
logging.getLogger("os").setLevel(logging.ERROR) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we could set the level in a for loop to avoid the duplicated lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, just minor stuff
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works, but there will still be inconsistency in the throughput numbers between a normal training run and the benchmarking script. Maybe to avoid confusion, you could also add the batch size to the output in the timer callback Something like Throughput (batch_size=16): 12 FPS
Description
Supress outputs from model and print values from benchmarking script
Fixes Error while running benchmark.py on GPU #185
Changes
Checklist