Complete P3 F3 evaluation and Windows execution
Implement the frozen F3 protocol, nested LOWO, posterior label banks, ablations, diagnostics, checkpoint validation and full-volume inference. Record the negative G-C result: improvement at 1/4 wells, coverage80 52.38% and coverage90 60.91%, with unchanged thresholds and historical P2 results. Add native Windows logging, the RTX 3060 environment lock, detached runs, and an audited dashboard-lock recovery that preserves frozen scientific code. Update report.html, the plan and agent guidance with completed P3 status. Archive thesis sources under code_thesis with identical Git blobs and record the original-output audit without committing large data or model artifacts. Validation: 129 tests passed, 13 skipped; CUDA end-to-end smoke passed; completion audit verified 1,320 checkpoint/prediction pairs, 28 registration bundles and all 649 interior volume inlines. Scripts 04 and 09 were not rerun. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
31
ml_porosity/f3/progress.py
Normal file
31
ml_porosity/f3/progress.py
Normal file
@@ -0,0 +1,31 @@
|
||||
"""One parent writer publishes JSON and a local-file-compatible report.html sidecar."""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import os
|
||||
from datetime import datetime
|
||||
from pathlib import Path
|
||||
|
||||
from ml_porosity.paths import outputs_dir
|
||||
|
||||
|
||||
def write_json(path: Path, data: dict) -> None:
|
||||
path.parent.mkdir(parents=True, exist_ok=True)
|
||||
tmp = path.with_suffix(path.suffix + f'.{os.getpid()}.tmp')
|
||||
tmp.write_text(json.dumps(data, indent=2, ensure_ascii=False, default=str), encoding='utf-8')
|
||||
tmp.replace(path)
|
||||
|
||||
|
||||
def update(**values) -> dict:
|
||||
root = outputs_dir() / 'p3'
|
||||
path = root / 'progress.json'
|
||||
old = json.loads(path.read_text(encoding='utf-8')) if path.exists() else {}
|
||||
if 'tasks' in values:
|
||||
values['tasks'] = old.get('tasks', {}) | values['tasks']
|
||||
state = old | values | {'updated': datetime.now().astimezone().isoformat(timespec='seconds')}
|
||||
write_json(path, state)
|
||||
js = root / 'progress.js'
|
||||
tmp = js.with_suffix('.js.tmp')
|
||||
tmp.write_text('window.ML_POROSITY_P3 = ' + json.dumps(state, ensure_ascii=False, default=str) + ';\n', encoding='utf-8')
|
||||
tmp.replace(js)
|
||||
return state
|
||||
Reference in New Issue
Block a user