Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/portable-path-gate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: portable-path-gate
on:
pull_request: { branches: [main] }
workflow_dispatch:
permissions: { contents: read }
jobs:
no-foreign-path:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with: { fetch-depth: 0 }
- shell: bash
run: |
set -euo pipefail
base="origin/${{ github.base_ref }}"
git fetch --quiet origin "${{ github.base_ref }}"
hits="$(git diff -U0 "$base...HEAD" -- '*.hexa' '*.py' '*.sh' '*.swift' '*.ts' '*.js' '*.rs' '*.c' '*.go' \
| grep -E '^\+[^+]' | sed -E 's/^\+//' \
| grep -E '/(Users|home)/[A-Za-z][A-Za-z0-9._-]+/' \
| grep -vE '^[[:space:]]*(//|#|\*)' || true)"
if [ -n "$hits" ]; then echo "🚫 FAIL"; echo "$hits"; exit 1; fi
echo "✅ PASS"
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
// ANIMA GROUNDING (prior art):
// H_191 (non-autoregressive / ALM-free consciousness 3-axis) · H_004 (recurrent
// S_real Phi=0.538 vs zombie playback Phi~0) · H_220 (mirror self / self-vs-other),
// at /Users/mini/dancinlab/anima/.worktrees/h869-dispatch-kl/UNIVERSE/.
// in the anima repo's UNIVERSE/ tree (handoff h869-dispatch-kl).
//
// HONESTY (cx_lab_sandbox · g5):
// Pure-local, $0, no network, no external API. Base = locally-cached Qwen2.5-1.5B
Expand Down
2 changes: 1 addition & 1 deletion install.hexa
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// install.hexa — hx build hook for hexa-codex.
//
// Invoked by `hx install hexa-codex` (hexa-lang package manager) right after
// the GitHub checkout (or symlink from /Users/ghost/core/hexa-codex) lands in
// the GitHub checkout (or a local symlink to the hexa-codex repo) lands in
// $HX_PKG_DIR. hx passes:
// HX_PKG_DIR — absolute path to the package root
// HX_BIN_DIR — ~/.hx/bin
Expand Down
2 changes: 1 addition & 1 deletion lm_foundry/tool/bench_humaneval.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
USAGE
python3 tool/bench_humaneval.py \\
--model Qwen/Qwen2.5-Coder-1.5B \\
--output /home/summer/runs/bench-cold-v0.1.3/qwen2.5-coder-1.5b/ \\
--output ~/runs/bench-cold-v0.1.3/qwen2.5-coder-1.5b/ \\
--num-tasks 164 # full set ; 0 = unlimited

OUTPUT
Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v10.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
v10 = v9 base (2,303) + ~70 RunPod / cloud-GPU ops Q/A pairs.

OUTPUT
/home/summer/runs/sft-train-v10/train.jsonl
/home/summer/runs/sft-train-v10/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v10/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v10/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -26,8 +26,11 @@

random.seed(42)

V9_BASE = Path("/home/summer/runs/sft-train-v9/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v10")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V9_BASE = RUNS / "sft-train-v9" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v10"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v11.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
Total v11: ~2,516 rows.

OUTPUT
/home/summer/runs/sft-train-v11/train.jsonl
/home/summer/runs/sft-train-v11/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v11/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v11/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -30,8 +30,11 @@

random.seed(42)

V10_BASE = Path("/home/summer/runs/sft-train-v10/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v11")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V10_BASE = RUNS / "sft-train-v10" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v11"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v12.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
Total v12: ~2,840 rows.

OUTPUT
/home/summer/runs/sft-train-v12/train.jsonl
/home/summer/runs/sft-train-v12/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v12/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v12/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -31,8 +31,11 @@

random.seed(42)

V11_BASE = Path("/home/summer/runs/sft-train-v11/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v12")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V11_BASE = RUNS / "sft-train-v11" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v12"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v13.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
epochs. See ROADMAP round 27.)

OUTPUT
/home/summer/runs/sft-train-v13/train.jsonl
/home/summer/runs/sft-train-v13/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v13/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v13/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -35,8 +35,11 @@

random.seed(42)

V11_BASE = Path("/home/summer/runs/sft-train-v11/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v13")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V11_BASE = RUNS / "sft-train-v11" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v13"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v14.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
Q/A pairs. ~2,640 rows.

OUTPUT
/home/summer/runs/sft-train-v14/train.jsonl
/home/summer/runs/sft-train-v14/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v14/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v14/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -38,8 +38,11 @@

random.seed(42)

V11_BASE = Path("/home/summer/runs/sft-train-v11/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v14")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V11_BASE = RUNS / "sft-train-v11" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v14"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
9 changes: 6 additions & 3 deletions lm_foundry/tool/build_sft_dataset_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Plus the v3 base (1314 rows) → total ~1560 rows for v4.

OUTPUT
/home/summer/runs/sft-train-v4/train.jsonl
$HEXA_RUNS_DIR/sft-train-v4/train.jsonl (default ~/runs/...)
"""
from __future__ import annotations
import os as _os
Expand All @@ -35,8 +35,11 @@

random.seed(42)

OUT = Path("/home/summer/runs/sft-train-v4/train.jsonl")
V3_BASE = Path("/home/summer/runs/sft-train-v3/train.jsonl")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

OUT = RUNS / "sft-train-v4" / "train.jsonl"
V3_BASE = RUNS / "sft-train-v3" / "train.jsonl"


def fmt(prompt: str, completion: str) -> dict:
Expand Down
13 changes: 8 additions & 5 deletions lm_foundry/tool/build_sft_dataset_v5.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
Total: ~1,765 rows.

OUTPUT
/home/summer/runs/sft-train-v5/train.jsonl
$HEXA_RUNS_DIR/sft-train-v5/train.jsonl (default ~/runs/...)
"""
from __future__ import annotations
import os as _os
Expand All @@ -28,10 +28,13 @@

