Remove automatic ONNX export from training#520
Merged
Conversation
Co-authored-by: drewoldag <47493171+drewoldag@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove export_to_onnx from training process
Remove automatic ONNX export from training
Oct 30, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #520 +/- ##
==========================================
- Coverage 54.05% 53.55% -0.51%
==========================================
Files 48 48
Lines 4767 4760 -7
==========================================
- Hits 2577 2549 -28
- Misses 2190 2211 +21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
drewoldag
approved these changes
Oct 31, 2025
Collaborator
drewoldag
left a comment
There was a problem hiding this comment.
This looks correct to me. The goal of the PR is to stop attempting to automatically produce an ONNX model at the end of train. This does just that.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request removes the automatic ONNX model export functionality from the training verb. After training completes, the model will no longer be automatically exported to ONNX format.
- Removed ONNX export import statement
- Removed post-training ONNX export code block
Comments suppressed due to low confidence (1)
src/hyrax/verbs/train.py:1
- The removal of ONNX export functionality from the training verb leaves the
[onnx]configuration section inhyrax_default_config.toml(lines 160-164) unused. This section includes theopset_versionparameter that is no longer referenced anywhere in the codebase. Consider either removing this configuration section or documenting that ONNX export has been moved/deprecated.
import logging
This file contains hidden or 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
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.
Training automatically exported models to ONNX format regardless of whether they would go to production, wasting compute time.
Changes
export_to_onnx()call and supporting code fromTrain.run()insrc/hyrax/verbs/train.pyexport_to_onnxfrom train verbmodel_exporters.pyfor explicit manual useImpact
Training completes faster. Models are only exported to ONNX when users explicitly call
export_to_onnx()instead of automatically after every training run.Original prompt
export_to_onnxfrom train #519✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.