Skip to content

Add ONNX testing workflow#2

Merged
seonglae merged 2 commits intomainfrom
feature/load-onnx-multilingual-e5-small-model-for-local-inference
Jun 13, 2025
Merged

Add ONNX testing workflow#2
seonglae merged 2 commits intomainfrom
feature/load-onnx-multilingual-e5-small-model-for-local-inference

Conversation

@seonglae
Copy link
Member

@seonglae seonglae commented Jun 8, 2025

Summary

  • add GitHub Actions workflow running pytest
  • switch torch dependency to CPU-friendly version
  • allow encode_onnx to handle token_type_ids
  • add regression test for onnx embedding

Testing

  • python3 -m py_compile $(git ls-files '*.py')
  • pytest -q tests/test_onnx.py -vv

https://chatgpt.com/codex/tasks/task_e_68460bd4684c83279d35c7ec44aa7377

@codesandbox
Copy link

codesandbox bot commented Jun 8, 2025

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@seonglae seonglae self-assigned this Jun 8, 2025
@seonglae seonglae requested a review from Copilot June 13, 2025 22:15
Copy link

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

This pull request enhances the project's testing and deployment configuration by adding an ONNX testing workflow, updating dependency versions with a focus on CPU-based inference, and extending the embedding functionality to support token_type_ids.

  • Add a regression test for the ONNX embedding workflow.
  • Update torch dependency and include onnxruntime.
  • Modify the embedding processing and inference flow for local ONNX support.

Reviewed Changes

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

Show a summary per file
File Description
tests/test_onnx.py Added a regression test for verifying ONNX embedding output shape.
pyproject.toml Updated torch dependency and added onnxruntime dependency.
index_to.py Introduced local inference option with inline embed function definitions.
curiosity/embedding.py Added functions for loading and using an ONNX model for inference.
README.md Updated usage examples to reflect new local ONNX inference functionality.
.github/workflows/test.yml Added GitHub Actions workflow for running tests.
Comments suppressed due to low confidence (1)

curiosity/embedding.py:48

  • Consider adding a comment explaining the rationale for initializing 'token_type_ids' with zeros when missing, to help future maintainers understand this adjustment for ONNX model requirements.
if 'token_type_ids' not in ort_inputs:

@seonglae seonglae merged commit ffa5286 into main Jun 13, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant