[STESOL-571] Locked and linted embedding generation inputs - #122
Merged
Conversation
Refine SME preprocessing eval questions
Automated release metadata bump for armlimited/arm-mcp:2.8.0.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR lays the groundwork for reproducible/offline embedding generation by introducing a locked Python environment and forcing both vector generation and retrieval evaluation to use a locally acquired, revision-pinned embedding model (with network disabled during the vector-generation step).
Changes:
- Adds a standalone
uv-managed Python 3.13 project configuration for embedding generation (plus new ignore rules for generated artifacts). - Pins the sentence-transformer model to a specific Hugging Face revision via a lock file and introduces an acquisition script; updates generation/eval flows to load from a local model path.
- Tightens CI for embedding-generation by adding Ruff checks and enabling the workflow on
secure-buildPRs.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| mcp-local/server.json | Bumps published MCP server version and container tag reference. |
| embedding-generation/tests/test_vector_db_sources.py | Lint-only formatting changes. |
| embedding-generation/tests/test_generate_chunks.py | Lint-only formatting changes. |
| embedding-generation/tests/conftest.py | Lint-only formatting changes. |
| embedding-generation/run-question-eval.sh | Switches eval flow to acquire and use a local locked model directory; sets offline env for generation/eval. |
| embedding-generation/README.md | Updates local usage to uv + local model acquisition/offline generation steps. |
| embedding-generation/pyproject.toml | Introduces uv project metadata, dependency groups, Ruff config, and required environments. |
| embedding-generation/local_vectorstore_creation.py | Requires --model-path and forces local-only model loading for embedding creation. |
| embedding-generation/generate-chunks.py | Lint pass + source handling tweaks; continues chunk generation/discovery behavior. |
| embedding-generation/evaluate_retrieval.py | Switches evaluation from --model-name to required --model-path. |
| embedding-generation/eval_questions.json | Updates a couple of evaluation question strings. |
| embedding-generation/embedding-model.lock.json | Adds locked model identifier + exact revision SHA. |
| embedding-generation/document_chunking.py | Lint/typing modernization (PEP 585, collections.abc). |
| embedding-generation/Dockerfile | Adds model acquisition step and disables network during vector generation; passes --model-path. |
| embedding-generation/discover-developer-arm-com-sources.py | Lint/typing modernization. |
| embedding-generation/acquire-model.py | Adds a dedicated script to download the locked model revision and save a local copy. |
| embedding-generation/.python-version | Declares Python 3.13 for embedding-generation tooling. |
| arm_kb_search/resources.py | Adds support for loading embedding models via an explicit local path (and disables downloads when provided). |
| .gitignore | Ignores embedding-generation caches and generated artifacts. |
| .github/workflows/embedding-unit-tests.yml | Adds Ruff linting and enables workflow for secure-build branches/PRs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
This is PR 1 of 2 addressing STESOL-571.
A lot of files are changed by this PR, but many are just linting. In particular, changes to the following are linting-only:
The changes to
eval_questions.jsonandserver.jsonare from PRs that landed in main but not yet secure-build.Summary
Scope