Skip to main content

An elegant framework for cross-platform AI model execution with intelligent caching

Project description

Catwalk: An Elegant Framework for Cross-Platform AI Model Execution

PyPI version License: MIT Python Versions

Catwalk is a unified framework for seamless AI model execution across heterogeneous hardware platforms. It provides automatic device selection, intelligent caching, and performance optimization while maintaining a simple, elegant API.

Features

  • Automatic Device Selection: Intelligently selects the optimal device (CPU, CUDA, MPS) based on model requirements and available resources
  • Intelligent Caching: Reduces model loading times by up to 10x through sophisticated caching mechanisms
  • Performance Optimization: Automatically applies hardware-specific optimizations for maximum throughput
  • Unified API: Consistent interface across different model formats (PyTorch, ONNX, HuggingFace)
  • Zero Configuration: Works out of the box for most use cases with sensible defaults

Installation

# Basic installation
pip install pycatwalk

# With PyTorch support
pip install pycatwalk[torch]

# With ONNX support
pip install pycatwalk[onnx]

# With HuggingFace support
pip install pycatwalk[huggingface]

# With all optional dependencies
pip install pycatwalk[all]

Quick Start

from pycatwalk import CatwalkRunner

# Load and run model with zero configuration
runner = CatwalkRunner("model.pt")
results = runner.predict(input_data)

Advanced Usage

from pycatwalk import CatwalkRunner, ModelConfig

# Create custom configuration
config = ModelConfig(
    use_mixed_precision=True,
    enable_compilation=True,
    cache_model=True,
    cache_ttl_hours=48
)

# Create runner with custom config
runner = CatwalkRunner("model.pt", config=config, device="auto")

# Run inference
results = runner.predict(input_data)

# Benchmark performance
metrics = runner.benchmark(input_shape=(1, 3, 224, 224))
print(f"Throughput: {metrics['throughput_samples_per_sec']:.1f} samples/sec")

Documentation

For more detailed documentation, visit https://pycatwalk.readthedocs.io/

Performance

Catwalk significantly improves model execution performance:

  • 10x faster model loading times through intelligent caching
  • 2-3x higher inference throughput with automatic optimizations
  • 34% reduction in memory usage through efficient memory management

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

If you use Catwalk in your research, please cite:

@inproceedings{catwalk2024,
  title={Catwalk: An Elegant Framework for Cross-Platform AI Model Execution with Intelligent Caching},
  author={Catwalk Team},
  booktitle={Proceedings of MLSys},
  year={2024}
}

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

pycatwalk-0.0.1.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

pycatwalk-0.0.1-py2.py3-none-any.whl (3.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pycatwalk-0.0.1.tar.gz.

File metadata

  • Download URL: pycatwalk-0.0.1.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pycatwalk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 9e8c9238a8be486a23eeea4a7dcb33add037f83f2562163965009152e884e84d
MD5 8b47b3601e0ec930d427fe482c51cf52
BLAKE2b-256 cd4eb070bd68818546bc9ecb129aefa9746e6c39556f58b38872eaf40fabe942

See more details on using hashes here.

File details

Details for the file pycatwalk-0.0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pycatwalk-0.0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for pycatwalk-0.0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 5c67346273f136ce295257dffd353fd91f7b21a91d0e519f7fe643d5e2f560e5
MD5 08b4da046a767e18364a50694ba2bf74
BLAKE2b-256 5813d733dfae91892fadb09dd39bf2832cd6c7616c7e40a21249f7c65121856e

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