Skip to main content

High-performance ML primitives powered by Rust

Project description

turbo_ml 🚀

turbo_ml is an experimental high-performance Python library backed by Rust, designed to accelerate selected numerical and ML-related operations compared to pure Python implementations.

⚠️ Important: This project is currently under active development.
It is not guaranteed to work for every Python use case or environment.


📌 Project Status (Read This First)

  • 🧪 Development stage: Early / Experimental
  • ⚡ Focus: Performance-critical operations
  • 🔧 Backend: Rust (via PyO3)
  • 🛑 Not a drop-in replacement for all ML libraries

If you are looking for a fully mature ML framework, this may not yet be suitable for production use.


✅ Supported Python Versions (Guaranteed)

Fully supported and tested:

  • Python 3.8
  • Python 3.9
  • Python 3.10
  • Python 3.11
  • Python 3.12

✅ If py --list shows Python 3.12, installation is guaranteed to work.

Not supported yet( Force Install is Supported ):

  • Python 3.13
  • Python 3.14+

This limitation exists due to upstream Rust–Python bindings (PyO3).
Support will be added once upstream compatibility is stable.


📦 Installation

Standard Installation (Recommended)

pip install turbo_ml

If you are using Windows, Linux, or macOS with Python 3.8–3.12, this will install a prebuilt binary wheel.
You do NOT need Rust or a C/C++ compiler.


Special Installation ( If facing any error to install )

export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
pip install turbo-ml

If you are using Windows, Linux, or macOS with Python 3.13 & 3.14.


🔍 Verifying Installation

After installation, verify with:

python -c "import turbo_ml; print('turbo_ml installed successfully')"

If no error appears, installation is complete.


▶️ How to Run the Example Scripts

This repository includes two test files to compare performance.

1️⃣ base_python_test.py

A normal Python script without any acceleration.

Run:

python base_python_test.py

Purpose:

  • Acts as a baseline
  • Uses standard Python logic
  • Slower execution for heavy computation

2️⃣ turbo_test.py

Uses the turbo_ml library.

Run:

python turbo_test.py

Purpose:

  • Imports turbo_ml
  • Executes the same logic using Rust-accelerated functions
  • Expected to run faster for supported operations

⚠️ Common Errors and How to Fix Them

❌ Error: Python version not supported

Error message example:

ERROR: turbo_ml requires Python < 3.13

Cause:
You are using Python 3.13 or newer.

Fix:

  1. Install Python 3.12
  2. Create a virtual environment using it:
    py -3.12 -m venv venv
    
  3. Activate the environment and reinstall:
    pip install turbo_ml
    

❌ Error: pip tries to build from source (Rust / MSVC errors)

Cause:

  • Unsupported Python version
  • pip cache using an old build
  • Wheel not selected

Fix:

pip uninstall turbo_ml -y
pip cache purge
pip install turbo_ml --no-cache-dir

If it still tries to compile, check:

python --version

Ensure it is ≤ 3.12.


❌ Error: ModuleNotFoundError: turbo_ml

Cause:

  • Installed in a different Python environment
  • Virtual environment not activated

Fix:

which python
pip show turbo_ml

Ensure both point to the same environment.


🧪 Experimental Nature (Caution)

  • This library does not accelerate arbitrary Python code
  • Only specific operations are optimized
  • Performance gains depend on:
    • Data size
    • Operation type
    • System architecture

You may observe:

  • No speedup for small inputs
  • Different behavior compared to pure Python
  • Missing features (for now)

This is expected during early development.


🛠 Development Disclaimer

  • APIs may change without notice
  • Performance claims may evolve
  • Backward compatibility is not guaranteed yet

If something breaks, it is likely a known limitation, not a user mistake.


📬 Feedback & Contributions

This project is actively evolving.

  • Bug reports are welcome
  • Performance benchmarks are appreciated
  • Contributions should focus on measurable speedups

Repository: https://github.com/Dhakshin2007/turbo_ml


🧠 Final Note

turbo_ml is an exploration of what’s possible when Python and Rust work together.

Use it to:

  • Learn
  • Experiment
  • Benchmark
  • Push performance boundaries

Not (yet) to:

  • Replace full ML frameworks
  • Assume universal compatibility

Thank you for testing an early-stage project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

turbo_ml-0.1.17-cp38-abi3-win_amd64.whl (195.2 kB view details)

Uploaded CPython 3.8+Windows x86-64

turbo_ml-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (280.3 kB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

turbo_ml-0.1.17-cp38-abi3-macosx_11_0_arm64.whl (248.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

Details for the file turbo_ml-0.1.17-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: turbo_ml-0.1.17-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 195.2 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.2

File hashes

Hashes for turbo_ml-0.1.17-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 735e2560a64f23da180a82ca86355c6e6a670929fc0c0b8f9a8b83dc4c8da167
MD5 562f49873aac79f5144ad729223e319c
BLAKE2b-256 071cb697f928da53162d2c5e1e16f18f4fb4ba98f0e25a9ce6996672a6ee81f6

See more details on using hashes here.

File details

Details for the file turbo_ml-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for turbo_ml-0.1.17-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dac257cd587a8f805b0eb226a06f45563796b25e2da6d81380ef8559d5039680
MD5 56e56e1f083faf4f675f6343770aff48
BLAKE2b-256 2a4c9f633ab4d148dffcae953eb66e957df8acebda3031d881df5685c0f2265f

See more details on using hashes here.

File details

Details for the file turbo_ml-0.1.17-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for turbo_ml-0.1.17-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e05b4fe7d50f60204b0d1ec20c7cb9d4d64eaf572c31588adae143363116c112
MD5 d80d94d15fd6740f4c09cf97ded8dc95
BLAKE2b-256 ed79224e6a95254f44f624ca056079ad0a60a2cf2f3adf6405591253d5c5ebf4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page