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 mixed precision LP numerical issue #843

Merged
merged 5 commits into from
Oct 29, 2023
Merged

Conversation

ofirgo
Copy link
Collaborator

@ofirgo ofirgo commented Oct 29, 2023

Adding a threshold for mixed precision metric and scaling the metric in case some values are larger than the threshold, to prevent numerical issues.
This is supposed to address a possible issue with the pulp library's default LP solver.

… case there are values that are larger than the threshold, to preven numerical issues.
@ofirgo ofirgo requested a review from Idan-BenAmi October 29, 2023 07:19
Logger.warning(f"The mixed precision distance metric values indicate a large error in the quantized model."
f"this can cause numerical issues."
f"The program will proceed with mixed precision search after scaling the metric values,"
f"which can lead to unstable results.")
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wouldn't it be more correct? The high values in the mixed precision distance metric may imply a large error in the quantized model which can cause numerical issues

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is to inform the user that there might be an issue with the model, not the mixed precision necessarily. Such large distance may indicates that something is wrong with the model.

@ofirgo ofirgo merged commit 424bb91 into sony:main Oct 29, 2023
22 checks passed
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.

2 participants