Skip to main content

Examples for smartpool.

Project description

SmartPool Examples

This package contains practical examples demonstrating the capabilities of SmartPool for various computational tasks.

Examples Overview

1. Prime Number Counting (count_prime)

Count the number of prime numbers below 10000 using smartpool.ProcessPool. Demonstrates basic usage of smartpool.ProcessPool.

Running the Example

python -m smartpool_examples.count_prime

2. Cross-Validation for Deep Learning models (cross_validation)

Demonstrates SmartPool's capabilities for machine learning workloads with GPU resource management.

Running the Example

# Using ProcessPool  
python -m smartpool_examples.cross_validation --pool smartpool.ProcessPool

# Using ThreadPool
python -m smartpool_examples.cross_validation --pool smartpool.ThreadPool

# Using multiprocessing.Pool
python -m smartpool_examples.cross_validation --pool multiprocessing.Pool

# Using concurrent.futures.ProcessPoolExecutor
python -m smartpool_examples.cross_validation --pool concurrent.futures.ProcessPoolExecutor

# Using concurrent.futures.ThreadPoolExecutor
python -m smartpool_examples.cross_validation --pool concurrent.futures.ThreadPoolExecutor

# Using joblib.Parallel(backend='loky')
python -m smartpool_examples.cross_validation --pool joblib.Parallel(backend='loky')

# Using joblib.Parallel(backend='threading')
python -m smartpool_examples.cross_validation --pool joblib.Parallel(backend='threading')

# Using Ray
python -m smartpool_examples.cross_validation --pool ray

What it Demonstrates

  • GPU memory management and core allocation
  • Automatic device selection (CPU vs GPU)
  • Cross-validation pipeline parallelization
  • Resource monitoring during training
  • Performance comparison with external frameworks

License

MIT License - see main smartpool repository for details

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

smartpool_examples-0.1.3.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

smartpool_examples-0.1.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file smartpool_examples-0.1.3.tar.gz.

File metadata

  • Download URL: smartpool_examples-0.1.3.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.9

File hashes

Hashes for smartpool_examples-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fd9621cd14c2bd0e9eba7d5386443781041e33590376761e29132002304420b8
MD5 7e8f53d4c49a75881c5495fae77e158f
BLAKE2b-256 bd99c039c36572c5e43021aafdd313b48e4e0906a958efcb23c8d4598454c960

See more details on using hashes here.

File details

Details for the file smartpool_examples-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for smartpool_examples-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7195f1b109191c198c42050d2a1c599319a121587ca033ff8f78120780b55663
MD5 98af128e186ccb23164542b5443066f3
BLAKE2b-256 4b04ec0a97cbb41408340b17ad32eb3e7312dd4bc4cbdc8af8fb5fd52d8fae22

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