Skip to content

Commit b02b2b9

Browse files
committed
feat:Adds geak-openevolve for kernel-evolution ROCmBench
0 parents  commit b02b2b9

File tree

347 files changed

+68804
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

347 files changed

+68804
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
applyTo: 'scripts/**/*.js'
3+
---
4+
- In this program, a dataset with nodes and edges is visualized in different graphs and lists. These view modes are selectable in tabs.
5+
- Nodes are parametrized with meta data including program ID, island number, generation nunmber, parent ID (which is used to determine the edge connections), a metric dataset with flexible keys, a code string, a dict with prompts and more. All data except program ID are optional.
6+
- A sidebar shows detailed node information. Its format is the same across all view modes.
7+
- The sidebar in this program is designed to show up dynamically when a node is selected in one of the graphs or lists. It appears on hover of the node and hides when the node is not hovered anymore.
8+
- A single node can be selected to turn it "sticky". When a node is sticky, its information remains visible in the sidebar and the sidebar remains open until the user clicks in the background. Hovering another node will not change the sidebar content if a node is already sticky.
9+
- The selected node is highlighted with a red border and synchronized across all graphs and lists. I.e., clicking a node in a list will also highlight it in the graphs.
10+
11+
- A select box #highlight-select configures a filter logic that allows to highlight multiple nodes. Nodes are highlighted with a blue shadow in the graphs and lists.
12+
- A select box #metric-select shows the available metrics (determined dynamically from the dataset), and the selected metric may be used in the graph creation, filter and sorting logic.

.github/workflows/python-test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Python Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v4
15+
with:
16+
python-version: '3.9'
17+
18+
- name: Install dependencies
19+
run: |
20+
python -m pip install --upgrade pip
21+
pip install -e .
22+
# Install test dependencies
23+
pip install pytest numpy
24+
25+
- name: Run unit tests
26+
env:
27+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
28+
run: |
29+
python -m unittest discover -s tests -p "test_*.py" -v

.github/workflows/release.yml

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
name: Upload Python Package and Docker Image on Release
2+
on:
3+
release:
4+
types: [created]
5+
6+
jobs:
7+
pypi-publish:
8+
name: Publish release to PyPI
9+
runs-on: ubuntu-latest
10+
environment:
11+
name: pypi
12+
url: https://pypi.org/p/openevolve
13+
permissions:
14+
id-token: write
15+
steps:
16+
- uses: actions/checkout@v4
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install build
25+
- name: Build package
26+
run: |
27+
python -m build
28+
- name: Publish package distributions to PyPI
29+
uses: pypa/gh-action-pypi-publish@release/v1
30+
31+
docker-publish:
32+
name: Publish Docker image
33+
runs-on: ubuntu-22.04
34+
needs: pypi-publish
35+
permissions:
36+
contents: read
37+
packages: write
38+
steps:
39+
- uses: actions/checkout@v4
40+
41+
# Add aggressive cleanup before any Docker operations
42+
- name: Free disk space
43+
run: |
44+
# Clean Docker
45+
docker system prune -af
46+
docker image prune -af
47+
docker builder prune -af
48+
49+
df -h
50+
51+
- name: Set up QEMU
52+
uses: docker/setup-qemu-action@v3
53+
54+
- name: Set up Docker Buildx
55+
uses: docker/setup-buildx-action@v3
56+
with:
57+
driver-opts: |
58+
image=moby/buildkit:buildx-stable-1
59+
network=host
60+
buildkitd-flags: --debug
61+
62+
- name: Log in to GitHub Container Registry
63+
uses: docker/login-action@v3
64+
with:
65+
registry: ghcr.io
66+
username: ${{ github.actor }}
67+
password: ${{ secrets.GITHUB_TOKEN }}
68+
69+
# Extract metadata for Docker image
70+
- name: Extract metadata for Docker
71+
id: meta
72+
uses: docker/metadata-action@v5
73+
with:
74+
images: ghcr.io/${{ github.repository }}
75+
tags: |
76+
type=semver,pattern={{version}}
77+
type=semver,pattern={{major}}.{{minor}}
78+
type=raw,value=latest
79+
80+
# Build and push Docker image for AMD64
81+
- name: Build and push Docker image AMD64
82+
uses: docker/build-push-action@v5
83+
with:
84+
context: .
85+
file: Dockerfile
86+
push: true
87+
platforms: linux/amd64
88+
tags: ${{ steps.meta.outputs.tags }}
89+
labels: ${{ steps.meta.outputs.labels }}
90+
cache-from: type=gha,scope=openevolve-amd64
91+
cache-to: type=gha,scope=openevolve-amd64,mode=max
92+
outputs: type=registry,compression=zstd,compression-level=5
93+
94+
# Cleanup after AMD64 build
95+
- name: Cleanup after AMD64 build
96+
run: |
97+
docker system prune -af
98+
docker builder prune -af
99+
df -h
100+
101+
# Build and push Docker image for ARM64
102+
- name: Build and push Docker image ARM64
103+
uses: docker/build-push-action@v5
104+
with:
105+
context: .
106+
file: Dockerfile
107+
push: true
108+
platforms: linux/arm64
109+
tags: ${{ steps.meta.outputs.tags }}
110+
labels: ${{ steps.meta.outputs.labels }}
111+
cache-from: type=gha,scope=openevolve-arm64
112+
cache-to: type=gha,scope=openevolve-arm64,mode=max
113+
outputs: type=registry,compression=zstd,compression-level=5
114+
115+
# Final cleanup
116+
- name: Final cleanup
117+
run: |
118+
docker system prune -af
119+
docker builder prune -af
120+
find /tmp -type f -user $(id -u) -exec rm -f {} + 2>/dev/null || true
121+
df -h

.gitignore

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
results/
2+
examples/lm_eval/prompts/system_message.txt
3+
examples/lm_eval/prompts/evaluator_system_message.txt
4+
5+
# Python
6+
__pycache__/
7+
*.py[cod]
8+
*$py.class
9+
*.so
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
*.egg-info/
24+
.installed.cfg
25+
*.egg
26+
MANIFEST
27+
28+
# Virtual environments
29+
venv/
30+
env/
31+
ENV/
32+
33+
# IDE
34+
.idea/
35+
.vscode/
36+
*.swp
37+
*.swo
38+
39+
# Output files
40+
examples/*/output/
41+
openevolve_output*/
42+
*.log
43+
44+
# Test cache
45+
.pytest_cache/
46+
.coverage
47+
htmlcov/
48+
49+
# Misc
50+
.DS_Store
51+
.venv
52+
53+
# For SR
54+
secrets.yaml
55+
problems
56+
57+
rocm_evals/
58+

CONTRIBUTING.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Contributing to OpenEvolve
2+
3+
Thank you for your interest in contributing to OpenEvolve! This document provides guidelines and instructions for contributing to the project.
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork: `git clone https://github.com/codelion/openevolve.git`
9+
3. Install the package in development mode: `pip install -e .`
10+
4. Run the tests to ensure everything is working: `python -m unittest discover tests`
11+
12+
## Development Environment
13+
14+
We recommend using a virtual environment for development:
15+
16+
```bash
17+
python -m venv env
18+
source env/bin/activate # On Windows: env\Scripts\activate
19+
pip install -e ".[dev]"
20+
```
21+
22+
## Pull Request Process
23+
24+
1. Create a new branch for your feature or bugfix: `git checkout -b feat-your-feature-name`
25+
2. Make your changes
26+
3. Add tests for your changes
27+
4. Run the tests to make sure everything passes: `python -m unittest discover tests`
28+
5. Commit your changes: `git commit -m "Add your descriptive commit message"`
29+
6. Push to your fork: `git push origin feature/your-feature-name`
30+
7. Submit a pull request to the main repository
31+
32+
## Adding Examples
33+
34+
We encourage adding new examples to showcase OpenEvolve's capabilities. To add a new example:
35+
36+
1. Create a new directory in the `examples` folder
37+
2. Include all necessary files (initial program, evaluation code, etc.)
38+
3. Add a README.md explaining the example
39+
4. Make sure the example can be run with minimal setup
40+
41+
## Reporting Issues
42+
43+
When reporting issues, please include:
44+
45+
1. A clear description of the issue
46+
2. Steps to reproduce
47+
3. Expected behavior
48+
4. Actual behavior
49+
5. Environment details (OS, Python version, etc.)
50+
51+
## Feature Requests
52+
53+
Feature requests are welcome. Please provide:
54+
55+
1. A clear description of the feature
56+
2. The motivation for adding this feature
57+
3. Possible implementation ideas (if any)
58+
59+
## Code of Conduct
60+
61+
Please be respectful and considerate of others when contributing to the project. We aim to create a welcoming and inclusive environment for all contributors.

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Use an official Python image as the base
2+
FROM python:3.12-slim
3+
4+
# Set the working directory inside the container
5+
WORKDIR /app
6+
7+
# Install system dependencies
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
9+
build-essential \
10+
&& rm -rf /var/lib/apt/lists/*
11+
12+
# Copy the project files into the container
13+
COPY . /app
14+
15+
# Install Python dependencies
16+
RUN pip install --root-user-action=ignore -e .
17+
18+
# Expose the project directory as a volume
19+
VOLUME ["/app"]
20+
21+
# Set the entry point to the openevolve-run.py script
22+
ENTRYPOINT ["python", "/app/openevolve-run.py"]

0 commit comments

Comments
 (0)