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

Add a self-calibration run #110

Merged
merged 10 commits into from
Feb 21, 2024
Merged

Add a self-calibration run #110

merged 10 commits into from
Feb 21, 2024

Conversation

wpietri
Copy link
Contributor

@wpietri wpietri commented Feb 21, 2024

This pulls the calibration constants out of the code and into a JSON config file and then adds a command to generate it. The current numbers are a bit suspect, as they use a very small number of examples. Once we solve some NewHELM issues, we should be able to increase that.

@wpietri wpietri requested a review from dhosterman February 21, 2024 01:56
Copy link

github-actions bot commented Feb 21, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Copy link
Collaborator

@dhosterman dhosterman left a comment

Choose a reason for hiding this comment

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

I've added a couple of nits, but looks generally fine to me!

type=click.Path(file_okay=True, dir_okay=False, path_type=pathlib.Path),
)
def calibrate(update: bool, file) -> None:
print("current standards")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to standardize on using click.echo instead of print? It looks like the benefits are fairly negligible, but are present, and I believe newhelm is using click.echo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let's try it out.

help="Run benchmarks for the reference sut and update the reference scores.",
)
@click.option(
"--file",
Copy link
Collaborator

Choose a reason for hiding this comment

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

For --update and --file, maybe these could be more explicit about which file and what update they're doing? --update-reference-scores is unwieldy, but explicit, and could have a short version. --file could use some help.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea. Honestly, I'm not sure it should have a file option at all, so perhaps we should get rid of it. I've added some help text for both command and option, which should make it clearer what they're for.

@wpietri wpietri merged commit 6508136 into main Feb 21, 2024
2 checks passed
@wpietri wpietri deleted the add-automatic-calibration branch February 21, 2024 23:00
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants