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

Fix benchmark script #32635

Merged
merged 2 commits into from
Aug 22, 2024
Merged

Fix benchmark script #32635

merged 2 commits into from
Aug 22, 2024

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Aug 12, 2024

What does this PR do?

@@ -101,7 +101,7 @@ def summarize(run_dir, metrics, expand_metrics=False):
# post-processing of report: show a few selected/important metric
for metric in metrics:
keys = metric.split(".")
value = report
value = report.to_dict()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

v0.2.0 doesn't need to_dict, but 0.4.0 needs this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

v0.2.0 of what package?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

sorry, it's optimum-benchmark

Copy link
Member

Choose a reason for hiding this comment

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

The issue is specifically from this __post_init__ in v0.2.0 that was incomplete ; only casts the config dict to the appropriate dataclass:
https://github.com/huggingface/optimum-benchmark/blob/v0.2.0/optimum_benchmark/base.py#L25-L29
which was fixed/completed in:
https://github.com/huggingface/optimum-benchmark/blob/v0.3.0/optimum_benchmark/benchmark/base.py#L24-L33

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for fixing @ydshieh!

Change looks OK - but I'm guess it's not backwards compatible if the user has v0.2.0? Is optimum-benchmark version pinned anywhere in the library?

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 21, 2024

Thanks. I update the min. version.

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for fixing!

@ydshieh ydshieh merged commit bf97d4a into main Aug 22, 2024
18 of 23 checks passed
@ydshieh ydshieh deleted the fix_benchmark_job branch August 22, 2024 14:07
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Aug 30, 2024
* fix

* >= 0.3.0

---------

Co-authored-by: ydshieh <[email protected]>
zucchini-nlp pushed a commit to zucchini-nlp/transformers that referenced this pull request Aug 30, 2024
* fix

* >= 0.3.0

---------

Co-authored-by: ydshieh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants