Skip to main content

Chisel CLI

Accelerate your Python functions with cloud GPUs using a simple decorator.

Quick Start

1. Install Chisel CLI:

pip install chisel-cli

2. Create your script:

from chisel import capture_trace

@capture_trace(trace_name="matrix_ops")
def matrix_multiply(size=1000):
    import torch
    device = "cuda" if torch.cuda.is_available() else "cpu"
    
    a = torch.randn(size, size, device=device)
    b = torch.randn(size, size, device=device)
    result = torch.mm(a, b)
    
    return result.cpu().numpy()

if __name__ == "__main__":
    result = matrix_multiply(2000)
    print(f"Result shape: {result.shape}")

3. Run on cloud GPU:

# Local execution
python my_script.py

# Cloud GPU execution
chisel python my_script.py

4. Interactive setup:

  • Chisel CLI prompts for app name, upload directory, requirements file, and GPU configuration
  • First-time authentication opens browser automatically
  • Real-time job status and output streaming

Features

  • Simple decorator: Just add @capture_trace() to your functions
  • Local & cloud: Same code runs locally or on cloud GPUs
  • Interactive CLI: Guided setup for job configuration
  • Real-time streaming: Live output and job status
  • GPU profiling: Automatic performance traces and memory analysis
  • Multi-GPU support: Scale from 1 to 8x A100-80GB GPUs

Usage

Basic Example

from chisel import capture_trace

@capture_trace(trace_name="my_function")
def my_gpu_function():
    import torch
    device = "cuda" if torch.cuda.is_available() else "cpu"
    return torch.randn(1000, 1000, device=device)

# Runs locally with: python script.py
# Runs on GPU with: chisel python script.py

Multiple Functions

@capture_trace(trace_name="preprocess")
def preprocess(data): 
    # Data preprocessing
    pass

@capture_trace(trace_name="train")  
def train(data): 
    # Model training
    pass

@capture_trace(trace_name="evaluate")
def evaluate(data): 
    # Model evaluation
    pass

Command Line Arguments

# Pass arguments to your script
chisel python train.py --epochs 100 --batch-size 32

# Or configure the job directly
chisel python train.py --app-name "training-job" --gpu 4

GPU Options

When prompted by the CLI, choose from:

Option GPU Configuration Memory Use Case
1 1x A100-80GB 80GB Development, inference
2 2x A100-80GB 160GB Medium training
4 4x A100-80GB 320GB Large models
8 8x A100-80GB 640GB Massive models

Documentation

Examples

See the examples directory for working code:

Authentication

Chisel CLI handles authentication automatically:

# First time: Browser opens for authentication
chisel python my_script.py

# Logout to clear credentials
chisel --logout

Credentials are stored securely in ~/.chisel/credentials.json.

Development

# Clone repository
git clone https://github.com/Herdora/chisel.git
cd chisel

# Install in development mode
pip install -e .

# Run tests
pytest

# Check code style
ruff check src/ examples/

Contributing

We welcome contributions! Please see Development Guide for details.

Support

License

MIT License - see LICENSE for details.

Metadata

Release files for chisel-cli 0.1.33

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chisel-cli 0.1.33
File Size Uploaded Provenance Actions
chisel_cli-0.1.33.tar.gz 18.5 kB Without provenance Details for chisel_cli-0.1.33.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chisel-cli 0.1.33
File Interpreter ABI Platform Actions
chisel_cli-0.1.33-py3-none-any.whl Python 3 none any Details for chisel_cli-0.1.33-py3-none-any.whl

Total release size: 37.1 kB

Release files / chisel_cli-0.1.33.tar.gz

Download URL chisel_cli-0.1.33.tar.gz
Size 18.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3d1958107ff6cde85e8b305e10b600e2e9ca52c0b469a6af0961afa9124318ce
BLAKE2b-256 checksum
How to use checksums
9074b09ba892183e95d54acaaf8d5ed10c9adb38d9e219048a6a63e6366196af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Release files / chisel_cli-0.1.33-py3-none-any.whl

Download URL chisel_cli-0.1.33-py3-none-any.whl
Size 18.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a97115d812eba7ecbe02fbd1a42800745f7992f419ca631b8ca1e52c6097211a
BLAKE2b-256 checksum
How to use checksums
3963925ac5f6adb20a0b6be33fef6789491b27cd28d011f8d426d5aced5d5c0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.11

Security for chisel-cli 0.1.33

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.33 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page