Merged
Conversation
…nable named class predictions
Closed
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds comprehensive machine learning capabilities to the node-based flow system by implementing various ML algorithms and data processing utilities based on the Linfa crate. The changes restructure the AI module organization and add support for clustering, classification, regression, and model persistence operations.
Key changes include:
- Reorganization of ONNX-related modules from
ai::ml::onnxtoai::onnx - Addition of traditional ML algorithms including KMeans clustering, SVM classification, and linear regression
- Implementation of model save/load functionality for ML model persistence
- Centralized utility functions for pin management and data transformation
Reviewed Changes
Copilot reviewed 24 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/src/flow/node.rs | Adds utility functions for pin removal operations |
| packages/catalog/src/ai/onnx/*.rs | Updates import paths following module reorganization |
| packages/catalog/src/ai/ml.rs | Complete rewrite adding ML model types, data utilities, and node registration |
| packages/catalog/src/ai/ml/*.rs | New ML algorithm implementations (clustering, classification, regression) |
| packages/catalog/src/ai.rs | Updates module organization and registration logic |
| packages/catalog/Cargo.toml | Adds dependencies for Linfa ML algorithms |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8 tasks
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.
Introducing Machine Learning Nodes
This PR implements #213 adding a core set of advanced machine learning nodes and related utilities:
vectorcolumn, supervised algorithms for classification and regression a additionally require atargetcolumn for fittingUse Cases
Apart from typical machine learning cases on tabular data we can use the multi-modal Embedding Models available in the Model Catalog as powerful feature extractors for our images, documents, emails, etc. Fused with conventional machine learning algorithms we can build highly reliable predictors for our input data - natively in flow like.
Training Workflow Example
A typical training workflow would look like this:

Predict Workflow Example (Offline-Predictions on Database Records)
Prediction Workflow Example (Online-Prediction In-Chat)
Here we are using a previously trained classifier to predict the class for all images attached by the user:

Prompts to the Linfa Crate providing unified apis for machine learning models and dataset transforms! I'd like also stress this PR to upgrade to latest
ndarrayversion: rust-ml/linfa#371