Views
No views yet
ac2. Checkpoint saved
after training step 8 (0-indexed). Strict upstream eval parity:
1100s hard kill, verbatim prompts/entrypoints, group 64x8, T=1.0, kl 0.1.1{
2 "step": 8,
3 "progress/batch": 8,
4 "optim/lr": 4e-05,
5 "progress/done_frac": 0.18,
6 "puct/buffer_size": 136,
7 "puct/sampled_size": 8,
8 "puct/T": 4096,
9 "puct/scale_last": 0.43720195436973397,
10 "puct/buffer_value/mean": 0.907233349633657,
11 "puct/buffer_value/std": 0.07313753099235445,
12 "puct/buffer_value/min": 0.5041471954736918,
13 "puct/buffer_value/max": 0.9413491498434258,
14 "puct/buffer_timestep/mean": 3.235294117647059,
15 "puct/buffer_timestep/std": 2.462170533700747,
16 "puct/buffer_timestep/min": -1.0,
17 "puct/buffer_timestep/max": 7.0,
18 "puct/buffer_construction_len/mean": 2373.9632352941176,
19 "puct/buffer_construction_len/std": 1149.1065993151083,
20 "puct/buffer_construction_len/min": 1024.0,
21 "puct/buffer_construction_len/max": 7414.0,
22 "puct/sampled_value/mean": 0.9375705367951757,
23 "puct/sampled_value/std": 0.0011669474309106242,
24 "puct/sampled_value/min": 0.9357956829947527,
25 "puct/sampled_value/max": 0.9391322369067988,
26 "puct/sampled_timestep/mean": 7.0,
27 "puct/sampled_timestep/std": 0.0,
28 "puct/sampled_timestep/min": 7.0,
29 "puct/sampled_timestep/max": 7.0,
30 "puct/sampled_construction_len/mean": 1920.0,
31 "puct/sampled_construction_len/std": 338.6561678162676,
32 "puct/sampled_construction_len/min": 1024.0,
33 "puct/sampled_construction_len/max": 2048.0,
34 "time/sampling": 5431.094317913055,
35 "env/all/ac_tokens_per_turn": 8209.08984375,
36 "env/all/ob_tokens_per_turn": 4905.125,
37 "env/all/turns_per_episode": 1.0,
38 "env/all/total_episodes": 512,
39 "env/all/total_turns": 512,
40 "env/all/total_ac_tokens": 4203054,
41 "env/all/total_ob_tokens": 2511424,
42 "env/all/time/sampling_mean": 328.27821478806436,
43 "env/all/time/sampling_max": 425.1023848056793,
44 "env/all/time/env_step_mean": 2373.8789978055283,
45 "env/all/time/env_step_max": 4998.034643650055,
46 "env/all/reward/mean": 0.26548939961884854,
47 "env/all/reward/max": 0.9410069774659786,
48 "env/all/reward/min": 0.0,
49 "env/all/format": 1.0,
50 "env/all/format/min": 1.0,
51 "env/all/format/max": 1.0,
52 "env/all/reward": 0.26548939961884854,
53 "env/all/correctness": 0.29296875,
54 "env/all/correctness/min": 0.0,
55 "env/all/correctness/max": 1.0,
56 "env/all/raw_score": 0.9062038173656697,
57 "env/all/raw_score/min": 0.6581218562539779,
58 "env/all/raw_score/max": 0.9410069774659786,
59 "env/all/initial_raw_score": 0.9375705367951757,
60 "env/all/initial_raw_score/min": 0.9357956829947527,
61 "env/all/initial_raw_score/max": 0.9391322369067988,
62 "env/all/msg": "RuntimeError: Program execution failed: ValueError: Invalid sequence type",
63 "env/all/parsed_code": "```python\nimport numpy as np\nimport random\nimport time\nfrom typing import List, Tuple\n\ndef _evaluate_with_constraints(seq: List[float]) -> float:\n return evaluate_sequence(seq)\n\ndef _generate_random_sequence(length):\n \"\"\"Generate a random sequence with 0.5 base intensity and small random fluctuations.\"\"\"\n seq = np.random.normal(0.5, 0.1, length)\n return np.clip(seq, 0.0, 1000.0).tolist()\n\ndef _generate_periodic_sequence(length):\n \"\"\"Generate a sequence with multiple evenly spaced peaks.\"\"\"\n peaks = [0.5 + np.random.uniform(-0.2, 0.2) for _ in range(20)]\n seq = np.zeros(length)\n for i, val in enumerate(peaks):\n idx = int(i * length / 20)\n seq[idx] = val\n return np.clip(seq, 0.0, 1000.0).tolist()\n\ndef _generate_gaussian_sequence(length):\n \"\"\"Generate a sequence with a single Gaussian peak.\"\"\"\n mu = length // 2\n sigma = length // 10\n seq = np.exp(-0.5 * ((np.arange(length) - mu) / sigma) ** 2)\n seq = 0.5 * seq / np.max(seq)\n return np.clip(seq, 0.0, 1000.0).tolist()\n\ndef _generate_sine_sequence(length):\n \"\"\"Generate a sine-like oscillation pattern.\"\"\"\n freq = np.random.uniform(0.1, 0.5)\n phase = np.random.uniform(0, 2 * np.pi)\n seq = 0.5 * (1 + np.sin(2 * np.pi * freq * np.arange(length) + phase))\n return np.clip(seq, 0.0, 1000.0).tolist()\n\ndef _generate_initial_population(pop_size: int, seq_len: int) -> List[List[float]]:\n population = []\n for _ in range(pop_size):\n if np.random.rand() < 0.6:\n population.append(_generate_periodic_sequence(seq_len))\n elif np.random.rand() < 0.3:\n population.append(_generate_gaussian_sequence(seq_len))\n elif np.random.rand() < 0.1:\n population.append(_generate_sine_sequence(seq_len))\n else:\n population.append(_generate_random_sequence(seq_len))\n return population\n\ndef _crossover(parent1: List[float], parent2: List[float]) -> List[float]:\n \"\"\"Two-point crossover: randomly select a point and swap segments.\"\"\"\n point = np.random.randint(1, len(parent1) - 1)\n child = parent1[:point] + parent2[point:]\n return child\n\ndef _mutate(seq: List[float]) -> List[float]:\n \"\"\"Mutate a sequence by applying Gaussian noise and clipping.\"\"\"\n mu, sigma = 0.0, 0.02\n mutated = [max(0, x + np.random.normal(mu, sigma)) for x in seq]\n return np.clip(mutated, 0.0, 1000.0).tolist()\n\ndef _select_top_parents(population: List[List[float]], scores: List[float], top_ratio: float) -> List[List[float]]:\n \"\"\"Select top candidates by score for reproduction.\"\"\"\n sorted_indices = np.argsort(scores)\n top_idx = sorted_indices[-int(top_ratio * len(population)):]\n return [population[i] for i in top_idx]\n\ndef _elitist_selection(population: List[List[float]], scores: List[float]) -> Tuple[List[List[float]], List[float]]:\n \"\"\"Maintain the best candidates, discard the rest.\"\"\"\n best_scores = np.sort(scores)[::-1]\n best_sequences = [population[i] for i in np.argsort(scores)[::-1]]\n return best_sequences[:10], best_scores[:10]\n\ndef _upsample_sequence(seq: List[float]) -> List[float]:\n \"\"\"Up-sampling by repeating and interpolating elements.\"\"\"\n new_seq = []\n for i, x in enumerate(seq):\n new_seq.append(x)\n if i < len(seq) - 1:\n new_seq.append((x + seq[i + 1]) / 2)\n return new_seq\n\ndef _fine_tune_sequence(seq: List[float], max_iterations: int, lr: float = 3e-3) -> List[float]:\n \"\"\"Refine the sequence using Adam optimization with gradient descent.\"\"\"\n h = np.array(seq, dtype=np.float32)\n opt = _Adam(h.shape, lr=lr)\n best_seq = h.copy()\n best_score = _evaluate_with_constraints(best_seq)\n for _ in range(max_iterations):\n h_clip = np.clip(h, 0.0, 1000.0)\n conv = np.convolve(h_clip, h_clip, mode=\"full\")\n c_val, g_conv = _objective_and_grad_conv(conv)\n g_h = _grad_h_from_conv_grad(h_clip, g_conv)\n h = np.clip(opt.step(h, g_h.astype(np.float32)), 0.0, 1000.0)\n current_score = _evaluate_with_constraints(h.tolist())\n if current_score > best_score:\n best_seq = h.copy()\n best_score = current_score\n return best_seq.tolist()\n\ndef construct_function():\n \"\"\"\n Construct a sequence maximizing the lower bound C using a hybrid genetic\n and gradient-based optimizer. This method balances exploration using\n structured patterns and exploitation using adaptive refinement.\n \"\"\"\n\n n_start = 256\n pop_size = 200\n generations = 500\n top_ratio = 0.4\n mutation_rate = 0.1\n\n # Initial sequence can be derived from height_sequence_1 or generated\n initial_seq = [0.5 for _ in range(n_start)]\n if 'height_sequence_1' in globals():\n initial_seq = height_sequence_1.copy()[:n_start]\n\n initial_population = _generate_initial_population(pop_size, n_start)\n initial_population.append(initial_seq)\n\n best_seq = initial_seq\n best_score = float('-inf')\n population = initial_population\n\n start_time = time.time()\n\n print(f\"Starting with initial score: {best_score:.6f}\")\n\n for gen in range(generations):\n # Evaluate all candidates\n scores = []\n for seq in population:\n score = _evaluate_with_constraints(seq)\n scores.append(score)\n\n # Update best sequence\n if max(scores) > best_score:\n best_score = max(scores)\n best_seq = population[scores.index(best_score)]\n print(f\"Generation {gen}: Best score {best_score:.6f}, Seq Length: {len(best_seq)}\")\n\n # Select top parents for crossover\n top_parents = _select_top_parents(population, scores, top_ratio)\n\n # Create new population\n new_population = []\n for _ in range(pop_size):\n if np.random.rand() < 0.8:\n # Crossover two parents\n p1, p2 = random.choices(top_parents, k=2)\n child = _crossover(p1, p2)\n new_population.append(child)\n else:\n # Mutation on a random candidate\n seq = random.choice(population)\n new_population.append(_mutate(seq))\n\n population = new_population\n\n # Elitist selection to maintain diversity\n population, _ = _elitist_selection(population, scores)\n\n # Early stopping check\n if time.time() - start_time > 950:\n print(\"Reached time limit, stopping early.\")\n break\n\n # Refine the best sequence with upsampling and gradient ascent\n print(f\"\\nStarting fine-tuning of best sequence: score {best_score:.6f}\")\n best_seq = _fine_tune_sequence(best_seq, max_iterations=200000, lr=1e-3)\n upscaled_seq = _upsample_sequence(best_seq)\n upscaled_seq = _fine_tune_sequence(upscaled_seq, max_iterations=200000, lr=5e-4)\n final_seq = _upsample_sequence(upscaled_seq)\n final_seq = _fine_tune_sequence(final_seq, max_iterations=240000, lr=1e-4)\n\n final_seq = np.clip(final_seq, 0.0, 1000.0).tolist()\n final_score = _evaluate_with_constraints(final_seq)\n print(f\"Final C2 lower bound: {final_score:.6f}\")\n return final_seq\n```",
64 "env/all/time/policy": 328.27821478806436,
65 "env/all/time/policy/min": 84.5956060886383,
66 "env/all/time/policy/max": 425.1023848056793,
67 "env/all/time/env_step": 2373.8789978055283,
68 "env/all/time/env_step/min": 0.006006956100463867,
69 "env/all/time/env_step/max": 4998.034643650055,
70 "env/all/time/reward_compute": 4.149042069911957e-07,
71 "env/all/time/reward_compute/min": 2.421438694000244e-07,
72 "env/all/time/reward_compute/max": 1.080334186553955e-06,
73 "env/all/by_group/frac_mixed": 1.0,
74 "env/all/by_group/frac_all_good": 0.0,
75 "env/all/by_group/frac_all_bad": 0.0,
76 "advantage/mean": 0.027965610846877098,
77 "advantage/min": -1.0,
78 "advantage/max": 5.744872570037842,
79 "time/assemble_training_data": 10.506601572036743,
80 "time/kl_vs_base": 107.51278495788574,
81 "kl_policy_base": 0.0005252269329503179,
82 "time/train": 640.4541306495667,
83 "time/save_checkpoint": 14.74330449104309,
84 "time/total": 6206.577938079834
85}[2026-07-09T06:38:34+00:00] job=1812632 node=node-30 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T06:45:52+00:00] job=1812704 node=node-30 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T07:00:42+00:00] job=1812735 node=node-1 ngpu=3 ntrain=1 replicas=2 flash_attn=no
[2026-07-09T07:26:33+00:00] job=1812827 node=node-14 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T09:21:09+00:00] job=1813131 node=node-1 ngpu=3 ntrain=1 replicas=2 flash_attn=yes
[2026-07-09T14:53:48+00:00] job=1813132 node=node-2 ngpu=6 ntrain=2 replicas=4 flash_attn=yes