diff options
| author | Void Agent <void@jayrup.hermes> | 2026-08-02 14:24:51 +0100 |
|---|---|---|
| committer | Void Agent <void@jayrup.hermes> | 2026-08-02 14:24:51 +0100 |
| commit | 31e1656f1fd4409c14108e63eb3e430f657746ac (patch) | |
| tree | bed1220a66825ee44a2c8533df2b4262d1048e74 /src/loss_reweight.py | |
| parent | a16d9b3177248ae9e27b195f117b5b615af6da8c (diff) | |
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
Diffstat (limited to 'src/loss_reweight.py')
| -rw-r--r-- | src/loss_reweight.py | 3 |
1 files changed, 2 insertions, 1 deletions
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" |