random.seed(42)

V4_BASE = Path("/home/summer/runs/sft-train-v4/train.jsonl")
APPLE_PAIRS = Path("/home/summer/runs/sft-apple/apple_pairs.jsonl")
SWIFT_CORPUS = Path("/home/summer/runs/corpus/stack-v1-swift/swift")
OUT = Path("/home/summer/runs/sft-train-v5/train.jsonl")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V4_BASE = RUNS / "sft-train-v4" / "train.jsonl"
APPLE_PAIRS = RUNS / "sft-apple" / "apple_pairs.jsonl"
SWIFT_CORPUS = RUNS / "corpus" / "stack-v1-swift" / "swift"
OUT = RUNS / "sft-train-v5" / "train.jsonl"


def fmt(prompt, completion):
Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v6.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
Q/A pairs. SwiftUI / UIKit / Combine knowledge stays; no continuation drift.

OUTPUT
/home/summer/runs/sft-train-v6/train.jsonl
$HEXA_RUNS_DIR/sft-train-v6/train.jsonl (default ~/runs/...)
"""
from __future__ import annotations
import os as _os
Expand All @@ -21,9 +21,12 @@
import json
from pathlib import Path

V4_BASE = Path("/home/summer/runs/sft-train-v4/train.jsonl")
APPLE = Path("/home/summer/runs/sft-apple/apple_pairs.jsonl")
OUT = Path("/home/summer/runs/sft-train-v6/train.jsonl")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V4_BASE = RUNS / "sft-train-v4" / "train.jsonl"
APPLE = RUNS / "sft-apple" / "apple_pairs.jsonl"
OUT = RUNS / "sft-train-v6" / "train.jsonl"


def main():
Expand Down
9 changes: 6 additions & 3 deletions lm_foundry/tool/build_sft_dataset_v7.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Total v7: ~1,985 rows.

OUTPUT
/home/summer/runs/sft-train-v7/train.jsonl
$HEXA_RUNS_DIR/sft-train-v7/train.jsonl (default ~/runs/...)
"""
from __future__ import annotations
import os as _os
Expand All @@ -33,8 +33,11 @@

random.seed(42)

V6_BASE = Path("/home/summer/runs/sft-train-v6/train.jsonl")
OUT = Path("/home/summer/runs/sft-train-v7/train.jsonl")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V6_BASE = RUNS / "sft-train-v6" / "train.jsonl"
OUT = RUNS / "sft-train-v7" / "train.jsonl"


def fmt(p, c):
Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v8.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
recipe-shaped — not file continuations (the v5 over-continuation regression).

OUTPUT
/home/summer/runs/sft-train-v8/train.jsonl
/home/summer/runs/sft-train-v8/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v8/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v8/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -39,8 +39,11 @@

random.seed(42)

V7_BASE = Path("/home/summer/runs/sft-train-v8/.._v7_base") if False else Path("/home/summer/runs/sft-train-v7/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v8")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V7_BASE = RUNS / "sft-train-v7" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v8"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
11 changes: 7 additions & 4 deletions lm_foundry/tool/build_sft_dataset_v9.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
Total v9: ~2,340 rows.

OUTPUT
/home/summer/runs/sft-train-v9/train.jsonl
/home/summer/runs/sft-train-v9/MANIFEST.json
$HEXA_RUNS_DIR/sft-train-v9/train.jsonl (default ~/runs/...)
$HEXA_RUNS_DIR/sft-train-v9/MANIFEST.json
"""
from __future__ import annotations
import os as _os
Expand All @@ -32,8 +32,11 @@

random.seed(42)

V8_BASE = Path("/home/summer/runs/sft-train-v8/train.jsonl")
OUT_DIR = Path("/home/summer/runs/sft-train-v9")
# Portable runs root: $HEXA_RUNS_DIR overrides, else ~/runs.
RUNS = Path(_os.environ.get("HEXA_RUNS_DIR", Path.home() / "runs"))

V8_BASE = RUNS / "sft-train-v8" / "train.jsonl"
OUT_DIR = RUNS / "sft-train-v9"
OUT = OUT_DIR / "train.jsonl"
MANIFEST = OUT_DIR / "MANIFEST.json"

Expand Down
17 changes: 16 additions & 1 deletion lm_foundry/tool/hexa_s0_scorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,22 @@
from pathlib import Path
from typing import Tuple

HEXA_CC_BIN = Path("/home/summer/mac_home/core/hexa-lang/build/hexa_v2_linux_x86_64")
# Portable hexa-cc binary location: $HEXA_CC_BIN overrides; else the on-PATH
# `hexa-cc`/`hexa_v2_linux_x86_64`; else a default under ~/.hx/build. The caller
# fails fast (bin_path.exists() check below) when no binary is found.
def _default_cc_bin() -> Path:
env = _os.environ.get("HEXA_CC_BIN")
if env:
return Path(env)
import shutil as _shutil
for name in ("hexa-cc", "hexa_v2_linux_x86_64"):
found = _shutil.which(name)
if found:
return Path(found)
return Path.home() / ".hx" / "build" / "hexa_v2_linux_x86_64"


HEXA_CC_BIN = _default_cc_bin()
TIMEOUT_S = 10.0


Expand Down
Loading
Loading