Merge nucleic/upbeat-yarn-seal-ekbe into dev
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Filter and label exported Nucleic prompts with GPT-5.6 Terra via Codex."""
|
||||
"""Filter and label prompt-only sources with a configurable Codex teacher."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -31,8 +31,8 @@ DEFAULT_OUTPUT = (
|
||||
/ ".artifacts"
|
||||
/ "nucleic-history-first-prompts.labeled.jsonl"
|
||||
)
|
||||
MODEL = "gpt-5.6-terra"
|
||||
REASONING_EFFORT = "low"
|
||||
DEFAULT_MODEL = "gpt-5.6-terra"
|
||||
DEFAULT_REASONING_EFFORT = "low"
|
||||
STATE_SCHEMA_VERSION = 1
|
||||
DEFAULT_BATCH_SIZE = 40
|
||||
DEFAULT_BATCH_CHARS = 80_000
|
||||
@@ -443,6 +443,8 @@ def invoke_codex(
|
||||
*,
|
||||
codex: str,
|
||||
codex_isolation: str,
|
||||
model: str,
|
||||
reasoning_effort: str,
|
||||
max_prompt_chars: int,
|
||||
timeout_seconds: int,
|
||||
max_attempts: int,
|
||||
@@ -487,9 +489,9 @@ def invoke_codex(
|
||||
"--skip-git-repo-check",
|
||||
*exec_isolation_args,
|
||||
"--model",
|
||||
MODEL,
|
||||
model,
|
||||
"--config",
|
||||
f'model_reasoning_effort="{REASONING_EFFORT}"',
|
||||
f'model_reasoning_effort="{reasoning_effort}"',
|
||||
"--output-schema",
|
||||
str(schema_path),
|
||||
"--output-last-message",
|
||||
@@ -677,7 +679,8 @@ def label(args: argparse.Namespace) -> dict[str, int]:
|
||||
print(
|
||||
f"input={len(lines)} prefiltered={len(mechanical_rejections)} "
|
||||
f"resumed={len(states) - len(new_mechanical)} pending={len(pending)} "
|
||||
f"batches={len(batch_list)} model={MODEL}",
|
||||
f"batches={len(batch_list)} model={args.model} "
|
||||
f"reasoning={args.reasoning_effort}",
|
||||
flush=True,
|
||||
)
|
||||
|
||||
@@ -691,6 +694,8 @@ def label(args: argparse.Namespace) -> dict[str, int]:
|
||||
batch,
|
||||
codex=args.codex,
|
||||
codex_isolation=args.codex_isolation,
|
||||
model=args.model,
|
||||
reasoning_effort=args.reasoning_effort,
|
||||
max_prompt_chars=args.max_prompt_chars,
|
||||
timeout_seconds=args.timeout_seconds,
|
||||
max_attempts=args.max_attempts,
|
||||
@@ -750,6 +755,8 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
help="Audit JSONL for discarded lines (default: derived from --output)",
|
||||
)
|
||||
parser.add_argument("--codex", default="codex", help="Codex CLI executable")
|
||||
parser.add_argument("--model", default=DEFAULT_MODEL)
|
||||
parser.add_argument("--reasoning-effort", default=DEFAULT_REASONING_EFFORT)
|
||||
parser.add_argument("--batch-size", type=int, default=DEFAULT_BATCH_SIZE)
|
||||
parser.add_argument("--batch-chars", type=int, default=DEFAULT_BATCH_CHARS)
|
||||
parser.add_argument(
|
||||
@@ -803,6 +810,8 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
parser.error("--timeout-seconds must be positive")
|
||||
if args.max_attempts <= 0:
|
||||
parser.error("--max-attempts must be positive")
|
||||
if not args.model.strip() or not args.reasoning_effort.strip():
|
||||
parser.error("--model and --reasoning-effort must be non-empty")
|
||||
|
||||
try:
|
||||
metrics = label(args)
|
||||
|
||||
Reference in New Issue
Block a user