Skip to content

feat: model2vec text embeddings plugin - #343

Merged
JarbasAl merged 1 commit into
devfrom
feat/text-embeddings
Oct 22, 2026
Merged

JarbasAl merged 1 commit into
devfrom
feat/text-embeddings

Conversation

@openvoiceos-bot

Copy link
Copy Markdown
Contributor

🤖 Auto-generated by Claude Opus 5.5 (claude-opus-5-5) via Claude Code — NOT human-reviewed. Verify before acting.

What changes

A new plugin in this package, ovos-m2v-embeddings-plugin (opm.embeddings.text), turns text into vectors with a Model2Vec static model.

Part Behaviour
get_embeddings_batch(texts) One encode call for all texts, one row per text in order
get_embeddings(text) One vector
Config model (default minishlab/potion-multilingual-128M, a Hub id or a local directory), normalize (default true: unit-length vectors)
Model memory Loads through load_shared_model(path, "prototype"), so an intent pipeline and the embedder that load the same path hold one copy

The plugin manager pin stays <3.0.0. ovos-core, padatious, adapt, the OCP and common-query pipelines and ovos-typed-slots-transformer all cap it below 3, so this package cannot run on OPM 3 inside a real ovos-core yet. The class defines get_embeddings_batch itself, so batching works on OPM 2.x, where the template has no batch method (OpenVoiceOS/ovos-plugin-manager#472 adds one in 3.1.0a1).

Evidence

Check Result
New tests, tiny model saved to a temporary directory, expected vectors from StaticModel.encode plus numpy normalisation 6 passed; all failed to import before the module existed
Full suite on OPM 2.12.5a1 1095 passed, 4 skipped
model2vec potion-multilingual-128M, 5000 texts 291 ms as one batch, 1221 ms one at a time

During this work: ovoscope's collection hook made a test module with a failing import collect 0 tests and no error under this repo's --import-mode=importlib. Run with -p no:ovoscope until OpenVoiceOS/ovoscope#226 is released. This suite collects 1099 tests both with and without the plugin, so no module hides here.

🤖 Generated with Claude Code

ovos-m2v-embeddings-plugin is a TextEmbedder over a Model2Vec static
model. get_embeddings_batch encodes all texts in one call and returns
unit-length vectors by default. The model loads through the shared
model cache, so the embedder and an intent pipeline that load the same
path hold one copy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f56d4e9f-1aac-451b-b802-cd9a8e1cfbca
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Greetings! The CI pipeline has delivered its findings. 🏗️

I've aggregated the results of the automated checks for this PR below.

🏷️ Release Preview

I've checked the 'Security Updates' section. 🛡️

Current: 0.36.1a1 → Next: 0.37.0a1

Signal Value
Label (none)
PR title feat: model2vec text embeddings plugin
Bump minor

✅ PR title follows conventional commit format.


🚀 Release Channel Compatibility

Predicted next version: 0.37.0a1

Channel Status Note Current Constraint
Stable ⚪ Not in channel -
Testing ✅ Compatible ovos-m2v-pipeline>=0.0.7,<1.0.0
Alpha ✅ Compatible ovos-m2v-pipeline>=0.36.1a1

⚖️ License Check

Ensuring our licenses allow for commercial use. 🏢

✅ No license violations found.

Policy: Apache 2.0 (universal donor). StrongCopyleft / NetworkCopyleft / WeakCopyleft / Other / Error categories fail. MPL allowed.

🔒 Security (pip-audit)

Checking for any potential privacy concerns. 🕶️

✅ No known vulnerabilities found (88 packages scanned).

🔌 Skill Tests (ovoscope)

Testing the real-world flow of your skill's intents. 🌊

✅ 31/31 passed

✅ TestIntent4Consume — 10/10
✅ TestPrototypeBlacklistE2E — 3/3
✅ TestPrototypeMatch — 3/3
✅ TestPrototypePipelineLoad — 1/1
✅ TestPrototypeRegistration — 2/2
✅ TestPrototypeSpecialLabelGating — 3/3
✅ TestPrototypeStrategyConfigPlumbing — 3/3
✅ TestPrototypeStrategyE2E — 6/6

🚌 Bus Coverage

A comprehensive review of the skill's bus-level interactions. 🚌

⚠️ Bus coverage report unavailable — check the job log.

📋 Repo Health

Your repository is in great shape! ✅

✅ All required files present.

Latest Version: 0.36.1a1

✅ ovos_m2v_pipeline/version.py — Version file
✅ README.md — README
✅ LICENSE — License file
✅ pyproject.toml — pyproject.toml
⚠️ setup.py — setup.py
✅ CHANGELOG.md — Changelog
✅ ovos_m2v_pipeline/version.py has valid version block markers

🔌 Plugin Detection

Scanning for any 'performance bottlenecks' in the plugin. 📉

⚠️ Plugin Status: WARNINGS (2)

Plugin Info:

  • Name: ovos_m2v_pipeline
  • Description: Model2Vec intent engine for OVOS

OPM Detection:

Plugin Type Wheel Editable
pipeline ✅ ✅

Entry Point Validation:

Entry Point Type Import Interface
ovos-m2v-embeddings-plugin embeddings.text ⊘ ⊘
ovos-m2v-pipeline pipeline ⊘ ⊘
ovos-m2v-prototype-pipeline pipeline ⊘ ⊘

⊘ No settingsmeta.json
✅ requires-python >=3.10 — running Python 3.11

Issues:

  • ⚠️ No settingsmeta.json found
  • ⚠️ No settingsmeta.json found

🔨 Build Tests

Running the forge to see if the code tempers correctly. 🔥

✅ All versions pass

Python Build Install Tests pytest
3.10 ✅ ✅ ✅ 1083 passed, 16 skipped, 3 warnings, 35 subtests passed in 533.84s (0:08:53)
3.11 ✅ ✅ ✅ 1083 passed, 16 skipped, 3 warnings, 35 subtests passed in 533.65s (0:08:53)
3.12 ✅ ✅ ✅ 1083 passed, 16 skipped, 3 warnings, 35 subtests passed in 570.58s (0:09:30)
3.13 ✅ ✅ ✅ 1083 passed, 16 skipped, 3 warnings, 35 subtests passed in 556.22s (0:09:16)
3.14 ✅ ✅ ✅ 1083 passed, 16 skipped, 3 warnings, 35 subtests passed in 560.28s (0:09:20)

📊 Coverage

A forensic analysis of your test coverage. 🔍

✅ 93.1% total coverage

Per-file coverage (9 files)
File Coverage Missing lines
ovos_m2v_pipeline/cli.py 72.1% 43
ovos_m2v_pipeline/prebuilt.py 75.6% 20
ovos_m2v_pipeline/cache.py 92.5% 6
ovos_m2v_pipeline/strategies.py 94.6% 6
ovos_m2v_pipeline/__init__.py 96.0% 60
ovos_m2v_pipeline/slots.py 96.2% 2
ovos_m2v_pipeline/embeddings.py 100.0% 0
ovos_m2v_pipeline/renames.py 100.0% 0
ovos_m2v_pipeline/version.py 100.0% 0

Full report: download the coverage-report artifact.


Your digital assistant in the world of OVOS 🤖

@github-actions

Copy link
Copy Markdown
Contributor

Live fixture test

ovos-m2v-pipeline — classifier mode (MiniCroft + bus)

Status: ✅ PASS
Accuracy: 96/114 (84.2%) — tolerance ≤ 20% drift

Misclassifications
utterance expected got
what are the highest rated films out now ovos-skill-moviemaster.openvoiceos:movie.top.intent no match
what's the temperature at 11 am thursday ovos-skill-weather.openvoiceos:hourly_temperature.intent no match
disable dictation mode ovos-skill-dictation.openvoiceos:stop_dictation.intent no match
what are the exact days of the coming sunday ovos-skill-date-time.openvoiceos:date.future.weekend.intent no match
tell me about world news ovos-skill-news.openvoiceos:global_news.intent no match
missed a reminder ovos-skill-alerts.openvoiceos:missed_alerts.intent no match
when is the coming weekend ovos-skill-date-time.openvoiceos:date.future.weekend.intent no match
are we currently in february? ovos-skill-date-time.openvoiceos:what.month.is.it.intent no match
what were the dates for last saturday ovos-skill-date-time.openvoiceos:date.last.weekend.intent no match
when is the iss going to be over us ovos-skill-iss-location.openvoiceos:when_iss.intent no match
when is the space station going to be over us ovos-skill-iss-location.openvoiceos:when_iss.intent no match
do i need a coat ovos-skill-weather.openvoiceos:current_temperature.intent no match
forecast for monday at 9 pm ovos-skill-weather.openvoiceos:hourly_forecast.intent no match
tell me the forecast next tuesday ovos-skill-weather.openvoiceos:daily_forecast.intent no match
give me the full date ovos-skill-date-time.openvoiceos:current_date.intent no match
how cold will it get thursday ovos-skill-weather.openvoiceos:low_temperature.intent no match
tell me which month we're in ovos-skill-date-time.openvoiceos:what.month.is.it.intent no match
what is the temperature wednesday morning ovos-skill-weather.openvoiceos:hourly_temperature.intent no match

ovos-m2v-prototype-pipeline — prototype mode (leave-one-out, k=5)

Status: ✅ PASS
Accuracy: 96/114 (84.2%) — tolerance ≤ 33% drift

Misclassifications
utterance expected got
do i need a coat ovos-skill-weather.openvoiceos:current_temperature.intent ovos-skill-date-time.openvoiceos:date.last.weekend.intent
how cold will it get thursday ovos-skill-weather.openvoiceos:low_temperature.intent ovos-skill-weather.openvoiceos:hourly_temperature.intent
what is the temperature wednesday morning ovos-skill-weather.openvoiceos:hourly_temperature.intent ovos-skill-weather.openvoiceos:low_temperature.intent
can you deactivate text transcription ovos-skill-dictation.openvoiceos:stop_dictation.intent ovos-skill-date-time.openvoiceos:what.time.is.it.intent
let's begin saving to text ovos-skill-dictation.openvoiceos:start_dictation.intent ovos-skill-dictation.openvoiceos:stop_dictation.intent
start dictation ovos-skill-dictation.openvoiceos:start_dictation.intent ovos-skill-dictation.openvoiceos:stop_dictation.intent
what's the forecast for tomorrow at 3 am ovos-skill-weather.openvoiceos:hourly_forecast.intent ovos-skill-weather.openvoiceos:hourly_temperature.intent
what is the min temperature wednesday morning ovos-skill-weather.openvoiceos:low_temperature.intent ovos-skill-weather.openvoiceos:hourly_temperature.intent
peak temperature for monday ovos-skill-weather.openvoiceos:high_temperature.intent ovos-skill-weather.openvoiceos:hourly_temperature.intent
how is the weather sunday noon ovos-skill-weather.openvoiceos:hourly_forecast.intent ovos-skill-weather.openvoiceos:daily_forecast.intent
can we end note-taking ovos-skill-dictation.openvoiceos:stop_dictation.intent ovos-skill-dictation.openvoiceos:start_dictation.intent
what is the min temperature sunday night ovos-skill-weather.openvoiceos:low_temperature.intent ovos-skill-weather.openvoiceos:high_temperature.intent
how's the weather going to be sunday ovos-skill-weather.openvoiceos:daily_forecast.intent ovos-skill-weather.openvoiceos:hourly_forecast.intent
tell me what’s happening around the globe ovos-skill-news.openvoiceos:global_news.intent ovos-skill-date-time.openvoiceos:what.month.is.it.intent
show me the calendar date ovos-skill-date-time.openvoiceos:current_date.intent ovos-skill-weather.openvoiceos:N_days_forecast.intent
what is the current temperature outside ovos-skill-weather.openvoiceos:current_temperature.intent ovos-skill-weather.openvoiceos:high_temperature.intent
how hot will it get tomorrow ovos-skill-weather.openvoiceos:high_temperature.intent ovos-skill-weather.openvoiceos:low_temperature.intent
tell me the weather thursday evening ovos-skill-weather.openvoiceos:hourly_forecast.intent ovos-skill-weather.openvoiceos:hourly_temperature.intent

Workflow: 39825456615

@JarbasAl
JarbasAl marked this pull request as ready for review October 22, 2026 18:10
@JarbasAl
JarbasAl merged commit 0b37b34 into dev Oct 22, 2026
20 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.

2 participants