Remove onnx, onnxruntime, skl2onnx from requirements and defer imports#833
Merged
jkgoodrich merged 4 commits intomainfrom Apr 8, 2026
Merged
Remove onnx, onnxruntime, skl2onnx from requirements and defer imports#833jkgoodrich merged 4 commits intomainfrom
jkgoodrich merged 4 commits intomainfrom
Conversation
Move onnx/onnxruntime/skl2onnx imports into the functions that use them so the module loads without these packages installed, avoiding the protobuf version conflict with Hail on Dataproc (see #831). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Lint environment doesn't install onnx/onnxruntime/skl2onnx since they were removed from requirements.txt, so pylint flags the deferred imports. Add inline disable comments scoped to those specific lines. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sphinx autodoc fails to resolve "onnx.ModelProto" forward references since onnx is not installed in the docs build environment. Use Any instead — the runtime isinstance check still validates the model type. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
mike-w-wilson
approved these changes
Apr 8, 2026
Contributor
mike-w-wilson
left a comment
There was a problem hiding this comment.
Looks good -- I just added a note to show up in the docs and also catching the import error to remind users they need to install the packages if they havent already.
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.
Move onnx/onnxruntime/skl2onnx imports into the functions that use them so the module loads without these packages installed, avoiding the protobuf version conflict with Hail on Dataproc (see #831).