Repository navigation
feat: model2vec text embeddings plugin - #343
Conversation
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>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
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. Comment |
Greetings! The CI pipeline has delivered its findings. 🏗️I've aggregated the results of the automated checks for this PR below. 🏷️ Release PreviewI've checked the 'Security Updates' section. 🛡️ Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
⚖️ License CheckEnsuring 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 🚌 Bus CoverageA comprehensive review of the skill's bus-level interactions. 🚌 📋 Repo HealthYour repository is in great shape! ✅ ✅ All required files present. Latest Version: ✅ 🔌 Plugin DetectionScanning for any 'performance bottlenecks' in the plugin. 📉 Plugin Info:
OPM Detection:
Entry Point Validation:
⊘ No Issues:
🔨 Build TestsRunning the forge to see if the code tempers correctly. 🔥 ✅ All versions pass
📊 CoverageA forensic analysis of your test coverage. 🔍 ✅ 93.1% total coverage Per-file coverage (9 files)
Full report: download the Your digital assistant in the world of OVOS 🤖 |
Live fixture test
|
| 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
What changes
A new plugin in this package,
ovos-m2v-embeddings-plugin(opm.embeddings.text), turns text into vectors with a Model2Vec static model.get_embeddings_batch(texts)encodecall for all texts, one row per text in orderget_embeddings(text)model(defaultminishlab/potion-multilingual-128M, a Hub id or a local directory),normalize(defaulttrue: unit-length vectors)load_shared_model(path, "prototype"), so an intent pipeline and the embedder that load the same path hold one copyThe 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 definesget_embeddings_batchitself, 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
StaticModel.encodeplus numpy normalisationpotion-multilingual-128M, 5000 textsDuring 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:ovoscopeuntil 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