EVOSEAL User Manual¶
Welcome to the EVOSEAL User Manual. This document provides comprehensive information about using EVOSEAL effectively.
Table of Contents¶
Installation¶
Prerequisites¶
- Python 3.10 or higher
- pip (Python package manager)
- Git
Installation Steps¶
-
Clone the Repository
-
Set Up Virtual Environment
-
Install Dependencies
-
Install in Development Mode
Project Structure¶
EVOSEAL follows a modular structure:
evoseal/
├── core/ # Core framework components
├── integration/ # Integration modules (DGM, OpenEvolve, SEAL (Self-Adapting Language Models))
├── models/ # Data models
├── providers/ # AI/ML model providers
├── storage/ # Data persistence
├── utils/ # Utility functions
└── examples/ # Example scripts and templates
├── basic/ # Basic usage examples
├── workflows/ # Workflow examples
└── templates/ # Project templates
Basic Usage¶
Running Examples¶
EVOSEAL provides several example scripts to help you get started:
-
Quickstart Example
-
Logging Example
-
Basic Usage Example
Using Project Templates¶
Start a new project using our template:
# Copy the template to a new directory
cp -r evoseal/examples/templates/basic my_project
cd my_project
# Install dependencies
pip install -r requirements.txt
Configuration¶
Create a .env
file in your project root with the following variables:
# Required
OPENAI_API_KEY=your_openai_api_key
ANTHROPIC_API_KEY=your_anthropic_api_key
# Optional
LOG_LEVEL=INFO
CACHE_DIR=./.cache
Configuration Files¶
EVOSEAL supports multiple configuration files for different environments:
- config/development.json
- Development settings
- config/testing.json
- Testing settings
- config/production.json
- Production settings
Basic Usage¶
Initialization¶
Running Evolution¶
# Define your task
task = "Create a Python function that implements quicksort"
# Run evolution
result = evoseal.evolve(
task=task,
max_iterations=50,
population_size=10
)
# Access results
print(f"Best solution: {result.best_solution}")
print(f"Fitness score: {result.fitness}")
print(f"Iterations completed: {result.iterations}")
Advanced Features¶
Custom Fitness Functions¶
def custom_fitness(solution):
"""Evaluate a solution based on specific criteria."""
score = 0
# Example: Reward shorter solutions
score += max(0, 10 - len(solution) / 100)
# Add your custom evaluation logic here
return score
# Initialize with custom fitness
custom_evoseal = EVOSEAL(fitness_function=custom_fitness)
Model Selection¶
from evoseal.models import OpenAIModel, AnthropicModel
# Use specific models
gpt4 = OpenAIModel(model="gpt-4")
claude = AnthropicModel(model="claude-3-opus")
# Initialize with custom model
evoseal = EVOSEAL(model=gpt4)
Checkpointing¶
# Save checkpoint
evoseal.save_checkpoint("checkpoint.pkl")
# Load checkpoint
evoseal.load_checkpoint("checkpoint.pkl")
Troubleshooting¶
Common Issues¶
- API Key Errors
- Ensure your API keys are set in the
.env
file -
Verify the keys have the correct permissions
-
Installation Issues
- Make sure you're using Python 3.10 or higher
-
Try recreating your virtual environment
-
Performance Problems
- Reduce population size or number of iterations
- Use smaller models for faster iteration
Frequently Asked Questions¶
How do I improve evolution results?¶
- Provide clear, specific tasks
- Experiment with different population sizes
- Adjust the number of iterations
- Fine-tune the fitness function
Can I use my own models?¶
Yes! EVOSEAL supports custom model implementations. See the API reference for details.
How do I contribute?¶
Please see our Contribution Guidelines.
Support¶
For additional help, please open an issue on GitHub.
Created: 2025-06-17