Skip to main content

GPU-accelerated Genetic Programming in Python (CUDA extension of gplearn)

Project description

Build Status Version License Documentation Status

Welcome to gplearn-CUDA!

gplearn-CUDA implements GPU-accelerated Genetic Programming in Python, with a scikit-learn inspired and compatible API.

This project is a high-performance extension of the original gplearn library developed by Trevor Stephens. It maintains all the original functionality while introducing massive parallelization via NVIDIA CUDA.

Overview

While Genetic Programming (GP) can be used to perform a very wide variety of tasks, gplearn-CUDA is purposefully constrained to solving symbolic regression problems. This is motivated by the scikit-learn ethos, of having powerful estimators that are straight-forward to implement.

Symbolic regression is a machine learning technique that aims to identify an underlying mathematical expression that best describes a relationship.

CUDA Acceleration

The core contribution of gplearn-CUDA is high-performance GPU acceleration via NVIDIA CUDA. By setting device='cuda', the library utilizes a custom virtual machine interpreter on the GPU to achieve 2x–4x speedups on massive datasets and large populations.

from gplearn.genetic import SymbolicRegressor
# Enable CUDA acceleration
est = SymbolicRegressor(device='cuda', population_size=5000)
est.fit(X, y)

Installation

gplearn-CUDA requires a recent version of scikit-learn. The CUDA acceleration is compatible with CUDA 11.2 through 13.x.

To install the GPU-enabled version via pip (targeting CUDA 12.x by default):

pip install gplearn-CUDA[cuda]

For other CUDA versions or Conda installation, please see the Installation Guide.

License & Credits

gplearn-CUDA is released under the BSD 3-Clause License, following the licensing of the original project.

  • Original Author: Trevor Stephens (@trevorstephens)

  • CUDA Extension: LGA-Personal

For the latest development version, first get the source from github:

git clone https://github.com/LGA-Personal/gplearn-CUDA.git

Then navigate into the local directory and simply run:

pip install .

If you come across any issues in running or installing the package, please submit a bug report.

Project details


Download files

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

Source Distribution

gplearn_cuda-0.4.3.tar.gz (2.2 MB view details)

Uploaded Source

Built Distribution

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

gplearn_cuda-0.4.3-py3-none-any.whl (55.5 kB view details)

Uploaded Python 3

File details

Details for the file gplearn_cuda-0.4.3.tar.gz.

File metadata

  • Download URL: gplearn_cuda-0.4.3.tar.gz
  • Upload date:
  • Size: 2.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gplearn_cuda-0.4.3.tar.gz
Algorithm Hash digest
SHA256 4a1ff79a7d861c515869b3e9f608c956b64b58431acbd4faa454a37f90342a62
MD5 c9315adbcf2f8d092188e2c9ae52d4f3
BLAKE2b-256 742dd6a3e43ccf4c73d0df7e261dc848173804164f96afb1644fbebe192ba505

See more details on using hashes here.

Provenance

The following attestation bundles were made for gplearn_cuda-0.4.3.tar.gz:

Publisher: publish.yml on LGA-Personal/gplearn-CUDA

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gplearn_cuda-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: gplearn_cuda-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 55.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gplearn_cuda-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ffb74d58d1c180afd7f6ec663b70fe72e1e7b9ed4871385f961547bd39c20805
MD5 978ddcf187dcc486198224901b754366
BLAKE2b-256 d329bf7d8d9eb5610133bce7c1618f140bb676d369d32d88da0901ced0ec4190

See more details on using hashes here.

Provenance

The following attestation bundles were made for gplearn_cuda-0.4.3-py3-none-any.whl:

Publisher: publish.yml on LGA-Personal/gplearn-CUDA

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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