Compare commits
35 Commits
5d1988b513
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ec5c77db4 | ||
| cd7f66f20a | |||
| eaa5f3b0c0 | |||
|
|
f85dc047e8 | ||
| 54fec18afb | |||
|
|
9e07ef8679 | ||
| 6c2ddb6494 | |||
| 5802d45a7f | |||
| 9d86bb203e | |||
|
|
c2ebcc3169 | ||
| e7e4266f3d | |||
|
|
0825578778 | ||
|
|
8e521b4519 | ||
|
|
bfb787157c | ||
|
|
e0468cd3c1 | ||
|
|
64b1e24467 | ||
|
|
d20b38e760 | ||
| 318a1c17da | |||
|
|
adaa0f9a69 | ||
|
|
9dad25e947 | ||
|
|
b4b8724ff1 | ||
| 3f5f7905b5 | |||
|
|
92ae57751f | ||
|
|
533ca91774 | ||
|
|
98051ba0c9 | ||
|
|
c728bd93f7 | ||
|
|
bbbc5e0137 | ||
|
|
40cda51142 | ||
|
|
e45207b7cc | ||
|
|
537d8c7689 | ||
| 93bda28f67 | |||
| 239e45c7f9 | |||
| 118474f892 | |||
| e8143cf64c | |||
| 9f53fdb154 |
@@ -1,65 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install ruff mypy
|
||||
pip install -e ".[dev]" || pip install ruff mypy numpy
|
||||
|
||||
- name: Ruff check
|
||||
run: ruff check solver/ freecad/ tests/ scripts/
|
||||
|
||||
- name: Ruff format check
|
||||
run: ruff format --check solver/ freecad/ tests/ scripts/
|
||||
|
||||
type-check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install mypy numpy
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch-geometric
|
||||
pip install -e ".[dev]"
|
||||
|
||||
- name: Mypy
|
||||
run: mypy solver/ freecad/
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install torch --index-url https://download.pytorch.org/whl/cpu
|
||||
pip install torch-geometric
|
||||
pip install -e ".[train,dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: pytest tests/ freecad/tests/ -v --tb=short
|
||||
7
.mailmap
Normal file
7
.mailmap
Normal file
@@ -0,0 +1,7 @@
|
||||
forbes <contact@kindred-systems.com> forbes <joseph.forbes@kindred-systems.com>
|
||||
forbes <contact@kindred-systems.com> forbes <zoe.forbes@kindred-systems.com>
|
||||
forbes <contact@kindred-systems.com> forbes-0023 <joseph.forbes@kindred-systems.com>
|
||||
forbes <contact@kindred-systems.com> forbes-0023 <zoe.forbes@kindred-systems.com>
|
||||
forbes <contact@kindred-systems.com> josephforbes23 <joseph.forbes@kindred-systems.com>
|
||||
forbes <contact@kindred-systems.com> Zoe Forbes <forbes@copernicus-9.kindred.internal>
|
||||
forbes <contact@kindred-systems.com> admin <admin@kindred-systems.com>
|
||||
209
GNN/.gitea/workflows/ci.yaml
Normal file
209
GNN/.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,209 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
run_datagen:
|
||||
description: "Run dataset generation"
|
||||
required: false
|
||||
type: boolean
|
||||
default: false
|
||||
num_assemblies:
|
||||
description: "Number of assemblies to generate"
|
||||
required: false
|
||||
type: string
|
||||
default: "100000"
|
||||
num_workers:
|
||||
description: "Parallel workers for datagen"
|
||||
required: false
|
||||
type: string
|
||||
default: "4"
|
||||
|
||||
env:
|
||||
PIP_CACHE_DIR: /tmp/pip-cache-solver
|
||||
TORCH_INDEX: https://download.pytorch.org/whl/cpu
|
||||
VIRTUAL_ENV: /tmp/solver-venv
|
||||
|
||||
jobs:
|
||||
# ---------------------------------------------------------------------------
|
||||
# Lint — fast, no torch required
|
||||
# ---------------------------------------------------------------------------
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PATH: /tmp/solver-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
steps:
|
||||
- name: Trust internal CA
|
||||
run: |
|
||||
curl -sk https://ipa.kindred.internal/ipa/config/ca.crt \
|
||||
-o /usr/local/share/ca-certificates/kindred-internal.crt
|
||||
update-ca-certificates
|
||||
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up venv
|
||||
run: python3 -m venv $VIRTUAL_ENV
|
||||
|
||||
- name: Install lint tools
|
||||
run: pip install --cache-dir $PIP_CACHE_DIR ruff
|
||||
|
||||
- name: Ruff check
|
||||
run: ruff check solver/ freecad/ tests/ scripts/
|
||||
|
||||
- name: Ruff format check
|
||||
run: ruff format --check solver/ freecad/ tests/ scripts/
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Type check
|
||||
# ---------------------------------------------------------------------------
|
||||
type-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PATH: /tmp/solver-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
steps:
|
||||
- name: Trust internal CA
|
||||
run: |
|
||||
curl -sk https://ipa.kindred.internal/ipa/config/ca.crt \
|
||||
-o /usr/local/share/ca-certificates/kindred-internal.crt
|
||||
update-ca-certificates
|
||||
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up venv
|
||||
run: python3 -m venv $VIRTUAL_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --cache-dir $PIP_CACHE_DIR \
|
||||
mypy numpy scipy \
|
||||
torch --index-url $TORCH_INDEX
|
||||
pip install --cache-dir $PIP_CACHE_DIR torch-geometric
|
||||
pip install --cache-dir $PIP_CACHE_DIR -e ".[dev]"
|
||||
|
||||
- name: Mypy
|
||||
run: mypy solver/ freecad/
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Tests
|
||||
# ---------------------------------------------------------------------------
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PATH: /tmp/solver-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
steps:
|
||||
- name: Trust internal CA
|
||||
run: |
|
||||
curl -sk https://ipa.kindred.internal/ipa/config/ca.crt \
|
||||
-o /usr/local/share/ca-certificates/kindred-internal.crt
|
||||
update-ca-certificates
|
||||
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up venv
|
||||
run: python3 -m venv $VIRTUAL_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --cache-dir $PIP_CACHE_DIR \
|
||||
torch --index-url $TORCH_INDEX
|
||||
pip install --cache-dir $PIP_CACHE_DIR torch-geometric
|
||||
pip install --cache-dir $PIP_CACHE_DIR -e ".[train,dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: pytest tests/ freecad/tests/ -v --tb=short
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Dataset generation — manual trigger or on main push
|
||||
# ---------------------------------------------------------------------------
|
||||
datagen:
|
||||
runs-on: ubuntu-latest
|
||||
if: >-
|
||||
(github.event_name == 'workflow_dispatch' && inputs.run_datagen == true) ||
|
||||
(github.event_name == 'push' && github.ref == 'refs/heads/main')
|
||||
needs: [test]
|
||||
env:
|
||||
PATH: /tmp/solver-venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
steps:
|
||||
- name: Trust internal CA
|
||||
run: |
|
||||
curl -sk https://ipa.kindred.internal/ipa/config/ca.crt \
|
||||
-o /usr/local/share/ca-certificates/kindred-internal.crt
|
||||
update-ca-certificates
|
||||
|
||||
- name: Checkout
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
|
||||
- name: Set up venv
|
||||
run: python3 -m venv $VIRTUAL_ENV
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install --cache-dir $PIP_CACHE_DIR \
|
||||
torch --index-url $TORCH_INDEX
|
||||
pip install --cache-dir $PIP_CACHE_DIR torch-geometric
|
||||
pip install --cache-dir $PIP_CACHE_DIR -e ".[train]"
|
||||
|
||||
- name: Restore datagen checkpoint
|
||||
id: datagen-cache
|
||||
uses: https://github.com/actions/cache/restore@v4
|
||||
with:
|
||||
path: data/synthetic
|
||||
key: datagen-${{ github.sha }}
|
||||
restore-keys: |
|
||||
datagen-
|
||||
|
||||
- name: Generate dataset
|
||||
run: |
|
||||
NUM=${INPUTS_NUM_ASSEMBLIES:-100000}
|
||||
WORKERS=${INPUTS_NUM_WORKERS:-4}
|
||||
echo "Generating ${NUM} assemblies with ${WORKERS} workers"
|
||||
python3 scripts/generate_synthetic.py \
|
||||
--num-assemblies "${NUM}" \
|
||||
--num-workers "${WORKERS}" \
|
||||
--output-dir data/synthetic
|
||||
env:
|
||||
INPUTS_NUM_ASSEMBLIES: ${{ inputs.num_assemblies }}
|
||||
INPUTS_NUM_WORKERS: ${{ inputs.num_workers }}
|
||||
|
||||
- name: Save datagen checkpoint
|
||||
if: always()
|
||||
uses: https://github.com/actions/cache/save@v4
|
||||
with:
|
||||
path: data/synthetic
|
||||
key: datagen-${{ github.sha }}
|
||||
|
||||
- name: Upload dataset
|
||||
uses: https://github.com/actions/upload-artifact@v3
|
||||
with:
|
||||
name: synthetic-dataset
|
||||
path: |
|
||||
data/synthetic/index.json
|
||||
data/synthetic/stats.json
|
||||
data/synthetic/shards/
|
||||
retention-days: 90
|
||||
|
||||
- name: Print summary
|
||||
if: always()
|
||||
run: |
|
||||
echo "=== Dataset Generation Results ==="
|
||||
if [ -f data/synthetic/stats.json ]; then
|
||||
python3 -c "
|
||||
import json
|
||||
with open('data/synthetic/stats.json') as f:
|
||||
s = json.load(f)
|
||||
print(f'Total examples: {s[\"total_examples\"]}')
|
||||
print(f'Classification: {json.dumps(s[\"classification_distribution\"], indent=2)}')
|
||||
print(f'Rigid: {s[\"rigidity\"][\"rigid_fraction\"]*100:.1f}%')
|
||||
print(f'Degeneracy: {s[\"geometric_degeneracy\"][\"fraction_with_degeneracy\"]*100:.1f}%')
|
||||
"
|
||||
else
|
||||
echo "stats.json not found — generation may have failed"
|
||||
ls -la data/synthetic/ 2>/dev/null || echo "output dir missing"
|
||||
fi
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user