-
Notifications
You must be signed in to change notification settings - Fork 454
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
ORTSeq2SeqTrainer refactoring - Inference with ORTModel #359
Merged
JingyaHuang
merged 17 commits into
refactoring-orttrainer-inf
from
refactoring-ort-seq2seqtrainer
Sep 7, 2022
Merged
ORTSeq2SeqTrainer refactoring - Inference with ORTModel #359
JingyaHuang
merged 17 commits into
refactoring-orttrainer-inf
from
refactoring-ort-seq2seqtrainer
Sep 7, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Refactorization of ORTOptimizer * Refactorization of ORTModel * Adapt examples according to refactorization * Adapt tests * Fix style * Remove quantizer modification * Fix style * Apply modifications from #270 for quantizer and optimizer to have same behavior * Add test for optimization of Seq2Seq models * Fix style * Add ort config saving when optimizing a model * Add ort config saving when quantizing a model * Add tests * Fix style * Adapt optimization examples * Fix readme * Remove unused parameter * Adapt quantization examples * Fix quantized model and ort config saving * Add documentation * Add model configuration saving to simplify loading of optimized model * Fix style * Fix description * Fix quantization tests * Remove opset argument which is onnx config default opset when exporting with ORTModels
* fix(optimization): handle empty file suffix * fix(quantization): handle empty file suffix * use pathlibfor save_dir * run test again * Update optimum/onnxruntime/quantization.py Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com> * ReRun test that failed because of cache (network) Co-authored-by: Ella Charlaix <80481427+echarlaix@users.noreply.github.com>
* fix class * Update optimization.mdx
JingyaHuang
added a commit
that referenced
this pull request
Sep 19, 2022
…189) * Inference with ORTModel * Clean up unused imports * Replace Inference session by ort model * Inference with ORTModel * Replace in evaluation_loop * refactoring prediction_loop * ORTSeq2SeqTrainer refactoring - Inference with ORTModel (#359) * Override export of ORTSeq2SeqTrainer * Update OnnxConfigWithLoss wrapper * Fix ORTTrainer inference ort subclass parsing * Override the evaluation and prediction loop in ORTSeq2SeqTrainer * detect labels from input names * Detect loss from output names * Put back decoder with past * Put past key values in the correct place * remove if/else statement * Revert the inference code
JingyaHuang
added a commit
that referenced
this pull request
Oct 2, 2022
* Inference with ORTModel * Clean up unused imports * Replace Inference session by ort model * Inference with ORTModel * Clean up unused imports * Replace Inference session by ort model * Update modeling for custom tasks * Replace in evaluation_loop * refectoring prediction_loop * ORTSeq2SeqTrainer refactoring - Inference with ORTModel (#359) * Override export of ORTSeq2SeqTrainer * Do not force download by default in ORTModel (#356) * Update OnnxConfigWithLoss wrapper * ORT optimizer refactorization (#294) * Refactorization of ORTOptimizer * Refactorization of ORTModel * Adapt examples according to refactorization * Fix ORTTrainer inference ort subclass parsing * Replace datasets.load_metric by evaluate * Add summarization example * Enable ORT inference * Fix inference args * Mention ORT inference in READMEs * Remove repetitve code in Trainer * Update examples to trfrs 4.22.1 * Fix qa example prediction error * Update summarization/README.md * Fix logger consistency * Make readme consistent with trfrs * Put back onnx config with past and loss test
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
ORTSeq2SeqTrainer
by leveraging subclasses ofORTModel
for sequence to sequence tasks.