refactor: require ORT build tag to prevent silent GoMLX fallback#523
Merged
philwinder merged 1 commit intomainfrom Apr 7, 2026
Merged
refactor: require ORT build tag to prevent silent GoMLX fallback#523philwinder merged 1 commit intomainfrom
philwinder merged 1 commit intomainfrom
Conversation
Remove hugot_go.go and make ORT session unconditional. This prevents downstream users from silently falling back to GoMLX (which doesn't support INT8 quantized models), and instead returns a clear error: "to enable ORT, run go build -tags ORT or go build -tags ALL". - Delete hugot_go.go (!ORT fallback that used hugot.NewGoSession) - Remove ORT build constraint from hugot_ort.go - newHugotSession() now always calls hugot.NewORTSession() - Users without -tags ORT get an explicit error, not a cryptic ConvInteger failure - Cleaned up unused dependencies (swaggo/swag, go-openapi/* imports) All tests pass with ORT backend. Vision model tests confirm INT8 inference works.
Contributor
Go Test CoverageTotal coverage: 31.5% Full coverage report |
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.
Summary
Remove the silent GoMLX backend fallback to ensure users get a clear error when building without
-tags ORTinstead of a crypticConvInteger not supportedfailure from GoMLX.hugot_go.goand make ORT session unconditionalgo build -tags ORT"Test plan
make test PKG=./infrastructure/provider/...— all provider tests passmake checkpasses