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:

  • 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.


🔍 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.15-cp38-abi3-win_amd64.whl (195.2 kB view details)

Uploaded CPython 3.8+Windows x86-64

turbo_ml-0.1.15-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.15-cp38-abi3-macosx_11_0_arm64.whl (247.9 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: turbo_ml-0.1.15-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.15-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6fbefc10ef08333ad8988dedf177b93a975662aeb4f169eb39e0da55b11299ce
MD5 b8791474fa70547a461c6429a83529f7
BLAKE2b-256 1b34ff0e2a00afba2086ea4a89e98549d2d09291a4ed38e7e207f4b0a78d9431

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turbo_ml-0.1.15-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d9f5e0892e7484ca33242b7c783081fb05fbd75643ef55dda38ce70666392a70
MD5 49d0a4b36b1f4e2120c080f9557e1bfc
BLAKE2b-256 32a21421d473707e420bae444c8aac0a6ea2e601527582f225230f34b820a24b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for turbo_ml-0.1.15-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 043e551822f44a28382e2fe6cd1a0c134f94091fc0fc72484f83fb78c8e74ccd
MD5 6ba01084762a66ad5c8059e106729226
BLAKE2b-256 50e0c93736115a4797e3e76b7dac4cee55da07129706cba0c9a94396db2d368a

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