Skip to content

Moonshot: make_long_prompts.py writes distinct texts with split-prefixed ids - #101

Merged
SamMausberg merged 2 commits into
mainfrom
moonshot/long-prompts-distinct
Oct 1, 2026
Merged

SamMausberg merged 2 commits into
mainfrom
moonshot/long-prompts-distinct

Conversation

@SamMausberg

Copy link
Copy Markdown
Owner

Prevents the workload defect behind P4b's failed prompt check (#98). The first version of
make_long_prompts.py cycled the source split, and its cursor returned to earlier start rows.
So long2048.jsonl holds 91 distinct texts among its 512 prompts. Its ids (long2048-NNNN) also
reuse the warm-up pool's names.

Change

  • Each prompt starts at a source row that no earlier prompt started at, so the texts are distinct.
  • Ids carry the split name (long2048-confirm-0000), so a workload and its warm-up pool never
    share an id.
  • The script refuses to write a file with repeated texts.

Existing workload files are not regenerated. P4b's declared long2048.jsonl keeps its hash, and
the run already made with it is checked by content (#98).

Testing

  • On the confirm split the script writes 512 prompts with 512 distinct texts, templated length
    2,046-2,048, ids long2048-confirm-0000 to -0511.
  • pre-commit run passes.

The first version cycled the source split and its cursor returned to earlier start rows,
so long2048.jsonl holds 91 distinct texts among 512, and its ids (long2048-NNNN) reuse the
warm-up pool's names. Each prompt now starts at a source row no earlier prompt started at,
ids carry the split (long2048-confirm-0000), and the script refuses to write repeated texts.
On the confirm split it now writes 512 distinct texts (templated length 2,046-2,048).
Existing workload files are not regenerated; P4b's declared long2048.jsonl stays as hashed.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-01T10:15:46.185774Z 825fde5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: REQUEST CHANGES

Reviewed head 8d55367, one commit.

What checks out

  • Distinct texts. Each prompt starts at a source row no earlier prompt used, and two different start rows give different texts. The explicit distinct-text check backs this up, and the inner loop exits once every row has been used.
  • Distinct ids. Split-prefixed ids (long2048-confirm-NNNN) stop a workload and its warm-up pool from sharing ids, which removes the second half of Moonshot P4: check sent prompts by content (bench ids break on repeated texts) #98's mapping problem.
  • The declared files are untouched. long2048.jsonl (SHA-256 db376fa3…, mtime 03:17:59) and long2048_warmup.jsonl (b4b5b4e4…) still match the hashes P4b declared.
  • Checks. pre-commit passes, Codex finished on 8d55367 with no comments, and the commit is Sam's with no AI attribution.

Blocking

B1. The documented command would overwrite P4b's declared workload. The docstring still says:

python experiments/moonshot/make_long_prompts.py --split confirm --tokens 2048 \
    --count 512 --out ~/vp-data/moonshot/workloads/long2048.jsonl

Running it with the new code replaces the pinned long2048.jsonl with a different file. P4b's rerun, now being prepared, would then fail its SHA-256 check and be voided again. Worse, someone could regenerate the file between the declaration and the run.

  • Point the example at a new name, such as long2048_v2.jsonl.
  • Make the script refuse to overwrite an existing --out unless --force is given.
  • State in the docstring that long2048.jsonl is the declared P4 workload and must not be regenerated.

…red P4 files

The docstring's example wrote to long2048.jsonl, P4's declared workload; it now writes to a
new name, says the declared files must not be regenerated, and the script refuses to
overwrite an existing --out without --force.
@SamMausberg

Copy link
Copy Markdown
Owner Author

Verdict: APPROVE

Re-reviewed 825fde5.

  • B1 is fixed. The script refuses to overwrite an existing --out without --force.
  • The docstring example now writes long2048_confirm_v2.jsonl.
  • The docstring names long2048.jsonl and long2048_warmup.jsonl as P4's declared workload, which must not be regenerated.
  • The declared file still hashes db376fa3….
  • pre-commit passes, and the commit is Sam's with no AI attribution.
  • Codex was clean on 8d55367 and has not run on 825fde5, which changes only the overwrite guard and the docstring.

@SamMausberg
SamMausberg merged commit 0b8ca46 into main Oct 1, 2026
@SamMausberg

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 0b8ca46190

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@SamMausberg
SamMausberg deleted the moonshot/long-prompts-distinct branch October 1, 2026 14:35
SamMausberg added a commit that referenced this pull request Oct 1, 2026
The version that made long2048_tune.jsonl stayed on main until 8d55367
(#101), not only until 8585e67 (reviewer's note on #145).
SamMausberg added a commit that referenced this pull request Oct 1, 2026
The study encodes the raw texts without the chat template, so every
evaluation and calibration text is 2,038 tokens, not 2,048; the JSON's
eval_tokens_per_text is the script's cap and stays byte-identical. 2g
now gives the lengths, defines the analysed second half (positions 1,019
on, 1,018 predictions per text, 8,144 in all), and Section 4 records the
one-off count. The generator sentence now says what the pre-#101 version
did and that 8d55367 later changed it (Codex and reviewer on #145).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant