Skip to content

Replace spacy Language.en baseline with on-device model version pinning #268

Description

@kilodesodiq-arch

Problem Statement. pii_scrubber.py::_build_nlp() constructs a spacy.blank("en")
pipeline with hand-rolled entity-ruler patterns. There is no explicit model version.

Why it matters. Reproducibility. Two machines scrubbing the same text might produce
different results over time.

Technical Context. app/ai-service/services/pii_scrubber.py.

Expected Outcome. A PII_MODEL_VERSION field; tests assert that the model version is
exposed in metrics and that the regression harness outputs include it.

Acceptance Criteria.

  • Metric pii_model_version{version="X"} exported.
  • Regression harness report includes the model version in footer.

Files or modules likely to be affected.
app/ai-service/services/pii_scrubber.py,
app/ai-service/metrics.py.

Difficulty. Medium
Estimated effort. M



Backlog item #60 from `docs/maintainer-issue-backlog.md.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions