From 5e4882323712d6aff9b459df0f59faefadee0309 Mon Sep 17 00:00:00 2001 From: Digital Drosophila Archive Date: Thu, 1 Oct 2026 14:56:32 +0800 Subject: [PATCH] Declare immutable persistent-process replay experiment and boundaries --- .../PROTOCOL.md | 41 +++++++++++++++ .../prepost.py | 51 +++++++++++++++++++ .../run_job.py | 39 ++++++++++++++ 3 files changed, 131 insertions(+) create mode 100644 models/male-cns-lif/conditioning-pipeline-acceleration-v1/PROTOCOL.md create mode 100644 models/male-cns-lif/conditioning-pipeline-acceleration-v1/prepost.py create mode 100644 models/male-cns-lif/conditioning-pipeline-acceleration-v1/run_job.py diff --git a/models/male-cns-lif/conditioning-pipeline-acceleration-v1/PROTOCOL.md b/models/male-cns-lif/conditioning-pipeline-acceleration-v1/PROTOCOL.md new file mode 100644 index 0000000..a04440e --- /dev/null +++ b/models/male-cns-lif/conditioning-pipeline-acceleration-v1/PROTOCOL.md @@ -0,0 +1,41 @@ +# Persistent-process engineering replay — 2026-10-01 + +User authorized continuing performance optimization after the exact V100 eligibility prototype. This is a NEW bounded engineering experiment, not a resumption, retry, or extension of the stopped scientific Phase4AR run. No future assay, learning run, game or decoder is authorized here. + +## Immutable inputs and selection + +- Original registration SHA256: `b63e6281b6505ca3b60acb467dd0b3fae274cf513dcbfd653649ba52e9ba9740`. +- Original scientific source commit: `80aeb2093db655329774eff7b32fb6e417b8b40b`. +- Prior exact-GPU replay code commit: `221e1f13f758ebe8d9f188bab976c361f7cacf45`. +- Fixed real fixture manifest: `/home/qishizhe/phase4ar-v100-acceleration-20261001/fixtures/manifest.json`. +- Fixture manifest SHA256: `481df128d39bf28e5984a6f2e5757f83d45cb7a6136f8d2843ecc0a67eca437b`. +- Use all14 fixtures in their existing order: first and last committed task by task-ID within7arms, chosen in the prior experiment without reading outcomes. Coverage is only the available committed prefix, not the complete scientific design. +- All anatomical data, sources, saved requests, before-overlay, historical checkpoint and original update references remain read-only. No new update is installed. No request/RNG regeneration, learning-rate, sign, threshold, timestep or eligibility change. + +## CPU lanes + +Measure original U in fresh processes and separate resident producer/verifier processes. The verifier owns independently loaded inputs and invokes unchanged original U recomputation. This measures update-interface overhead, NOT full AQ authority/checkpoint verification. Use3 fixed passes; all outputs/receipts must match the original CPU oracle. + +Also measure unchanged original E.postprocess_epoch in a resident CPU process,2 fixed passes, new output per call. Preserve all checks inside E. Original full AQ validation remains a fresh CPU subprocess; never bypass its fresh-interpreter guards. Profile function costs separately; profiler-instrumented timings are not speed benchmarks. + +## Brain lanes + +Use only the original scientific environment and admitted RTX4090 for this pass. Original Torch lacks V100 support for its frozen whole-brain runtime; V100 eligibility compatibility does not establish whole-brain compatibility. + +Run unchanged R.run_light and original checkpoint seal/read functions. Baseline:14 fresh child processes. Candidate: one resident child executes14 forward then14 reverse. Every call creates a fresh neuronal/APL state through the unmodified function. No use of checkpoint continuation, old BrainRuntime, custom state reset, or previous effective-weight accumulation. This first pass reuses interpreter, verified module caches, CUDA context, and the runtime's existing caches only; it does not cache GPU graph tensors or rewrite the numerical loop. + +Compare every event, counts, final v/g/ref, spike ring, APL state/pending/phase, effective-weight hash and request acceptance against the historical sealed trial. Check exact dtypes, shapes and bytes. Verify source/input pins before and after trials. Failures stop the affected lane and retain evidence; no selection of passing trials. + +## Audit, timing and bounds + +Each resident job has a completion record but NOT a fictitious OS exit code. Its session receives an independently observed actual process exit only when the whole child exits. No old AR ledger is modified. + +Report initialization/compilation, immutable-input authentication, execution, checkpoint seal/read, comparison, output I/O and complete child wall times separately. Report data transfer, recording and checks that remain. Independent stage measurements cannot be added and advertised as a measured end-to-end training speedup; no new full-run ETA from isolated kernels. + +Run CPU and GPU timing lanes serially to avoid artificial contention. Check all3 ComfyUI queues before each GPU trial; no service eviction. Maximum engineering workflow30minutes, each child15minutes, new artifacts capped at2GiB and100GiB minimum free disk reserve. If an infrastructure or candidate bug occurs, preserve the attempt and correct only new source/attempt paths; never retry scientific AR tasks. + +Outputs: `/home/qishizhe/phase4ar-pipeline-acceleration-20261001/`. Source: new `conditioning-pipeline-acceleration-v1` directory in independent worktree `/home/qishizhe/digital-drosophila-v100-acceleration`. + +Pre/post checks: original saved64,034-file Phase4AR inventory,16 registered sources, previous acceleration artifact manifest and previous acceleration source hashes. This is NOT a new Phase1–4AQ numerical regression. + +Possible gate: `PASS-PERSISTENT-REPLAY-EQUIVALENCE` for tested lanes only. It is not a learned-model candidate, formal production-runtime promotion, full scientific-gate pass, or permission to resume30,000epochs. diff --git a/models/male-cns-lif/conditioning-pipeline-acceleration-v1/prepost.py b/models/male-cns-lif/conditioning-pipeline-acceleration-v1/prepost.py new file mode 100644 index 0000000..fe08366 --- /dev/null +++ b/models/male-cns-lif/conditioning-pipeline-acceleration-v1/prepost.py @@ -0,0 +1,51 @@ +"""Verify previous independent engineering artifacts and original saved science.""" +import argparse +import hashlib +import json +from pathlib import Path +import subprocess +import sys +import time + +BASE = Path('/home/qishizhe/phase4ar-pipeline-acceleration-20261001') +OLD = Path('/home/qishizhe/phase4ar-v100-acceleration-20261001') +OLD_SOURCE = Path(__file__).resolve().parent.parent / 'conditioning-acceleration-v1' +OLD_MANIFEST_SHA = '6efdec34c96cdc79f786b91bd7a99b0e8ef64d0c4dcfa525646c82659a77d44f' +FIXTURE_SHA = '481df128d39bf28e5984a6f2e5757f83d45cb7a6136f8d2843ecc0a67eca437b' + +def sha(path): + h = hashlib.sha256() + with Path(path).open('rb') as f: + for b in iter(lambda:f.read(8 << 20), b''): h.update(b) + return h.hexdigest() + +p = argparse.ArgumentParser() +p.add_argument('--stage', choices=('before','after'), required=True) +a = p.parse_args() +BASE.mkdir(exist_ok=True) +assert not BASE.is_symlink() +report_path = BASE / ('integrity-' + a.stage + '.json') +assert not report_path.exists() +start = time.perf_counter() +assert sha(OLD / 'artifact-manifest.json') == OLD_MANIFEST_SHA +assert sha(OLD / 'fixtures/manifest.json') == FIXTURE_SHA +manifest = json.loads((OLD / 'artifact-manifest.json').read_text()) +bad = [] +for rel, item in manifest['files'].items(): + path = OLD / rel + assert path.resolve().is_relative_to(OLD) and not path.is_symlink() + if not path.is_file() or path.stat().st_size != item['bytes'] or sha(path) != item['sha256']: bad.append(rel) +for name, expected in manifest['source_files'].items(): + if sha(OLD_SOURCE / name) != expected: bad.append('source:' + name) +assert not bad, bad +science = BASE / ('original-integrity-' + a.stage + '.json') +result = subprocess.run([sys.executable, '-B', str(OLD_SOURCE / 'audit_integrity.py'), '--output', str(science)], + capture_output=True, text=True, timeout=120) +assert result.returncode == 0, result.stdout + result.stderr +records = json.loads(science.read_text()) +report = dict(status='PASS', previous_engineering_files_checked=len(manifest['files']), + previous_engineering_sources_checked=len(manifest['source_files']), original=records, + previous_manifest_sha256=OLD_MANIFEST_SHA, fixture_manifest_sha256=FIXTURE_SHA, + old_artifacts_modified=False, original_AR_resumed=False, wall_seconds=time.perf_counter()-start) +with report_path.open('x') as f: json.dump(report, f, indent=2) +print(json.dumps(report), flush=True) diff --git a/models/male-cns-lif/conditioning-pipeline-acceleration-v1/run_job.py b/models/male-cns-lif/conditioning-pipeline-acceleration-v1/run_job.py new file mode 100644 index 0000000..b455b5c --- /dev/null +++ b/models/male-cns-lif/conditioning-pipeline-acceleration-v1/run_job.py @@ -0,0 +1,39 @@ +"""New pipeline experiment process receipts, with exclusive output and no retries.""" +import argparse +from datetime import datetime, timezone +import json +import os +from pathlib import Path +import re +import shutil +import subprocess +import time + +ROOT = Path('/home/qishizhe/phase4ar-pipeline-acceleration-20261001') +p = argparse.ArgumentParser() +p.add_argument('--label', required=True) +p.add_argument('--timeout', type=int, default=900) +p.add_argument('command', nargs=argparse.REMAINDER) +a = p.parse_args() +assert re.fullmatch(r'[a-z0-9-]+', a.label) and a.command and 0 < a.timeout <= 1800 +assert ROOT.is_dir() and not ROOT.is_symlink() +assert shutil.disk_usage(ROOT).free >= 100 * (1 << 30) +out = ROOT / 'jobs' +out.mkdir(exist_ok=True) +start = time.perf_counter() +record = dict(label=a.label, command=a.command, scope='independent engineering replay only', + started_utc=datetime.now(timezone.utc).isoformat(), scientific_AR_resumed=False) +with (out / (a.label + '.start.json')).open('x') as f: json.dump(record, f, indent=2) +with (out / (a.label + '.stdout.log')).open('x') as stdout, (out / (a.label + '.stderr.log')).open('x') as stderr: + try: + proc = subprocess.run(a.command, stdout=stdout, stderr=stderr, timeout=a.timeout, + env={**os.environ, 'PYTHONDONTWRITEBYTECODE':'1'}) + record.update(exit_code=proc.returncode, observed_exit=True, timed_out=False) + except subprocess.TimeoutExpired: + record.update(exit_code=None, observed_exit=False, timed_out=True) + except OSError as error: + record.update(exit_code=None, observed_exit=False, timed_out=False, launch_error=str(error)) +record.update(wall_seconds=time.perf_counter()-start, finished_utc=datetime.now(timezone.utc).isoformat()) +with (out / (a.label + '.exit.json')).open('x') as f: json.dump(record, f, indent=2) +print(json.dumps(record), flush=True) +raise SystemExit(record['exit_code'] if record['observed_exit'] else 124)