A repository for converting Python scripts into Ray-optimized, cluster-ready code. This project provides comprehensive resources and guidance for coding agents to transform standard Python scripts into distributed Ray applications that run on remote Ray clusters.
This repository contains:
- AGENTS.md: Comprehensive guide for coding agents to convert scripts to Ray
- resources/: Complete Ray documentation organized by topic
- input/: Drop your original Python scripts here
- output/: Rayified versions of your scripts will be placed here
rayify/
├── input/ # Place your original Python scripts here
├── output/ # Rayified scripts will be generated here
├── resources/ # Ray documentation and examples
│ ├── ray-core/ # Core Ray concepts (tasks, actors, objects)
│ ├── data/ # Ray Data for batch processing
│ ├── train/ # Ray Train for distributed training
│ ├── tune/ # Ray Tune for hyperparameter tuning
│ ├── serve/ # Ray Serve for model serving
│ └── cluster/ # Cluster deployment guides
├── .env.example # Example environment variables file
├── .env # Your local environment variables (gitignored)
├── AGENTS.md # Main conversion guide for coding agents
└── README.md # This file
- Place your script in the
input/folder - Use AGENTS.md as a reference guide for conversion
- Generate the rayified version in the
output/folder - Set environment variables before running:
export RAY_ADDRESS="ray://your-cluster:10001" export RAY_NAMESPACE="production" # Required
- Cluster-First Approach: All conversions assume connecting to an existing Ray cluster
- Environment Variable Configuration: Minimal setup using
RAY_ADDRESSandRAY_NAMESPACE(required) - Comprehensive Patterns: Design patterns and anti-patterns for optimal performance
- Use Case Examples: Reference sections for data processing, training, tuning, serving, and more
- Complete Documentation: Full Ray API references and examples
- Input: Drop your original Python script into
input/ - Conversion: Use AGENTS.md to guide the conversion process
- Output: The rayified script goes into
output/ - Execution: Run the output script with
RAY_ADDRESSandRAY_NAMESPACEset
See AGENTS.md for complete environment variable reference.
- AGENTS.md: Main conversion guide with step-by-step instructions
- resources/: Comprehensive Ray documentation
- Core concepts: tasks, actors, objects, scheduling
- Design patterns and anti-patterns
- API references
- Examples for all Ray libraries
Note: This repository is designed to guide coding agents in performing conversions, not to automate the conversion process. The conversion is a manual process guided by the comprehensive resources and instructions provided.