Merged
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
There was a problem hiding this comment.
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:
…l-for-local-inference
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
Testing
python3 -m py_compile $(git ls-files '*.py')pytest -q tests/test_onnx.py -vvhttps://chatgpt.com/codex/tasks/task_e_68460bd4684c83279d35c7ec44aa7377