Skip to content

feat(classification): add parallelized random forest inference#70

Merged
BnJam merged 2 commits into
mainfrom
feat/random-forest-inference-1125809497971631890
Dec 14, 2025
Merged

feat(classification): add parallelized random forest inference#70
BnJam merged 2 commits into
mainfrom
feat/random-forest-inference-1125809497971631890

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

This feature adds a new, highly-parallelized random forest prediction function to the eo-processor library. The core logic is implemented in Rust for high performance and is exposed to Python for ease of use. The implementation is designed to be safe and robust, with support for non-contiguous NumPy arrays and improved edge-case handling.

The new functionality includes:

  • A Rust-based prediction engine that uses rayon for parallelization.
  • A utility function to convert scikit-learn RandomForestClassifier models to a JSON format that can be used by the Rust engine.
  • A complete workflow example that demonstrates how to train a model, serialize it, and use the high-performance Rust inference engine.
  • Comprehensive tests that compare the output of the Rust implementation with scikit-learn to ensure correctness.

PR created automatically by Jules for task 1125809497971631890 started by @BnJam

Implements a new, highly-parallelized random forest prediction function in Rust, exposed to Python.

Key features:
- Rust-based prediction engine using `rayon` for parallelization.
- Handles non-contiguous NumPy arrays safely.
- Includes a utility to convert scikit-learn models to a JSON format for use with the Rust engine.
- Provides a complete workflow example from training to prediction.
- Adds comprehensive tests to ensure correctness.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

Implements a new, highly-parallelized random forest prediction function in Rust, exposed to Python.

Key features:
- Rust-based prediction engine using `rayon` for parallelization.
- Handles non-contiguous NumPy arrays safely.
- Includes a utility to convert scikit-learn models to a JSON format for use with the Rust engine.
- Provides a complete workflow example from training to prediction.
- Adds comprehensive tests to ensure correctness.
@BnJam BnJam added the bump:minor v0.1.0 --> v0.2.0 label Dec 14, 2025
@BnJam BnJam marked this pull request as ready for review December 14, 2025 17:57
@BnJam BnJam merged commit 274d209 into main Dec 14, 2025
5 checks passed
@BnJam BnJam deleted the feat/random-forest-inference-1125809497971631890 branch December 14, 2025 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump:minor v0.1.0 --> v0.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant