From 31e1656f1fd4409c14108e63eb3e430f657746ac Mon Sep 17 00:00:00 2001 From: Void Agent Date: Sun, 2 Aug 2026 14:24:51 +0100 Subject: Address Luna repo review: dynamic repo root (no hardcoded cwd), J-lens correctness test (last-layer identity), auditable fact-check, mechanism narrative fix, softened conditional-predictability claim, README data-prep + artifacts note --- src/loss_reweight.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/loss_reweight.py') diff --git a/src/loss_reweight.py b/src/loss_reweight.py index f01d88a..08dc056 100644 --- a/src/loss_reweight.py +++ b/src/loss_reweight.py @@ -31,6 +31,7 @@ import torch.nn.functional as F DATA_DIR = 'data/shakespeare_char' OUT_ROOT = 'out-loss-reweight' JLENS_OUT = 'outputs/loss_reweight' +REPO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) TARGET = 'q' WEIGHT = 2.0 MODEL_ARGS: dict[str, Any] = dict(n_layer=6, n_head=6, n_embd=384, block_size=128, @@ -142,7 +143,7 @@ def jlens(mode, seed, layers, n_prompts): "--chunk", "16", "--output_dir", out_dir] print("running:", " ".join(cmd)) - r = subprocess.run(cmd, cwd='/workspace/code') + r = subprocess.run(cmd, cwd=REPO_ROOT) assert r.returncode == 0, "jlens_v3 failed" -- cgit v1.2.3