Preserve actual native teacher direct replay at widths25 and144, diagnostic only
Browse files- .gitattributes +1 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_acceptance_20261011/native_replay.sqlite +3 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_acceptance_20261011/terminal.json +137 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/archive_native_teacher_direct_remote.py +35 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/check_native_teacher_direct.py +115 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/direct_teacher.log +3 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/launch.json +11 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/native_teacher_direct_delta_manifest.json +46 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/process_group_deadline.py +83 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/run_native_teacher_direct.py +39 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/run_native_teacher_direct_v2.py +39 -0
- vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/terminal.json +13 -0
.gitattributes
CHANGED
|
@@ -84,3 +84,4 @@ vast_two3060_20261010/full103_final_training_55200131/native_warmstart_training_
|
|
| 84 |
vast_two3060_20261010/exact_resume32_failure_55200131/native_warmstart_training_20261010/native_replay.sqlite filter=lfs diff=lfs merge=lfs -text
|
| 85 |
vast_two3060_20261010/teacher_budget_validation_55200131/full103_teacher_budget_686/training32_control/terminal.json filter=lfs diff=lfs merge=lfs -text
|
| 86 |
vast_two3060_20261010/teacher_budget_validation_55200131/native_teacher_budget_training_20261010/native_replay.sqlite filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 84 |
vast_two3060_20261010/exact_resume32_failure_55200131/native_warmstart_training_20261010/native_replay.sqlite filter=lfs diff=lfs merge=lfs -text
|
| 85 |
vast_two3060_20261010/teacher_budget_validation_55200131/full103_teacher_budget_686/training32_control/terminal.json filter=lfs diff=lfs merge=lfs -text
|
| 86 |
vast_two3060_20261010/teacher_budget_validation_55200131/native_teacher_budget_training_20261010/native_replay.sqlite filter=lfs diff=lfs merge=lfs -text
|
| 87 |
+
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_acceptance_20261011/native_replay.sqlite filter=lfs diff=lfs merge=lfs -text
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_acceptance_20261011/native_replay.sqlite
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:916f96de1714759fcc9490ff0bd9d520133d9631df21d655ea3cc940802cf803
|
| 3 |
+
size 303104
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_acceptance_20261011/terminal.json
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"status": "PASS_SCOPED_NATIVE_TEACHER_DIRECT_REPLAY_NEW_PROFILE",
|
| 3 |
+
"source_manifest": {
|
| 4 |
+
"bytes": 116262,
|
| 5 |
+
"sha256": "88b592def65345ca7567ca44adb505ea8c24f62a55aac3e1166b6286cb76015e"
|
| 6 |
+
},
|
| 7 |
+
"checkpoint": {
|
| 8 |
+
"bytes": 1674076239,
|
| 9 |
+
"sha256": "16f44bf24e8346cdc403062e87572969d96b1574e14f4c4938bf1aa6f5620dbb"
|
| 10 |
+
},
|
| 11 |
+
"config": {
|
| 12 |
+
"bytes": 234940,
|
| 13 |
+
"sha256": "7bc485cee48bf3c01d8348e160845ce9715160a7bb0667c8c03fa279b4d74885"
|
| 14 |
+
},
|
| 15 |
+
"features": 103,
|
| 16 |
+
"search": {
|
| 17 |
+
"beam_width": 4,
|
| 18 |
+
"shortlist": 4,
|
| 19 |
+
"max_depth": 8,
|
| 20 |
+
"max_child_evaluations": 128,
|
| 21 |
+
"max_search_seconds": 30.0,
|
| 22 |
+
"inference_batch": 8,
|
| 23 |
+
"max_expanded": 64
|
| 24 |
+
},
|
| 25 |
+
"results": [
|
| 26 |
+
{
|
| 27 |
+
"position": 31,
|
| 28 |
+
"n": 25,
|
| 29 |
+
"records": 2,
|
| 30 |
+
"synchronized_seconds": 61.66672534200188,
|
| 31 |
+
"last_search": {
|
| 32 |
+
"result": {
|
| 33 |
+
"status": "depth_limit",
|
| 34 |
+
"word": null,
|
| 35 |
+
"verified": false,
|
| 36 |
+
"expanded": 29,
|
| 37 |
+
"generated": 116,
|
| 38 |
+
"value_evaluations": 111,
|
| 39 |
+
"seconds": 28.98529230299755,
|
| 40 |
+
"beam_width": 4,
|
| 41 |
+
"shortlist": 4
|
| 42 |
+
},
|
| 43 |
+
"search_incomplete": true,
|
| 44 |
+
"physical_child_evaluations": 111,
|
| 45 |
+
"adapter_seconds": 29.11032145199715
|
| 46 |
+
},
|
| 47 |
+
"provenance_preserved": true,
|
| 48 |
+
"verified_incumbent_retained": true,
|
| 49 |
+
"checkpoint_module_modes_restored": true,
|
| 50 |
+
"RNG_preserved": true
|
| 51 |
+
},
|
| 52 |
+
{
|
| 53 |
+
"position": 27,
|
| 54 |
+
"n": 144,
|
| 55 |
+
"records": 2,
|
| 56 |
+
"synchronized_seconds": 58.14181944599841,
|
| 57 |
+
"last_search": {
|
| 58 |
+
"result": {
|
| 59 |
+
"status": "exhausted",
|
| 60 |
+
"word": null,
|
| 61 |
+
"verified": false,
|
| 62 |
+
"expanded": 24,
|
| 63 |
+
"generated": 96,
|
| 64 |
+
"value_evaluations": 37,
|
| 65 |
+
"seconds": 26.926760258997092,
|
| 66 |
+
"beam_width": 4,
|
| 67 |
+
"shortlist": 4
|
| 68 |
+
},
|
| 69 |
+
"search_incomplete": true,
|
| 70 |
+
"physical_child_evaluations": 37,
|
| 71 |
+
"adapter_seconds": 27.20490877199336
|
| 72 |
+
},
|
| 73 |
+
"provenance_preserved": true,
|
| 74 |
+
"verified_incumbent_retained": true,
|
| 75 |
+
"checkpoint_module_modes_restored": true,
|
| 76 |
+
"RNG_preserved": true
|
| 77 |
+
}
|
| 78 |
+
],
|
| 79 |
+
"actual_neural_precision": {
|
| 80 |
+
"schema": "native_neural_amp_v1",
|
| 81 |
+
"neural_compute": "float16_autocast",
|
| 82 |
+
"master_weights": "float32",
|
| 83 |
+
"optimizer": "float32_adam",
|
| 84 |
+
"promoted_head_outputs": "float32",
|
| 85 |
+
"outer_losses": "float32",
|
| 86 |
+
"exact_feature_producers_autocast": false,
|
| 87 |
+
"stem_attention_scores_softmax_value": "float32_when_neural_autocast_enabled",
|
| 88 |
+
"stem_attention_source_sha256": "df4df398878bdbe15a4ee8b60bb402f954758e2c8fa018f7ff97de43c3f4c56e",
|
| 89 |
+
"grad_scaler": true,
|
| 90 |
+
"adapter_sha256": "51bd3c0a7d21a9d4d5d91d98c65b2e3b443498d676faae58cc85f3380646fa51",
|
| 91 |
+
"controller_sha256": "a491e28e3e01930a09cb4745a35c714d3c6d4215406210641e44492cb5f2e556",
|
| 92 |
+
"pair_concat_policy": "bounded_no_grad_pair_mlp_tiles_original_concat_K_order",
|
| 93 |
+
"pair_concat_eligibility": "cuda_no_grad_fp32_or_neural_autocast_float16_bfloat16",
|
| 94 |
+
"pair_concat_other_paths": "original_gradient_cat_full_pair_mlp",
|
| 95 |
+
"pair_mlp_tile_working_budget_bytes": 67108864,
|
| 96 |
+
"pair_mlp_output_storage": "full_physical_pair_output",
|
| 97 |
+
"pair_mlp_bitwise_numeric_parity_claimed": false,
|
| 98 |
+
"pair_concat_kernel_sha256": "46824ab4e0f29e53547450be84e38f2c8e972bbc322f6dd3feddedbefd20addf",
|
| 99 |
+
"pair_concat_linear_sha256": "14f53caf14840dad7a0c0dd65e1489644495809ba0f2592502b63561234d15f2",
|
| 100 |
+
"triton_version": "3.8.0",
|
| 101 |
+
"bound_source_sha256": {
|
| 102 |
+
"model/stem.py": "df4df398878bdbe15a4ee8b60bb402f954758e2c8fa018f7ff97de43c3f4c56e",
|
| 103 |
+
"train/native_precision.py": "a491e28e3e01930a09cb4745a35c714d3c6d4215406210641e44492cb5f2e556",
|
| 104 |
+
"train/neural_amp.py": "51bd3c0a7d21a9d4d5d91d98c65b2e3b443498d676faae58cc85f3380646fa51",
|
| 105 |
+
"gpu/pair_concat_kernel.py": "46824ab4e0f29e53547450be84e38f2c8e972bbc322f6dd3feddedbefd20addf",
|
| 106 |
+
"gpu/pair_concat_linear.py": "14f53caf14840dad7a0c0dd65e1489644495809ba0f2592502b63561234d15f2"
|
| 107 |
+
},
|
| 108 |
+
"structural_checkpoint_flags": [
|
| 109 |
+
true,
|
| 110 |
+
true,
|
| 111 |
+
true,
|
| 112 |
+
true,
|
| 113 |
+
true,
|
| 114 |
+
true,
|
| 115 |
+
true,
|
| 116 |
+
true,
|
| 117 |
+
true,
|
| 118 |
+
true
|
| 119 |
+
],
|
| 120 |
+
"structural_checkpoint_mode": "nonreentrant_pure_block_preserve_rng",
|
| 121 |
+
"checkpoint_feature_producers": false
|
| 122 |
+
},
|
| 123 |
+
"checkpoint_precision_state": {
|
| 124 |
+
"schema": "native_amp_state_v1",
|
| 125 |
+
"scaler": {
|
| 126 |
+
"scale": 0.5,
|
| 127 |
+
"growth_factor": 2.0,
|
| 128 |
+
"backoff_factor": 0.5,
|
| 129 |
+
"growth_interval": 2000,
|
| 130 |
+
"_growth_tracker": 3
|
| 131 |
+
}
|
| 132 |
+
},
|
| 133 |
+
"training_or_optimizer_updates": false,
|
| 134 |
+
"sustainable_training_accepted": false,
|
| 135 |
+
"quality_accepted": false,
|
| 136 |
+
"speedup10x_verified": false
|
| 137 |
+
}
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/archive_native_teacher_direct_remote.py
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os,sys,json,hashlib,subprocess
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import requests
|
| 4 |
+
from huggingface_hub import HfApi,CommitOperationAdd
|
| 5 |
+
root=Path('/workspace/tqp');stage=root/'native_teacher_direct_control_20261011'
|
| 6 |
+
assert os.environ.get('TQP_REMOTE_PLATFORM')=='vast'
|
| 7 |
+
assert not subprocess.check_output(['nvidia-smi','--query-compute-apps=pid','--format=csv,noheader'],text=True).strip()
|
| 8 |
+
prior=json.loads((root/'full103_teacher_budget_686/teacher_budget_validation_hf_receipt.json').read_bytes());assert prior['status']=='IMMUTABLE_UPLOAD_HASH_BYTES_VERIFIED'
|
| 9 |
+
assert json.loads((root/'native_teacher_direct_acceptance_20261011/terminal.json').read_bytes())['status']=='PASS_SCOPED_NATIVE_TEACHER_DIRECT_REPLAY_NEW_PROFILE'
|
| 10 |
+
paths=[]
|
| 11 |
+
for name in ('native_teacher_direct_control_20261011','native_teacher_direct_acceptance_20261011'):
|
| 12 |
+
folder=root/name
|
| 13 |
+
paths.extend(p for p in folder.rglob('*') if p.is_file() and '__pycache__' not in p.parts)
|
| 14 |
+
paths=sorted(set(paths));assert all(p.resolve().is_relative_to(root) and not p.is_symlink() for p in paths)
|
| 15 |
+
def pin(p):
|
| 16 |
+
h=hashlib.sha256();n=0
|
| 17 |
+
with p.open('rb') as f:
|
| 18 |
+
for b in iter(lambda:f.read(8388608),b''):h.update(b);n+=len(b)
|
| 19 |
+
return dict(bytes=n,sha256=h.hexdigest())
|
| 20 |
+
assert sum(pin(p)['bytes'] for p in paths)<128*1024**2
|
| 21 |
+
manifest=stage/'native_teacher_direct_delta_manifest.json';assert not manifest.exists()
|
| 22 |
+
manifest.write_text(json.dumps(dict(parent_archive_commit=prior['commit'],files={str(p.relative_to(root)):pin(p) for p in paths},full_training_complete=False),indent=2));paths.append(manifest)
|
| 23 |
+
token=sys.stdin.readline().strip();assert token
|
| 24 |
+
api=HfApi(token=token);assert api.whoami()['name']=='TryDotAtwo'
|
| 25 |
+
repo=prior['repo'];prefix='vast_two3060_20261010/native_teacher_direct_delta_55200131'
|
| 26 |
+
info=api.create_commit(repo_id=repo,repo_type='dataset',commit_message='Preserve actual native teacher direct replay at widths25 and144, diagnostic only',operations=[CommitOperationAdd(path_in_repo=prefix+'/'+str(p.relative_to(root)),path_or_fileobj=str(p)) for p in paths])
|
| 27 |
+
print(json.dumps(dict(stage='DELTA_COMMIT_CREATED',commit=info.oid,files=len(paths))),flush=True)
|
| 28 |
+
for p in paths:
|
| 29 |
+
h=hashlib.sha256();n=0
|
| 30 |
+
with requests.get(f'https://huggingface.co/datasets/{repo}/resolve/{info.oid}/{prefix}/{p.relative_to(root)}',headers={'Authorization':'Bearer '+token},stream=True,timeout=120) as response:
|
| 31 |
+
response.raise_for_status()
|
| 32 |
+
for b in response.iter_content(8388608):h.update(b);n+=len(b)
|
| 33 |
+
assert dict(bytes=n,sha256=h.hexdigest())==pin(p)
|
| 34 |
+
receipt=dict(status='IMMUTABLE_UPLOAD_HASH_BYTES_VERIFIED',repo=repo,prefix=prefix,commit=info.oid,files=len(paths),bytes=sum(pin(p)['bytes'] for p in paths),manifest=pin(manifest),parent_archive_commit=prior['commit'],full_goal_completed=False)
|
| 35 |
+
(stage/'native_teacher_direct_delta_hf_receipt.json').write_text(json.dumps(receipt,indent=2));print(json.dumps(receipt),flush=True)
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/check_native_teacher_direct.py
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Remote-only matched small dev search; neither training nor exact resume."""
|
| 2 |
+
import hashlib
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import sqlite3
|
| 6 |
+
import subprocess
|
| 7 |
+
import sys
|
| 8 |
+
import time
|
| 9 |
+
from dataclasses import asdict
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
assert os.environ.get('TQP_REMOTE_PLATFORM') == 'vast'
|
| 13 |
+
assert not subprocess.check_output(['nvidia-smi', '--query-compute-apps=pid', '--format=csv,noheader'], text=True).strip()
|
| 14 |
+
root = Path('/workspace/tqp/full103_teacher_budget_686')
|
| 15 |
+
out = Path('/workspace/tqp/native_teacher_direct_acceptance_20261011')
|
| 16 |
+
out.mkdir(exist_ok=False)
|
| 17 |
+
sys.path.insert(0, str(root/'candidate_package'))
|
| 18 |
+
|
| 19 |
+
def pin(p):
|
| 20 |
+
h = hashlib.sha256()
|
| 21 |
+
n = 0
|
| 22 |
+
with p.open('rb') as f:
|
| 23 |
+
for b in iter(lambda: f.read(8388608), b''):
|
| 24 |
+
h.update(b)
|
| 25 |
+
n += len(b)
|
| 26 |
+
return dict(bytes=n, sha256=h.hexdigest())
|
| 27 |
+
|
| 28 |
+
source = root/'source_manifest.json'
|
| 29 |
+
assert pin(source)['sha256'] == '88b592def65345ca7567ca44adb505ea8c24f62a55aac3e1166b6286cb76015e'
|
| 30 |
+
for relative, expected in json.loads(source.read_bytes())['files'].items():
|
| 31 |
+
assert pin(root/'candidate_package'/relative) == expected, relative
|
| 32 |
+
checkpoint = Path('/workspace/tqp/native_teacher_budget_training_20261010/step-000000016.pt')
|
| 33 |
+
assert pin(checkpoint) == dict(bytes=1674076239, sha256='16f44bf24e8346cdc403062e87572969d96b1574e14f4c4938bf1aa6f5620dbb')
|
| 34 |
+
database = Path('/workspace/tqp/reference/full_shared_native_holdout_20261001.sqlite')
|
| 35 |
+
assert pin(database) == dict(bytes=147955712, sha256='80be14cabbe4f6e96cb4f42861d788c41df7066283abc4842dbf3e903f076b4f')
|
| 36 |
+
|
| 37 |
+
import torch
|
| 38 |
+
from research_v3.cli.train_native_campaign import configured_launch_gpu_context, missing_production_gpu_routes
|
| 39 |
+
from research_v3.features.registry import FeatureRegistry
|
| 40 |
+
from research_v3.features.subspace_views import register_subspace_views
|
| 41 |
+
from research_v3.features.basis_gradient import register_basis_gradient
|
| 42 |
+
from research_v3.features.symmetry_alignment import register_symmetry_alignment
|
| 43 |
+
from research_v3.features.subspace_probes import register_partial_shear_rank
|
| 44 |
+
from research_v3.gpu.g06_pair_launch import register_selected_diffusion
|
| 45 |
+
from research_v3.model.field import FusionDistanceField
|
| 46 |
+
from research_v3.basis.learning import BasisField
|
| 47 |
+
from research_v3.gpu.neural_beam import beam_search, neural_field_callbacks, matrix_hamming_callbacks
|
| 48 |
+
from research_v3.gpu.neighbors import all_action_pairs
|
| 49 |
+
from research_v3.data.stream_reader import decode_record
|
| 50 |
+
|
| 51 |
+
config = json.loads((root/'training_configuration.json').read_bytes())
|
| 52 |
+
assert len(config['features']) == 103
|
| 53 |
+
registry = FeatureRegistry()
|
| 54 |
+
register_subspace_views(registry, include_d03=config.get('d03_selected_block') is None)
|
| 55 |
+
register_basis_gradient(registry)
|
| 56 |
+
register_selected_diffusion(registry, config)
|
| 57 |
+
register_symmetry_alignment(registry)
|
| 58 |
+
register_partial_shear_rank(registry)
|
| 59 |
+
context = configured_launch_gpu_context(config, registry)
|
| 60 |
+
assert not missing_production_gpu_routes(config['features'], context)
|
| 61 |
+
torch.set_num_threads(8)
|
| 62 |
+
torch.backends.cuda.matmul.allow_tf32 = False
|
| 63 |
+
torch.backends.cudnn.allow_tf32 = False
|
| 64 |
+
model = BasisField(FusionDistanceField([registry.specs[k] for k in config['features']], gpu_context=context,
|
| 65 |
+
**config['field']), config['basis_hidden']).cuda()
|
| 66 |
+
saved = torch.load(checkpoint, map_location='cpu', weights_only=True)
|
| 67 |
+
assert saved['progress'] == dict(attempted=16, accepted=15, rejected=1)
|
| 68 |
+
assert saved['config']['config']==config, 'CP16 diagnostic configuration drift'
|
| 69 |
+
model.load_state_dict(saved['model'], strict=True)
|
| 70 |
+
saved_modes=saved['module_modes'];saved_rng=saved['rng'];saved_precision=saved['extra']['precision']
|
| 71 |
+
del saved
|
| 72 |
+
|
| 73 |
+
from research_v3.model.stem import configure_structural_checkpoint
|
| 74 |
+
from research_v3.train.native_precision import NativeAmpController
|
| 75 |
+
configure_structural_checkpoint(model,config['structural_activation_checkpoint'])
|
| 76 |
+
precision=NativeAmpController(model,init_scale=config['precision']['init_scale'])
|
| 77 |
+
precision.load_state_dict(saved_precision)
|
| 78 |
+
from research_v3.train.checkpoint import restore_rng,rng_state
|
| 79 |
+
for name,module in model.named_modules():module.training=saved_modes[name]
|
| 80 |
+
restore_rng(saved_rng)
|
| 81 |
+
del saved_rng
|
| 82 |
+
def rng_same(a,b):
|
| 83 |
+
return a['python']==b['python'] and a['numpy']==b['numpy'] and torch.equal(a['torch'],b['torch']) and len(a['cuda'])==len(b['cuda']) and all(torch.equal(x,y) for x,y in zip(a['cuda'],b['cuda']))
|
| 84 |
+
from research_v3.data.native_training_stream import native_stream,file_identity
|
| 85 |
+
from research_v3.train.native_neural_refresh_solver import NativeNeuralRefreshSolver,NATIVE_ADMISSION
|
| 86 |
+
from research_v3.train.native_replay_refresh import NativeReplayRefresh
|
| 87 |
+
reader=Path('/workspace/tqp/native_campaign_native_20261008/build/native-training-reader')
|
| 88 |
+
db=Path('/workspace/tqp/native_resume4_lookup_epochs_20261010/epoch_0000/train.sqlite')
|
| 89 |
+
epoch_receipt=db.parent/'epoch_receipt.json'
|
| 90 |
+
transport=dict(epoch=0,reader=file_identity(reader),database=file_identity(db),receipt=file_identity(epoch_receipt),suffix_count=1,augment=True)
|
| 91 |
+
assert transport['reader']==dict(bytes=7393888,sha256='7877f5a1017a56863a9767eea72ea3329a41dbd3140b88dde157cf0ff14d9c62')
|
| 92 |
+
assert transport['database']==dict(bytes=401793024,sha256='62f0291502e4403634c7d3ac58642f48c0645e40d33f96e83a68a0c226e970d8')
|
| 93 |
+
metadata=json.loads(Path('/workspace/tqp/native_teacher_budget_metadata_20261010/metadata_receipt.json').read_bytes())
|
| 94 |
+
sources=metadata['source_sha256']
|
| 95 |
+
solver=NativeNeuralRefreshSolver(model,search_config=config['campaign']['teacher_search'],field_config=config['campaign']['teacher_field'],source_sha256=sources,native_reader=transport['reader'],admission_contract=NATIVE_ADMISSION)
|
| 96 |
+
replay=NativeReplayRefresh(solver,out/'native_replay.sqlite',every_updates=32,approved_sources=sources)
|
| 97 |
+
results=[]
|
| 98 |
+
for position in (31,27):
|
| 99 |
+
with native_stream(reader,db,epoch_receipt,transport,position,position+1) as stream:messages=list(stream)
|
| 100 |
+
assert len(messages)==1 and messages[0]['position']==position
|
| 101 |
+
records=messages[0]['records'];assert len(records)==2
|
| 102 |
+
before_rng=rng_state();before_modes={name:module.training for name,module in model.named_modules()}
|
| 103 |
+
torch.cuda.synchronize();tick=time.perf_counter();output=replay(records,32);torch.cuda.synchronize()
|
| 104 |
+
assert rng_same(before_rng,rng_state())
|
| 105 |
+
assert before_modes=={name:module.training for name,module in model.named_modules()}
|
| 106 |
+
assert len(output)==len(records)
|
| 107 |
+
for before,after in zip(records,output):
|
| 108 |
+
assert {k:v for k,v in before.items() if k!='verified_words'}=={k:v for k,v in after.items() if k!='verified_words'}
|
| 109 |
+
assert min(w['physical_cost'] for w in after['verified_words'])<=min(w['physical_cost'] for w in before['verified_words'])
|
| 110 |
+
last=solver.last_search
|
| 111 |
+
assert last['physical_child_evaluations']<=128
|
| 112 |
+
result=dict(position=position,n=records[0]['state']['n'],records=len(records),synchronized_seconds=time.perf_counter()-tick,last_search={k:last[k] for k in ('result','search_incomplete','physical_child_evaluations','adapter_seconds')},provenance_preserved=True,verified_incumbent_retained=True,checkpoint_module_modes_restored=True,RNG_preserved=True)
|
| 113 |
+
results.append(result);print(json.dumps(result),flush=True)
|
| 114 |
+
receipt=dict(status='PASS_SCOPED_NATIVE_TEACHER_DIRECT_REPLAY_NEW_PROFILE',source_manifest=pin(source),checkpoint=pin(checkpoint),config=pin(root/'training_configuration.json'),features=103,search=config['campaign']['teacher_search'],results=results,actual_neural_precision=precision.contract,checkpoint_precision_state=saved_precision,training_or_optimizer_updates=False,sustainable_training_accepted=False,quality_accepted=False,speedup10x_verified=False)
|
| 115 |
+
(out/'terminal.json').write_text(json.dumps(receipt,indent=2));print(json.dumps(receipt),flush=True)
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/direct_teacher.log
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"position": 31, "n": 25, "records": 2, "synchronized_seconds": 61.66672534200188, "last_search": {"result": {"status": "depth_limit", "word": null, "verified": false, "expanded": 29, "generated": 116, "value_evaluations": 111, "seconds": 28.98529230299755, "beam_width": 4, "shortlist": 4}, "search_incomplete": true, "physical_child_evaluations": 111, "adapter_seconds": 29.11032145199715}, "provenance_preserved": true, "verified_incumbent_retained": true, "checkpoint_module_modes_restored": true, "RNG_preserved": true}
|
| 2 |
+
{"position": 27, "n": 144, "records": 2, "synchronized_seconds": 58.14181944599841, "last_search": {"result": {"status": "exhausted", "word": null, "verified": false, "expanded": 24, "generated": 96, "value_evaluations": 37, "seconds": 26.926760258997092, "beam_width": 4, "shortlist": 4}, "search_incomplete": true, "physical_child_evaluations": 37, "adapter_seconds": 27.20490877199336}, "provenance_preserved": true, "verified_incumbent_retained": true, "checkpoint_module_modes_restored": true, "RNG_preserved": true}
|
| 3 |
+
{"status": "PASS_SCOPED_NATIVE_TEACHER_DIRECT_REPLAY_NEW_PROFILE", "source_manifest": {"bytes": 116262, "sha256": "88b592def65345ca7567ca44adb505ea8c24f62a55aac3e1166b6286cb76015e"}, "checkpoint": {"bytes": 1674076239, "sha256": "16f44bf24e8346cdc403062e87572969d96b1574e14f4c4938bf1aa6f5620dbb"}, "config": {"bytes": 234940, "sha256": "7bc485cee48bf3c01d8348e160845ce9715160a7bb0667c8c03fa279b4d74885"}, "features": 103, "search": {"beam_width": 4, "shortlist": 4, "max_depth": 8, "max_child_evaluations": 128, "max_search_seconds": 30.0, "inference_batch": 8, "max_expanded": 64}, "results": [{"position": 31, "n": 25, "records": 2, "synchronized_seconds": 61.66672534200188, "last_search": {"result": {"status": "depth_limit", "word": null, "verified": false, "expanded": 29, "generated": 116, "value_evaluations": 111, "seconds": 28.98529230299755, "beam_width": 4, "shortlist": 4}, "search_incomplete": true, "physical_child_evaluations": 111, "adapter_seconds": 29.11032145199715}, "provenance_preserved": true, "verified_incumbent_retained": true, "checkpoint_module_modes_restored": true, "RNG_preserved": true}, {"position": 27, "n": 144, "records": 2, "synchronized_seconds": 58.14181944599841, "last_search": {"result": {"status": "exhausted", "word": null, "verified": false, "expanded": 24, "generated": 96, "value_evaluations": 37, "seconds": 26.926760258997092, "beam_width": 4, "shortlist": 4}, "search_incomplete": true, "physical_child_evaluations": 37, "adapter_seconds": 27.20490877199336}, "provenance_preserved": true, "verified_incumbent_retained": true, "checkpoint_module_modes_restored": true, "RNG_preserved": true}], "actual_neural_precision": {"schema": "native_neural_amp_v1", "neural_compute": "float16_autocast", "master_weights": "float32", "optimizer": "float32_adam", "promoted_head_outputs": "float32", "outer_losses": "float32", "exact_feature_producers_autocast": false, "stem_attention_scores_softmax_value": "float32_when_neural_autocast_enabled", "stem_attention_source_sha256": "df4df398878bdbe15a4ee8b60bb402f954758e2c8fa018f7ff97de43c3f4c56e", "grad_scaler": true, "adapter_sha256": "51bd3c0a7d21a9d4d5d91d98c65b2e3b443498d676faae58cc85f3380646fa51", "controller_sha256": "a491e28e3e01930a09cb4745a35c714d3c6d4215406210641e44492cb5f2e556", "pair_concat_policy": "bounded_no_grad_pair_mlp_tiles_original_concat_K_order", "pair_concat_eligibility": "cuda_no_grad_fp32_or_neural_autocast_float16_bfloat16", "pair_concat_other_paths": "original_gradient_cat_full_pair_mlp", "pair_mlp_tile_working_budget_bytes": 67108864, "pair_mlp_output_storage": "full_physical_pair_output", "pair_mlp_bitwise_numeric_parity_claimed": false, "pair_concat_kernel_sha256": "46824ab4e0f29e53547450be84e38f2c8e972bbc322f6dd3feddedbefd20addf", "pair_concat_linear_sha256": "14f53caf14840dad7a0c0dd65e1489644495809ba0f2592502b63561234d15f2", "triton_version": "3.8.0", "bound_source_sha256": {"model/stem.py": "df4df398878bdbe15a4ee8b60bb402f954758e2c8fa018f7ff97de43c3f4c56e", "train/native_precision.py": "a491e28e3e01930a09cb4745a35c714d3c6d4215406210641e44492cb5f2e556", "train/neural_amp.py": "51bd3c0a7d21a9d4d5d91d98c65b2e3b443498d676faae58cc85f3380646fa51", "gpu/pair_concat_kernel.py": "46824ab4e0f29e53547450be84e38f2c8e972bbc322f6dd3feddedbefd20addf", "gpu/pair_concat_linear.py": "14f53caf14840dad7a0c0dd65e1489644495809ba0f2592502b63561234d15f2"}, "structural_checkpoint_flags": [true, true, true, true, true, true, true, true, true, true], "structural_checkpoint_mode": "nonreentrant_pure_block_preserve_rng", "checkpoint_feature_producers": false}, "checkpoint_precision_state": {"schema": "native_amp_state_v1", "scaler": {"scale": 0.5, "growth_factor": 2.0, "backoff_factor": 0.5, "growth_interval": 2000, "_growth_tracker": 3}}, "training_or_optimizer_updates": false, "sustainable_training_accepted": false, "quality_accepted": false, "speedup10x_verified": false}
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/launch.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"command": [
|
| 3 |
+
"/venv/main/bin/python",
|
| 4 |
+
"/workspace/tqp/native_teacher_direct_control_20261011/check_native_teacher_direct.py"
|
| 5 |
+
],
|
| 6 |
+
"started_at": 1791667701.6120718,
|
| 7 |
+
"hard_deadline_seconds": 240,
|
| 8 |
+
"diagnostic_refresh_update": 32,
|
| 9 |
+
"accepted_optimizer_updates": 0,
|
| 10 |
+
"archive_commit": "2341c1117f026d5df48a37ffa20ba58470c04db1"
|
| 11 |
+
}
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/native_teacher_direct_delta_manifest.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"parent_archive_commit": "2341c1117f026d5df48a37ffa20ba58470c04db1",
|
| 3 |
+
"files": {
|
| 4 |
+
"native_teacher_direct_acceptance_20261011/native_replay.sqlite": {
|
| 5 |
+
"bytes": 303104,
|
| 6 |
+
"sha256": "916f96de1714759fcc9490ff0bd9d520133d9631df21d655ea3cc940802cf803"
|
| 7 |
+
},
|
| 8 |
+
"native_teacher_direct_acceptance_20261011/terminal.json": {
|
| 9 |
+
"bytes": 4665,
|
| 10 |
+
"sha256": "59239eaa4746c684925486ec0863f15f985075adac6a7def123671f9ecbaac36"
|
| 11 |
+
},
|
| 12 |
+
"native_teacher_direct_control_20261011/archive_native_teacher_direct_remote.py": {
|
| 13 |
+
"bytes": 2881,
|
| 14 |
+
"sha256": "a758a7b7e37f5863a2c7e66e9f532265fbe0429c3240c25b8620c0b04c27d57e"
|
| 15 |
+
},
|
| 16 |
+
"native_teacher_direct_control_20261011/check_native_teacher_direct.py": {
|
| 17 |
+
"bytes": 7790,
|
| 18 |
+
"sha256": "05221a2d9b3c8db6dd931bc8d38d090ad451a4eb2305e500a577fdea203771ce"
|
| 19 |
+
},
|
| 20 |
+
"native_teacher_direct_control_20261011/direct_teacher.log": {
|
| 21 |
+
"bytes": 4951,
|
| 22 |
+
"sha256": "15386ac0d2487ff791ceec3eaa396616eb0cd7eb634a6e2ff79c9ea1f512e83d"
|
| 23 |
+
},
|
| 24 |
+
"native_teacher_direct_control_20261011/launch.json": {
|
| 25 |
+
"bytes": 344,
|
| 26 |
+
"sha256": "645d39acac069dde5ff1a650d46d651931c0ffd7a12b04a71d0df0ba6ca7986e"
|
| 27 |
+
},
|
| 28 |
+
"native_teacher_direct_control_20261011/process_group_deadline.py": {
|
| 29 |
+
"bytes": 2995,
|
| 30 |
+
"sha256": "4ea90f16e3c8aed29ce01a060ae59bfae1c1607456754ff5afde5cc43c614dc6"
|
| 31 |
+
},
|
| 32 |
+
"native_teacher_direct_control_20261011/run_native_teacher_direct.py": {
|
| 33 |
+
"bytes": 1974,
|
| 34 |
+
"sha256": "3d39168def7731425fedafaa611b05dc2b544dcbcb23d2130ea4cff1b7a84954"
|
| 35 |
+
},
|
| 36 |
+
"native_teacher_direct_control_20261011/run_native_teacher_direct_v2.py": {
|
| 37 |
+
"bytes": 1974,
|
| 38 |
+
"sha256": "de4a0004cc41cf6bafd9e83e0d2d9c2d517bcb18e5d8577c0b0168962b2b3ca6"
|
| 39 |
+
},
|
| 40 |
+
"native_teacher_direct_control_20261011/terminal.json": {
|
| 41 |
+
"bytes": 310,
|
| 42 |
+
"sha256": "ac7d563e2006d6f48ab92fcfb96b7b47349c10435e8d4b2e6a822e37da0914d1"
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"full_training_complete": false
|
| 46 |
+
}
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/process_group_deadline.py
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""POSIX bounded runner: clean owned session including changed process groups."""
|
| 2 |
+
import os
|
| 3 |
+
import math
|
| 4 |
+
import signal
|
| 5 |
+
import subprocess
|
| 6 |
+
import time
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
def live_members(group):
|
| 10 |
+
members = []
|
| 11 |
+
for name in os.listdir('/proc'):
|
| 12 |
+
if not name.isdigit():
|
| 13 |
+
continue
|
| 14 |
+
try:
|
| 15 |
+
raw = open('/proc/' + name + '/stat').read()
|
| 16 |
+
fields = raw[raw.rfind(')') + 2:].split()
|
| 17 |
+
if int(fields[3]) == group and fields[0] != 'Z':
|
| 18 |
+
members.append(int(name))
|
| 19 |
+
except (FileNotFoundError, ProcessLookupError, PermissionError):
|
| 20 |
+
pass
|
| 21 |
+
return members
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def signal_session(session, sig):
|
| 25 |
+
groups = set()
|
| 26 |
+
for pid in live_members(session):
|
| 27 |
+
try:
|
| 28 |
+
if os.getsid(pid) == session:
|
| 29 |
+
groups.add(os.getpgid(pid))
|
| 30 |
+
except ProcessLookupError:
|
| 31 |
+
pass
|
| 32 |
+
for group in groups:
|
| 33 |
+
assert group != os.getpgrp()
|
| 34 |
+
try:
|
| 35 |
+
os.killpg(group, sig)
|
| 36 |
+
except ProcessLookupError:
|
| 37 |
+
pass
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
def run(command, *, seconds, grace_seconds=5, env=None, stdout=None):
|
| 41 |
+
if os.name != 'posix' or any(type(v) not in (int, float) or not math.isfinite(v) or v <= 0 for v in (seconds, grace_seconds)):
|
| 42 |
+
raise ValueError('POSIX and positive deadlines required')
|
| 43 |
+
started = time.monotonic()
|
| 44 |
+
child = subprocess.Popen(command, env=env, stdout=stdout,
|
| 45 |
+
stderr=subprocess.STDOUT, start_new_session=True)
|
| 46 |
+
group = child.pid
|
| 47 |
+
assert group != os.getpgrp()
|
| 48 |
+
timed_out = False
|
| 49 |
+
try:
|
| 50 |
+
try:
|
| 51 |
+
code = child.wait(timeout=seconds)
|
| 52 |
+
except subprocess.TimeoutExpired:
|
| 53 |
+
timed_out = True
|
| 54 |
+
code = None
|
| 55 |
+
finally:
|
| 56 |
+
before = live_members(group)
|
| 57 |
+
if before:
|
| 58 |
+
try:
|
| 59 |
+
signal_session(group, signal.SIGTERM)
|
| 60 |
+
except ProcessLookupError:
|
| 61 |
+
pass
|
| 62 |
+
until = time.monotonic() + grace_seconds
|
| 63 |
+
while live_members(group) and time.monotonic() < until:
|
| 64 |
+
child.poll()
|
| 65 |
+
time.sleep(0.05)
|
| 66 |
+
if live_members(group):
|
| 67 |
+
try:
|
| 68 |
+
signal_session(group, signal.SIGKILL)
|
| 69 |
+
except ProcessLookupError:
|
| 70 |
+
pass
|
| 71 |
+
child.wait(timeout=grace_seconds)
|
| 72 |
+
until = time.monotonic() + grace_seconds
|
| 73 |
+
while live_members(group) and time.monotonic() < until:
|
| 74 |
+
time.sleep(0.05)
|
| 75 |
+
after = live_members(group)
|
| 76 |
+
receipt = dict(exit_code=124 if timed_out else code,
|
| 77 |
+
leader_returncode=child.returncode, timed_out=timed_out,
|
| 78 |
+
session_id=group, cleanup_members_before=before,
|
| 79 |
+
cleanup_live_members_after=after,
|
| 80 |
+
seconds=time.monotonic() - started)
|
| 81 |
+
if after:
|
| 82 |
+
raise RuntimeError('Owned process group remains live: ' + str(receipt))
|
| 83 |
+
return receipt
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/run_native_teacher_direct.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Direct diagnostic refresh, gated by verified archive and hard session limit."""
|
| 2 |
+
import hashlib
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import subprocess
|
| 6 |
+
import sys
|
| 7 |
+
import time
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
from process_group_deadline import run
|
| 10 |
+
|
| 11 |
+
root = Path('/workspace/tqp/full103_teacher_budget_686')
|
| 12 |
+
control = Path('/workspace/tqp/native_teacher_direct_control_20261011')
|
| 13 |
+
assert os.environ.get('TQP_REMOTE_PLATFORM') == 'vast'
|
| 14 |
+
archive = json.loads((root / 'teacher_budget_validation_hf_receipt.json').read_bytes())
|
| 15 |
+
assert archive['status'] == 'IMMUTABLE_UPLOAD_HASH_BYTES_VERIFIED'
|
| 16 |
+
assert archive['commit'] == '2341c1117f026d5df48a37ffa20ba58470c04db1'
|
| 17 |
+
assert time.time() + 270 < 1791673809.8667955
|
| 18 |
+
assert not subprocess.check_output(['nvidia-smi', '--query-compute-apps=pid',
|
| 19 |
+
'--format=csv,noheader'], text=True).strip()
|
| 20 |
+
checker = control / 'check_native_teacher_direct.py'
|
| 21 |
+
assert hashlib.sha256(checker.read_bytes()).hexdigest() == 'f91fcc52c7aa55b42022ac85c9baeba0f6690377bd989567491f02002dd6345b'
|
| 22 |
+
command = [sys.executable, str(checker)]
|
| 23 |
+
(control / 'launch.json').write_text(json.dumps(dict(command=command,
|
| 24 |
+
started_at=time.time(), hard_deadline_seconds=240,
|
| 25 |
+
diagnostic_refresh_update=32, accepted_optimizer_updates=0,
|
| 26 |
+
archive_commit=archive['commit']), indent=2))
|
| 27 |
+
try:
|
| 28 |
+
with (control / 'direct_teacher.log').open('x') as log:
|
| 29 |
+
result = run(command, seconds=240, grace_seconds=10,
|
| 30 |
+
env=dict(os.environ, PYTHONDONTWRITEBYTECODE='1'), stdout=log)
|
| 31 |
+
except BaseException as error:
|
| 32 |
+
(control / 'launcher_exception.json').write_text(json.dumps(dict(
|
| 33 |
+
type=type(error).__name__, message=str(error), at=time.time()), indent=2))
|
| 34 |
+
raise
|
| 35 |
+
result.update(training_complete=False, quality_accepted=False,
|
| 36 |
+
speedup10x_verified=False, diagnostic_only=True)
|
| 37 |
+
(control / 'terminal.json').write_text(json.dumps(result, indent=2))
|
| 38 |
+
print(json.dumps(result), flush=True)
|
| 39 |
+
raise SystemExit(result['exit_code'])
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/run_native_teacher_direct_v2.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Direct diagnostic refresh, gated by verified archive and hard session limit."""
|
| 2 |
+
import hashlib
|
| 3 |
+
import json
|
| 4 |
+
import os
|
| 5 |
+
import subprocess
|
| 6 |
+
import sys
|
| 7 |
+
import time
|
| 8 |
+
from pathlib import Path
|
| 9 |
+
from process_group_deadline import run
|
| 10 |
+
|
| 11 |
+
root = Path('/workspace/tqp/full103_teacher_budget_686')
|
| 12 |
+
control = Path('/workspace/tqp/native_teacher_direct_control_20261011')
|
| 13 |
+
assert os.environ.get('TQP_REMOTE_PLATFORM') == 'vast'
|
| 14 |
+
archive = json.loads((root / 'teacher_budget_validation_hf_receipt.json').read_bytes())
|
| 15 |
+
assert archive['status'] == 'IMMUTABLE_UPLOAD_HASH_BYTES_VERIFIED'
|
| 16 |
+
assert archive['commit'] == '2341c1117f026d5df48a37ffa20ba58470c04db1'
|
| 17 |
+
assert time.time() + 270 < 1791673809.8667955
|
| 18 |
+
assert not subprocess.check_output(['nvidia-smi', '--query-compute-apps=pid',
|
| 19 |
+
'--format=csv,noheader'], text=True).strip()
|
| 20 |
+
checker = control / 'check_native_teacher_direct.py'
|
| 21 |
+
assert hashlib.sha256(checker.read_bytes()).hexdigest() == '05221a2d9b3c8db6dd931bc8d38d090ad451a4eb2305e500a577fdea203771ce'
|
| 22 |
+
command = [sys.executable, str(checker)]
|
| 23 |
+
(control / 'launch.json').write_text(json.dumps(dict(command=command,
|
| 24 |
+
started_at=time.time(), hard_deadline_seconds=240,
|
| 25 |
+
diagnostic_refresh_update=32, accepted_optimizer_updates=0,
|
| 26 |
+
archive_commit=archive['commit']), indent=2))
|
| 27 |
+
try:
|
| 28 |
+
with (control / 'direct_teacher.log').open('x') as log:
|
| 29 |
+
result = run(command, seconds=240, grace_seconds=10,
|
| 30 |
+
env=dict(os.environ, PYTHONDONTWRITEBYTECODE='1'), stdout=log)
|
| 31 |
+
except BaseException as error:
|
| 32 |
+
(control / 'launcher_exception.json').write_text(json.dumps(dict(
|
| 33 |
+
type=type(error).__name__, message=str(error), at=time.time()), indent=2))
|
| 34 |
+
raise
|
| 35 |
+
result.update(training_complete=False, quality_accepted=False,
|
| 36 |
+
speedup10x_verified=False, diagnostic_only=True)
|
| 37 |
+
(control / 'terminal.json').write_text(json.dumps(result, indent=2))
|
| 38 |
+
print(json.dumps(result), flush=True)
|
| 39 |
+
raise SystemExit(result['exit_code'])
|
vast_two3060_20261010/native_teacher_direct_delta_55200131/native_teacher_direct_control_20261011/terminal.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"exit_code": 0,
|
| 3 |
+
"leader_returncode": 0,
|
| 4 |
+
"timed_out": false,
|
| 5 |
+
"session_id": 21980,
|
| 6 |
+
"cleanup_members_before": [],
|
| 7 |
+
"cleanup_live_members_after": [],
|
| 8 |
+
"seconds": 159.40678510899306,
|
| 9 |
+
"training_complete": false,
|
| 10 |
+
"quality_accepted": false,
|
| 11 |
+
"speedup10x_verified": false,
|
| 12 |
+
"diagnostic_only": true
|
| 13 |
+
}
|