Skip to content

Repo containing resources/instructions/AGENTS.md for coding to take a script dropped into this repo and 'rayify' them into scripts ready to run on a ray compute cluster, referencing these design patterns: https://docs.ray.io/en/latest/ray-core/patterns/index.html

Notifications You must be signed in to change notification settings

BasicOverflow/rayify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rayify

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.

Overview

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

Project Structure

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

How to Use

  1. Place your script in the input/ folder
  2. Use AGENTS.md as a reference guide for conversion
  3. Generate the rayified version in the output/ folder
  4. Set environment variables before running:
    export RAY_ADDRESS="ray://your-cluster:10001"
    export RAY_NAMESPACE="production"  # Required

Key Features

  • Cluster-First Approach: All conversions assume connecting to an existing Ray cluster
  • Environment Variable Configuration: Minimal setup using RAY_ADDRESS and RAY_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

Workflow

  1. Input: Drop your original Python script into input/
  2. Conversion: Use AGENTS.md to guide the conversion process
  3. Output: The rayified script goes into output/
  4. Execution: Run the output script with RAY_ADDRESS and RAY_NAMESPACE set

See AGENTS.md for complete environment variable reference.

Resources

  • 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.

About

Repo containing resources/instructions/AGENTS.md for coding to take a script dropped into this repo and 'rayify' them into scripts ready to run on a ray compute cluster, referencing these design patterns: https://docs.ray.io/en/latest/ray-core/patterns/index.html

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages