Skip to content

Commit c613fae

Browse files
committed
Restructure PUMA to match exact specification
- Move neural components to arc_solver/ root - Create complete tools/ directory with training scripts - Add comprehensive test suite (7 test modules) - Add production-ready documentation (architecture.md, contributing.md) - Add AGENTS.md with strict production guidelines - Add CI/CD workflow for automated testing - Include all ARC dataset files in data/ - Fix all import paths and dependencies - Verify layout matches specification exactly - Add shell scripts for training components - Complete benchmarking and evaluation tools Ready for ARC Prize 2025 competition!
1 parent 7668eeb commit c613fae

Some content is hidden

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

57 files changed

+3792
-521
lines changed

.DS_Store

6 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
name: PUMA CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version: [3.8, 3.9, "3.10"]
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- name: Set up Python ${{ matrix.python-version }}
20+
uses: actions/setup-python@v3
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install -r requirements.txt
28+
pip install pytest pytest-cov
29+
30+
- name: Verify layout
31+
run: |
32+
python tools/verify_layout.py
33+
34+
- name: Run tests
35+
run: |
36+
pytest tests/ -v --cov=arc_solver --cov-report=xml --cov-report=term
37+
38+
- name: Test submission schema
39+
run: |
40+
python -m pytest tests/test_submission_schema.py -v
41+
42+
- name: Test end-to-end pipeline
43+
run: |
44+
python -m pytest tests/test_solver_end2end.py -v
45+
46+
- name: Upload coverage to Codecov
47+
uses: codecov/codecov-action@v3
48+
if: matrix.python-version == '3.9'
49+
with:
50+
file: ./coverage.xml
51+
flags: unittests
52+
name: codecov-umbrella
53+
54+
performance:
55+
runs-on: ubuntu-latest
56+
needs: test
57+
58+
steps:
59+
- uses: actions/checkout@v3
60+
61+
- name: Set up Python 3.9
62+
uses: actions/setup-python@v3
63+
with:
64+
python-version: 3.9
65+
66+
- name: Install dependencies
67+
run: |
68+
python -m pip install --upgrade pip
69+
pip install -r requirements.txt
70+
71+
- name: Run performance benchmarks
72+
run: |
73+
python -c "
74+
import time
75+
from arc_solver.solver import solve_task
76+
77+
# Simple performance test
78+
task = {
79+
'train': [{
80+
'input': [[1, 0], [0, 1]],
81+
'output': [[0, 1], [1, 0]]
82+
}],
83+
'test': [{'input': [[1, 1], [0, 0]]}]
84+
}
85+
86+
start = time.time()
87+
result = solve_task(task)
88+
duration = time.time() - start
89+
90+
print(f'Solve time: {duration:.3f}s')
91+
assert duration < 30.0, 'Solver too slow'
92+
assert 'attempt_1' in result
93+
assert 'attempt_2' in result
94+
print('Performance test passed!')
95+
"
96+
97+
kaggle-compatibility:
98+
runs-on: ubuntu-latest
99+
needs: test
100+
101+
steps:
102+
- uses: actions/checkout@v3
103+
104+
- name: Set up Python 3.9
105+
uses: actions/setup-python@v3
106+
with:
107+
python-version: 3.9
108+
109+
- name: Install minimal dependencies (Kaggle-like)
110+
run: |
111+
python -m pip install --upgrade pip
112+
pip install numpy==1.21.0 # Kaggle numpy version
113+
114+
- name: Test basic import and execution
115+
run: |
116+
python -c "
117+
import sys
118+
print('Python version:', sys.version)
119+
120+
# Test imports work with minimal dependencies
121+
from arc_solver.solver import solve_task
122+
from arc_solver.grid import to_array, to_list
123+
124+
# Test basic functionality
125+
task = {
126+
'train': [{'input': [[1]], 'output': [[2]]}],
127+
'test': [{'input': [[3]]}]
128+
}
129+
130+
result = solve_task(task)
131+
print('Kaggle compatibility test passed!')
132+
print('Result structure:', list(result.keys()))
133+
"
134+
135+
- name: Test submission script
136+
run: |
137+
python -c "
138+
# Test that submission script works
139+
import os
140+
from pathlib import Path
141+
142+
# Create minimal test data
143+
test_data = {
144+
'test_task': {
145+
'train': [{'input': [[1]], 'output': [[2]]}],
146+
'test': [{'input': [[3]]}]
147+
}
148+
}
149+
150+
import json
151+
Path('data').mkdir(exist_ok=True)
152+
with open('data/arc-agi_test_challenges.json', 'w') as f:
153+
json.dump(test_data, f)
154+
155+
# Test arc_submit.py can be imported and run basic functions
156+
exec(open('arc_submit.py').read().replace('if __name__ == \"__main__\":', 'if False:'))
157+
print('Submission script compatibility test passed!')
158+
"

0 commit comments

Comments
 (0)