Skip to main content

Automatic SageMaker Pipeline Generation from DAG Specifications

Project description

Cursus: Automatic SageMaker Pipeline Generation

PyPI version Python 3.8+ License: MIT

Transform pipeline graphs into production-ready SageMaker pipelines automatically.

Cursus is an intelligent pipeline generation system that automatically creates complete SageMaker pipelines from user-provided pipeline graphs. Simply define your ML workflow as a graph structure, and Cursus handles all the complex SageMaker implementation details, dependency resolution, and configuration management automatically.

🚀 Quick Start

Installation

# Core installation
pip install cursus

# With ML frameworks
pip install cursus[pytorch,xgboost]

# Full installation with all features
pip install cursus[all]

30-Second Example

import cursus
from cursus.core.dag import PipelineDAG

# Create a simple DAG
dag = PipelineDAG(name="fraud-detection")
dag.add_node("data_loading", "CRADLE_DATA_LOADING")
dag.add_node("preprocessing", "TABULAR_PREPROCESSING") 
dag.add_node("training", "XGBOOST_TRAINING")
dag.add_edge("data_loading", "preprocessing")
dag.add_edge("preprocessing", "training")

# Compile to SageMaker pipeline automatically
pipeline = cursus.compile_dag(dag)
pipeline.start()  # Deploy and run!

Command Line Interface

# Generate a new project
cursus init --template xgboost --name fraud-detection

# Validate your DAG
cursus validate my_dag.py

# Compile to SageMaker pipeline
cursus compile my_dag.py --name my-pipeline --output pipeline.json

✨ Key Features

🎯 Graph-to-Pipeline Automation

  • Input: Simple pipeline graph with step types and connections
  • Output: Complete SageMaker pipeline with all dependencies resolved
  • Magic: Intelligent analysis of graph structure with automatic step builder selection

10x Faster Development

  • Before: 2-4 weeks of manual SageMaker configuration
  • After: 10-30 minutes from graph to working pipeline
  • Result: 95% reduction in development time

🧠 Intelligent Dependency Resolution

  • Automatic step connections and data flow
  • Smart configuration matching and validation
  • Type-safe specifications with compile-time checks
  • Semantic compatibility analysis

🛡️ Production Ready

  • Built-in quality gates and validation
  • Enterprise governance and compliance
  • Comprehensive error handling and debugging
  • 98% complete with 1,650+ lines of complex code eliminated

📊 Proven Results

Based on production deployments across enterprise environments:

Component Code Reduction Lines Eliminated Key Benefit
Processing Steps 60% 400+ lines Automatic input/output resolution
Training Steps 60% 300+ lines Intelligent hyperparameter handling
Model Steps 47% 380+ lines Streamlined model creation
Registration Steps 66% 330+ lines Simplified deployment workflows
Overall System ~55% 1,650+ lines Intelligent automation

🏗️ Architecture

Cursus follows a sophisticated layered architecture:

  • 🎯 User Interface: Fluent API and Pipeline DAG for intuitive construction
  • 🧠 Intelligence Layer: Smart proxies with automatic dependency resolution
  • 🏗️ Orchestration: Pipeline assembler and compiler for DAG-to-template conversion
  • 📚 Registry Management: Multi-context coordination with lifecycle management
  • 🔗 Dependency Resolution: Intelligent matching with semantic compatibility
  • 📋 Specification Layer: Comprehensive step definitions with quality gates

📚 Usage Examples

Basic Pipeline

from cursus import PipelineDAGCompiler
from cursus.core.dag import PipelineDAG

# Create DAG
dag = PipelineDAG()
dag.add_node("load_data", "DATA_LOADING_SPEC")
dag.add_node("train_model", "XGBOOST_TRAINING_SPEC")
dag.add_edge("load_data", "train_model")

# Compile with configuration
compiler = PipelineDAGCompiler(config_path="config.yaml")
pipeline = compiler.compile(dag, pipeline_name="my-ml-pipeline")

Advanced Configuration

from cursus import create_pipeline_from_dag

# Create pipeline with custom settings
pipeline = create_pipeline_from_dag(
    dag=my_dag,
    pipeline_name="advanced-pipeline",
    config_path="advanced_config.yaml",
    quality_requirements={
        "min_auc": 0.88,
        "max_training_time": "4 hours"
    }
)

Fluent API (Advanced)

from cursus.utils.fluent import Pipeline

# Natural language-like construction
pipeline = (Pipeline("fraud-detection")
    .load_data("s3://fraud-data/")
    .preprocess_with_defaults()
    .train_xgboost(max_depth=6, eta=0.3)
    .evaluate_performance()
    .deploy_if_threshold_met(min_auc=0.85))

🔧 Installation Options

Core Installation

pip install cursus

Includes basic DAG compilation and SageMaker integration.

Framework-Specific

pip install cursus[pytorch]    # PyTorch Lightning models
pip install cursus[xgboost]    # XGBoost training pipelines  
pip install cursus[nlp]        # NLP models and processing
pip install cursus[processing] # Advanced data processing

Development

pip install cursus[dev]        # Development tools
pip install cursus[docs]       # Documentation tools
pip install cursus[all]        # Everything included

🎯 Who Should Use Cursus?

Data Scientists & ML Practitioners

  • Focus on model development, not infrastructure complexity
  • Rapid experimentation with 10x faster iteration
  • Business-focused interface eliminates SageMaker expertise requirements

Platform Engineers & ML Engineers

  • 60% less code to maintain and debug
  • Specification-driven architecture prevents common errors
  • Universal patterns enable faster team onboarding

Organizations

  • Accelerated innovation with faster pipeline development
  • Reduced technical debt through clean architecture
  • Built-in governance and compliance frameworks

📖 Documentation

📚 Complete Documentation Hub

Your gateway to all Cursus documentation - start here for comprehensive navigation

Core Documentation

  • Developer Guide - Comprehensive guide for developing new pipeline steps and extending Cursus
  • Design Documentation - Detailed architectural documentation and design principles
  • API Reference - Detailed API documentation including core, api, steps, and other components
  • Examples - Ready-to-use pipeline blueprints and examples

Quick Links

🤝 Contributing

We welcome contributions! See our Developer Guide for comprehensive details on:

For architectural insights and design decisions, see the Design Documentation.

📄 License

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

🔗 Links


Cursus: Making SageMaker pipeline development 10x faster through intelligent automation. 🚀

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

cursus-1.0.2.tar.gz (273.6 kB view details)

Uploaded Source

Built Distribution

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

cursus-1.0.2-py3-none-any.whl (383.7 kB view details)

Uploaded Python 3

File details

Details for the file cursus-1.0.2.tar.gz.

File metadata

  • Download URL: cursus-1.0.2.tar.gz
  • Upload date:
  • Size: 273.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for cursus-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4df24315a1028c8ec535777f9d9066558b9d25a7b269f751c72823e4325b46ac
MD5 9bd464806fbc63318549624ce3463131
BLAKE2b-256 9f8d7b5db63e96ea68ed94291146961340262053bfd8066f1868e63f28a454ec

See more details on using hashes here.

File details

Details for the file cursus-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: cursus-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 383.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for cursus-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a186de315dc21527785106192e74a833614b30995b291b868d7d0dcea5b0b2f1
MD5 11ce005418eacf888e3c8c0dac47400c
BLAKE2b-256 7a2a864267f740724d6a44fd705661b15f6b10f7c611200b1d5e760809519481

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