Skip to content

feat: m2v pipeline #681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

feat: m2v pipeline #681

wants to merge 3 commits into from

Conversation

JarbasAl
Copy link
Member

@JarbasAl JarbasAl commented May 8, 2025

https://github.com/TigreGotico/ovos-m2v-pipeline

 "intents": {
    "ovos-m2v-pipeline": {
      "model": "Jarbas/ovos-model2vec-intents-labse",
      "min_conf": 0.5,
      "ignore_intents": []
    },
    "pipeline": [
      "padatious_high",
      "...",
      "ovos-m2v-pipeline",
      "...",
      "fallback_low"
    ]
  }

Summary by CodeRabbit

  • New Features
    • Added support for the Model2Vec intent pipeline, allowing users to leverage an additional intent matching method if the plugin is installed.
  • Chores
    • Updated plugin requirements to include Model2Vec and Ollama intent pipeline plugins.

Copy link

coderabbitai bot commented May 8, 2025

Walkthrough

The IntentService class was updated to optionally support a new Model2VecIntentPipeline intent matcher, alongside existing pipelines. Conditional imports, initialization, and pipeline registration were added. Two new plugin dependencies were also introduced in the requirements file to support these changes.

Changes

File(s) Change Summary
ovos_core/intent_services/init.py Extended IntentService to conditionally support Model2VecIntentPipeline: import, attribute, loading, and matcher.
requirements/plugins.txt Added new dependencies: ovos-m2v-pipeline and ovos-ollama-intent-pipeline-plugin.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant IntentService
    participant Model2VecIntentPipeline

    User->>IntentService: Initialize with config
    IntentService->>IntentService: _load_pipeline_plugins()
    alt Model2VecIntentPipeline available
        IntentService->>Model2VecIntentPipeline: Instantiate
        Model2VecIntentPipeline-->>IntentService: Instance assigned to _m2v
    end
    User->>IntentService: get_pipeline(session)
    IntentService->>IntentService: Add matchers (including _m2v.match_high if present)
    IntentService-->>User: Return pipeline matchers
Loading

Possibly related PRs

  • OpenVoiceOS/ovos-core#678: Adds support for ovos-ollama-intent-pipeline in IntentService, modifying similar areas for plugin integration.
  • OpenVoiceOS/ovos-core#648: Integrates PersonaService as a new intent pipeline, extending IntentService with additional matcher logic.

Suggested reviewers

  • goldyfruit

Poem

In the meadow where plugins grow,
A Model2Vec breeze begins to blow.
Pipelines gather, matchers align—
IntentService hops in, feeling just fine!
New dependencies sprout,
As rabbits leap about,
Hooray for intent, both old and new in line! 🐇✨

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f239c7 and c10f21d.

📒 Files selected for processing (1)
  • ovos_core/intent_services/__init__.py (7 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • ovos_core/intent_services/init.py
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: unit_tests (3.11)
  • GitHub Check: end2end_tests (3.11)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added feature and removed feature labels May 8, 2025
coderabbitai bot added a commit that referenced this pull request May 8, 2025
Docstrings generation was requested by @JarbasAl.

* #681 (comment)

The following files were modified:

* `ovos_core/intent_services/__init__.py`
Copy link

coderabbitai bot commented May 8, 2025

Note

Generated docstrings for this pull request at #682

Docstrings generation was requested by @JarbasAl.

* #681 (comment)

The following files were modified:

* `ovos_core/intent_services/__init__.py`

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@github-actions github-actions bot added feature and removed feature labels May 8, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
ovos_core/intent_services/__init__.py (1)

43-44: Consider removing TODO comment

This TODO comment refers to a previous PR (#570) and may not be relevant to the current changes. Consider removing it or updating it to reflect the current status.

-# TODO - to be dropped once pluginified
-# just a placeholder during alphas until https://github.com/OpenVoiceOS/ovos-core/pull/570
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4fe01a2 and 3f239c7.

📒 Files selected for processing (2)
  • ovos_core/intent_services/__init__.py (7 hunks)
  • requirements/plugins.txt (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: license_tests
  • GitHub Check: end2end_tests (3.11)
🔇 Additional comments (7)
requirements/plugins.txt (1)

8-9: New dependencies added for Model2Vec and Ollama intent pipelines

These new dependencies enable the integration of Model2Vec and Ollama intent processing pipelines into the core system. The version constraints appropriately allow minor updates while preventing major version changes that might introduce breaking changes.

ovos_core/intent_services/__init__.py (6)

49-52: Conditional import for Model2VecIntentPipeline

This gracefully handles the Model2Vec pipeline as an optional dependency, following the same pattern as the existing LLMIntentPipeline.


87-87: Initialize _m2v attribute

The new _m2v attribute is properly initialized to None, consistent with the initialization pattern used for other pipeline components.


151-152: Conditional loading of Model2VecIntentPipeline

The Model2Vec pipeline is properly initialized with the appropriate bus and configuration parameters, following the established pattern for other pipeline components.


267-268: Register Model2Vec matcher in pipeline

The high-priority matcher function from the Model2Vec pipeline is correctly added to the dictionary of available matchers, making it available for the intent matching pipeline.


64-70: Updated docstring to include Model2Vec pipeline

The docstring has been appropriately updated to include the Model2Vec pipeline in the list of supported intent matching pipelines.


117-119: Updated docstring for _load_pipeline_plugins

The docstring has been properly updated to include the Model2Vec pipeline in the list of supported pipelines.

Copy link

codecov bot commented May 8, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 69.74%. Comparing base (23f0bab) to head (c10f21d).
Report is 246 commits behind head on dev.

Files with missing lines Patch % Lines
ovos_core/intent_services/__init__.py 75.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #681      +/-   ##
==========================================
- Coverage   75.33%   69.74%   -5.60%     
==========================================
  Files          15       15              
  Lines        3094     1699    -1395     
==========================================
- Hits         2331     1185    -1146     
+ Misses        763      514     -249     
Flag Coverage Δ
end2end 54.09% <75.00%> (?)
unittests 46.43% <75.00%> (-28.91%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

1 participant