-
Notifications
You must be signed in to change notification settings - Fork 517
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
Feature/sg 1386 granular control over export in ptq and qat #1879
Feature/sg 1386 granular control over export in ptq and qat #1879
Conversation
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.
Is this a breaking change?
Some minor comments inside
…rt-in-ptq-and-qat
…rt-in-ptq-and-qat
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.
looks great.
minor comments/questions
…-over-export-in-ptq-and-qat' into feature/SG-1386-granular-control-over-export-in-ptq-and-qat
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.
LGTM
This PR introduce a better control on the model export to ONNX format while using PTQ and QAT.
It introduce an
ExportParams
dataclass andexport_params
argument toptq()
andqat()
methods that is meant to contain many properties one may use to explicitly set this or another parameter used during export process.As an example one may enable of disable attaching postprocessing to detection model. And this would behave exactly the sample way for PTQ and QAT (Currently these methods export model differently #1189)
Motivation to introduce an
ExportParams
dataclass is to introduce some form of strict schema of what parameters can be passed. This is especially useful in Colab environment since once can easily get code completion and navigate to that dataclass and read comments on each field.A recipe-based entry-points (Like
quantize_from_config
) can easily populate this object as it has no mandatory fields.To PR should be merged after #1860, so that we can incorporate .export() support for segmentation models.