Skip to content

fix: hardcode onnxruntime to 1.24.2#406

Merged
Davidnet merged 2 commits into
mainfrom
fix/hardcode-onnxruntime-1.24.2
May 8, 2026
Merged

fix: hardcode onnxruntime to 1.24.2#406
Davidnet merged 2 commits into
mainfrom
fix/hardcode-onnxruntime-1.24.2

Conversation

@Davidnet
Copy link
Copy Markdown
Member

@Davidnet Davidnet commented May 8, 2026

Summary

  • Roll back ONNX Runtime to 1.24.2 and pin onnxruntime_go to v1.27.0. The previous bump assumed multiple ONNX Runtime versions could be supported; in practice the C API headers in onnxruntime_go require a specific matching runtime version, so we're hardcoding a single version for now.
  • Update docs/02-development-guide.md so all install/download/verify steps reference 1.24.2.

Follow-up

  • A separate issue will be created to revisit the ONNX Runtime versioning strategy and establish a single source of truth (e.g. a build constant / Makefile variable) so the Go module version, the downloaded shared library, and the docs cannot drift apart again.

Test plan

  • go build ./... succeeds with the pinned onnxruntime_go v1.27.0
  • Backend starts locally with libonnxruntime.1.24.2.dylib / libonnxruntime.so
  • Inference smoke test against the quantized model returns expected results

Previous changes assumed multiple ONNX Runtime versions could be supported;
hardcoding to a single version (1.24.2) to align with the onnxruntime_go
v1.27.0 C API headers and avoid version mismatches.
Copilot AI review requested due to automatic review settings May 8, 2026 18:02
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Pins the project’s ONNX Runtime stack to a single compatible version by downgrading onnxruntime_go and updating development defaults/documentation to consistently use ONNX Runtime 1.24.2, reducing version drift and runtime/header mismatches.

Changes:

  • Pin Go binding github.com/yalue/onnxruntime_go to v1.27.0.
  • Switch local development default model variant to quantized.
  • Update the development guide to install/download/copy ONNX Runtime 1.24.2.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.

File Description
src/backend/config/config.development.json Default local config now uses the quantized model variant.
go.mod Pins onnxruntime_go to v1.27.0 to match the intended ORT C API compatibility.
go.sum Adds checksums for onnxruntime_go v1.27.0 (but retains v1.28.0 sums).
docs/02-development-guide.md Updates ONNX Runtime install/download instructions to 1.24.2.
Comments suppressed due to low confidence (1)

docs/02-development-guide.md:112

  • On Linux, these steps copy the shared library to ./build/libonnxruntime.so, but the backend’s ONNX loader searches for versioned filenames like ./build/libonnxruntime.so.1.24.2 (or uses ONNXRUNTIME_SHARED_LIBRARY_PATH if set). As written, following the guide on Linux likely results in the library not being found at runtime. Update the instructions to either copy/symlink to build/libonnxruntime.so.1.24.2 (optionally also create build/libonnxruntime.so symlink) or document setting ONNXRUNTIME_SHARED_LIBRARY_PATH on Linux to the copied .so path.
cp "$LIB_PATH" ./build/libonnxruntime.1.24.2.dylib

# Find and copy library (Linux)
LIB_PATH=$(find .venv -name "libonnxruntime.so.*" | head -1)
cp "$LIB_PATH" ./build/libonnxruntime.so
</details>



---

💡 <a href="/dataiku/kiji-proxy/new/main?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.

Comment on lines 142 to +145
# Linux
wget https://github.com/microsoft/onnxruntime/releases/download/v1.25.0/onnxruntime-linux-x64-1.25.0.tgz
tar -xzf onnxruntime-linux-x64-1.25.0.tgz
cp onnxruntime-linux-x64-1.25.0/lib/libonnxruntime.so.1.25.0 build/libonnxruntime.so
wget https://github.com/microsoft/onnxruntime/releases/download/v1.24.2/onnxruntime-linux-x64-1.24.2.tgz
tar -xzf onnxruntime-linux-x64-1.24.2.tgz
cp onnxruntime-linux-x64-1.24.2/lib/libonnxruntime.so.1.24.2 build/libonnxruntime.so
@Davidnet
Copy link
Copy Markdown
Member Author

Davidnet commented May 8, 2026

Follow-up issue for unifying the ONNX Runtime version: #407

Copy link
Copy Markdown
Collaborator

@hanneshapke hanneshapke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please sign the CLA.

"LogVerbose": true
},
"ModelVariant": "trained",
"ModelVariant": "quantized",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert.

@Davidnet
Copy link
Copy Markdown
Member Author

Davidnet commented May 8, 2026

I have read the CLA Document and I hereby sign the CLA

@Davidnet Davidnet requested a review from hanneshapke May 8, 2026 21:33
@Davidnet Davidnet merged commit 2304318 into main May 8, 2026
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants