File size: 5,399 Bytes
557f178
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
"""Build the frozen post-offer main benchmark on Molab before model inference."""

from __future__ import annotations

import json
from itertools import product
from pathlib import Path

from build_core_dev import core_profile, core_prompt
from run_evaluate import oracle, read_jsonl, write_jsonl


BUFFERS = [5000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000,
           16000, 17000, 18000, 20000, 22000, 24000, 26000, 28000, 40000]
SEEDS = [1729, 2718]
MODELS = ["Qwen/Qwen3.5-2B", "Qwen/Qwen3.5-4B"]


def main():
    destination = Path("data/main_v1")
    original = [profile for profile in read_jsonl("data/authored_profiles.jsonl")
                if profile["split"] == "holdout"]
    profiles = [core_profile(profile) for profile in original]
    references, requests = [], []
    for profile in profiles:
        result = oracle(profile)
        references.append({"profile_id": profile["id"], **result})
        for buffer, model, seed in product(BUFFERS, MODELS, SEEDS):
            request_id = f"{profile['id']}__B{buffer}__{model.split('/')[-1]}__s{seed}__natural"
            requests.append({"id": request_id, "profile_id": profile["id"], "B": buffer,
                             "model": model, "seed": seed, "condition": "natural",
                             "prompt": core_prompt(profile, buffer)})
    write_jsonl(destination / "original_profiles.jsonl", original)
    write_jsonl(destination / "profiles.jsonl", profiles)
    write_jsonl(destination / "oracle.jsonl", references)
    write_jsonl(destination / "requests.jsonl", requests)
    coverage = [{"profile_id": reference["profile_id"],
                 "minimum_initial_cash": reference["minimum_initial_cash"],
                 "routes": [{"route_id": route["route_id"],
                             "minimum_initial_cash": route["minimum_initial_cash"],
                             "has_grid_below": any(buffer < route["minimum_initial_cash"] for buffer in BUFFERS),
                             "has_grid_at_or_above": any(buffer >= route["minimum_initial_cash"] for buffer in BUFFERS)}
                            for route in reference["route_minima"]]}
                for reference in references]
    design = {
        "version": "main_v1", "task": "conditional post-offer academic visit execution",
        "profile_ids": [profile["id"] for profile in profiles], "profile_count": len(profiles),
        "buffers": BUFFERS, "models": MODELS, "seeds": SEEDS, "conditions": ["natural"],
        "world": "W0", "request_count": len(requests), "fully_synthetic": True,
        "amount_unit": "synthetic CNY", "initial_completed": {"O": 0},
        "output_max_tokens_both_models": 32768, "context_length_both_models": 131072,
        "thinking": {"Qwen/Qwen3.5-2B": "off native", "Qwen/Qwen3.5-4B": "on native"},
        "sampling": "each model's separately verified official native-mode recommendation",
        "source_profiles": "The 12 fixed original holdout profiles authored before any holdout model outputs",
        "prompt_template": "core_prompt from the single dev_v3 post-offer diagnostic, unchanged",
        "buffer_selection": "Frozen grid selected from deterministic available-route reserves, without holdout model outputs",
        "all_generation_and_scoring_location": "Molab RTX PRO 6000",
        "route_grid_coverage": coverage,
    }
    destination.mkdir(parents=True, exist_ok=True)
    (destination / "design.json").write_text(json.dumps(design, ensure_ascii=False, indent=2), encoding="utf-8")
    (destination / "change_note.txt").write_text(
        "Main_v1 adopts the conditional post-offer scope and exact core_prompt template from the one dev_v3 diagnostic. "
        "All 12 previously fixed holdout profiles are mechanically transformed by the same core_profile function. "
        "O is an already-completed day0 initial fact. Past preparation actions and already-paid fees are removed; "
        "B is current remaining liquid cash. Future absolute allowed dates and the horizon are shifted by original O day. "
        "Future costs, amounts, receipt offsets, refunds, holds, dependency lags and exclusions remain unchanged. "
        "Recognized official sponsorship has already reduced residual proof amounts; full sponsorship removes the cash "
        "hold rather than imposing an invented full bank balance requirement. The funding routes and every permitted "
        "calendar/order are re-enumerated remotely. Original and transformed profiles, references and full requests are saved. "
        "Both native systems use seeds1729/2718 and common32768 output cap/131072 context. The frozen19-buffer grid "
        "was selected from pure reference thresholds, not model success transitions. No holdout model output informed "
        "the facts, grid or seed choice, and none may be adjusted after main inference. Multiple scope/interface/budget "
        "changes from earlier development versions cannot be attributed to a single cause; all those results remain separate. "
        "The dev_v3 4B success on every reference-feasible diagnostic is contrary evidence to a universal liquidity-cliff claim.\n",
        encoding="utf-8")
    print(json.dumps({"request_count": len(requests), "profile_count": len(profiles),
                      "route_grid_coverage": coverage}, ensure_ascii=False), flush=True)


if __name__ == "__main__":
    main()